JP2002244890A - Recording device - Google Patents

Recording device

Info

Publication number
JP2002244890A
JP2002244890A JP2001042640A JP2001042640A JP2002244890A JP 2002244890 A JP2002244890 A JP 2002244890A JP 2001042640 A JP2001042640 A JP 2001042640A JP 2001042640 A JP2001042640 A JP 2001042640A JP 2002244890 A JP2002244890 A JP 2002244890A
Authority
JP
Japan
Prior art keywords
program module
counter
program
measurement
execution
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.)
Withdrawn
Application number
JP2001042640A
Other languages
Japanese (ja)
Inventor
Hideki Hirose
英樹 広瀬
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2001042640A priority Critical patent/JP2002244890A/en
Publication of JP2002244890A publication Critical patent/JP2002244890A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To make the execution times and numbers of calls of a plurality of specific program modules simultaneously measurable with the use of an extended interface, and make the measurements controllable and receivable from an external terminal. SOLUTION: An extended interface board 300 has thereon counters 306, 309, 312,... comprising counters 307, 310, 313,... for measuring execution times of the program modules stored in a program ROM and counters 308, 311, 314,... for measuring numbers of execution. The counters are started with a timing when the program modules are started for execution. Measured data on the numbers of execution and the execution times are transferred to an external debugging computer 400 via a serial interface 315, and the suspension of the measurement and the clearing of the measured data can be effected from the computer 400.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、入力された記録デ
ータに基づき、システムバスに接続される各種のデバイ
スを総括的に制御して記録出力を行なうためのプログラ
ム・モジュールを格納したプログラムROMを有する記
録装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program ROM storing a program module for comprehensively controlling various devices connected to a system bus and performing recording output based on input recording data. And a recording apparatus having the same.

【0002】[0002]

【従来の技術】従来、レーザープリンタ等のページプリ
ンタでは画像形成におけるプログラムROMのシステム
最適化にはインサーキットエミュレーション(ICE)
のようなデバッグツールを用いるのが主流であった。し
かし、近年のCPU高速化に伴ない、もはやインサーキ
ットエミュレーションは提供されなくなってしまった。
2. Description of the Related Art Conventionally, in a page printer such as a laser printer, in-circuit emulation (ICE) is used to optimize a system of a program ROM in image formation.
The mainstream was to use a debugging tool like. However, with the recent increase in CPU speed, in-circuit emulation is no longer provided.

【0003】したがって、システム最適化を行うために
は、プログラムROM内の様々なプログラム・モジュー
ルのうち、実行するのに時間のかかるプログラム・モジ
ュールを見つけ出し、そのプログラム・モジュールの実
行にかかる時間を短くする、いわゆるプロファイリング
を行なう必要がある。
Therefore, in order to optimize the system, of various program modules in the program ROM, a program module which takes a long time to execute is found, and the time required to execute the program module is reduced. So-called profiling.

【0004】このために、各々のプログラムモジュール
の実行時間およびそのプログラム・モジュールのコール
回数を測定しなければならないが、上記のようにインサ
ーキットエミュレーションが提供されなくなってしまっ
たため、現在ではロジックアナライザを用いて特定のプ
ログラム・モジュールの実行時間を測定して、パフォー
マンスを解析しシステムを最適化する他なかった。
For this purpose, the execution time of each program module and the number of calls of the program module must be measured. However, since in-circuit emulation is no longer provided as described above, a logic analyzer is now used. The only way to measure the execution time of a particular program module was to analyze the performance and optimize the system.

【0005】[0005]

【発明が解決しようとする課題】上記のように、従来例
では測定したいプログラム・モジュールの実行時間を測
定するのに、空いているI/Oポートにデータを書き込
み、基板上の測定したいピンにロジックアナライザのプ
ロブを直接当てて測定しなければならず、物理的に非常
に煩雑な作業が必要であった。また、ロジックアナライ
ザでは広いレンジで信号を測定する事ができず、なおか
つ一つの信号にしかトリガーをかけることができないの
で、一回の作業では事実上一つのプログラム・モジュー
ルの実行時間しか測定することができなかった。
As described above, in the conventional example, in order to measure the execution time of a program module to be measured, data is written to an empty I / O port, and the data is written to a pin to be measured on a board. The measurement had to be performed by directly applying a probe of a logic analyzer, and physically very complicated work was required. Also, since a logic analyzer cannot measure signals over a wide range and can trigger only one signal, it is necessary to measure only the execution time of one program module in one operation. Could not.

【0006】したがって、従来の手法によると、一つの
プログラム・モジュールの実行時間を測定する度にプロ
グラムROMを作り直して、そしてまた計測するといっ
た煩雑な作業を繰り返さなければならなかった。さら
に、プログラム・モジュールのコール回数も測定するこ
とができないと言う問題があった。以上のように、IC
Eが失なわれてしまった現在、ロジックアナライザを用
いる従来の手法では、パフォーマンス解析の効率は極め
て低い物であった。
Therefore, according to the conventional method, a complicated operation such as recreating a program ROM every time the execution time of one program module is measured and measuring it again has to be repeated. Further, there is a problem that the number of calls of the program module cannot be measured. As mentioned above, IC
At present, when E has been lost, the efficiency of performance analysis has been extremely low with the conventional method using a logic analyzer.

【0007】本発明の課題は、上記の問題を解決し、ロ
ジックアナライザを用いる必要なく、記録装置の拡張イ
ンターフェースを利用して同時に複数の特定プログラム
・モジュールの実行時間および、そのコール回数を測定
することができ、また、外部の端末から測定を制御する
とともに測定データを受信できるようにすることにあ
る。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above problems and measure the execution time of a plurality of specific program modules and the number of calls thereof simultaneously using an extended interface of a recording device without using a logic analyzer. It is another object of the present invention to control the measurement and receive the measurement data from an external terminal.

【0008】[0008]

【課題を解決するための手段】上記の課題を解決するた
め、本発明によれば、入力された記録データに基づき、
システムバスに接続される各種のデバイスを総括的に制
御して記録出力を行なうためのプログラム・モジュール
を格納したプログラムROMを有する記録装置におい
て、前記プログラムROMに格納されたプログラム・モ
ジュールの実行回数または実行時間を計測するカウンタ
手段と、前記プログラム・モジュールの実行が開始され
たタイミングで前記カウンタ手段を起動する制御手段を
拡張インターフェースボード上に有する構成を採用し
た。
According to the present invention, to solve the above-mentioned problems, based on input recording data,
In a recording apparatus having a program ROM storing a program module for performing recording output by comprehensively controlling various devices connected to a system bus, the number of times the program module stored in the program ROM is executed or A configuration is adopted in which an extension interface board has counter means for measuring the execution time and control means for activating the counter means at the timing when the execution of the program module is started.

【0009】[0009]

【発明の実施の形態】以下添付図面を参照して本発明を
詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below in detail with reference to the accompanying drawings.

【0010】図1は、本発明の実施の一形態に係る記録
装置の概略構成を示すブロック図である。図1におい
て、符号100はホストコンピュータであり、所定のイ
ンターフェース201を介してプリンタ200に接続さ
れる。
FIG. 1 is a block diagram showing a schematic configuration of a recording apparatus according to an embodiment of the present invention. In FIG. 1, reference numeral 100 denotes a host computer, which is connected to a printer 200 via a predetermined interface 201.

【0011】プリンタ200はCPU(プリンタCP
U)202を有し、このCPU202はROM208内
のプログラムROM206に基づいてシステムバス21
0に接続される各種のデバイスとのアクセスを総括的に
制御し、プリンタエンジン205に出力情報として画像
信号を出力する。また、ROM208には上記出力画像
を生成する際に使用するフォントデータ(スケーラブル
フォントデータあるいはドットフォントデータ)207
なども記憶されている。
The printer 200 has a CPU (printer CP).
U) 202, and the CPU 202 executes the system bus 21 based on the program ROM 206 in the ROM 208.
The printer engine 205 controls the access to various devices connected to the printer engine 205 and outputs an image signal as output information to the printer engine 205. The ROM 208 stores font data (scalable font data or dot font data) 207 used when generating the output image.
Are also stored.

【0012】また、ROM208内のプログラムROM
206には、CPU202の制御プログラム、プリンタ
エンジン205へ転送されるビットマップ画像を生成す
る画像処理プログラムなどがプログラム・モジュールと
して記憶されている。このプログラム・モジュールはサ
ブルーチンとして構成され、本実施形態では入れ子にな
った呼び出し(あるプログラム・モジュールが他のプロ
グラム・モジュールを呼び出す)形態も計測の対象とす
る。
A program ROM in the ROM 208
The control program 206 stores a control program of the CPU 202, an image processing program for generating a bitmap image to be transferred to the printer engine 205, and the like as program modules. This program module is configured as a subroutine, and in the present embodiment, a nested call (a certain program module calls another program module) is also measured.

【0013】符号209は拡張インターフェースであ
り、このスロットにオプションの各種拡張インターフェ
ースボードを装着することにより、ネットワークプリン
タとして様々な用途に使用することができる。ここで
は、本発明の特徴であるプログラムROM206に格納
された特定のプログラム・モジュールの実行時間および
コール回数(実行回数、あるいは呼び出し回数)を測定
するカウンタ手段を備えた拡張インターフェースボード
300を装着している。
Reference numeral 209 denotes an extension interface. By mounting various optional extension interface boards in this slot, it can be used for various purposes as a network printer. Here, the extension interface board 300 equipped with counter means for measuring the execution time and the number of calls (the number of executions or the number of calls) of a specific program module stored in the program ROM 206 which is a feature of the present invention is mounted. I have.

【0014】この拡張インターフェースボード300の
レジスタは、物理的には拡張インターフェース上に存在
しているが、I/Oアドレスはプリンタコントローラ・
ボード上のI/O空間にマッピングされている。したが
って、このI/Oポートはプリンタコントローラ・ボー
ド上のプログラムROM206によって制御することが
できる。拡張インターフェースボード300には、外部
のデバッグ用のコンピュータ400を接続でき、コンピ
ュータ400により拡張インターフェースボード300
を用いた後述の測定を制御し、また測定結果をモニタす
ることができる。
The registers of the extension interface board 300 physically exist on the extension interface, but the I / O address is
It is mapped to the I / O space on the board. Therefore, this I / O port can be controlled by the program ROM 206 on the printer controller board. An external debugging computer 400 can be connected to the extension interface board 300, and the computer 400
Can be used to control the measurement described below and monitor the measurement result.

【0015】図2は拡張インターフェースボード300
の機能ブロック図である。図2に示すように、拡張イン
ターフェースボード300のCPU301は同様にRO
M305の制御プログラムに基づいてシステムバス31
6に接続される各種のデバイスとのアクセスを総括的に
制御し、シリアルインターフェース(あるいはイーサネ
ット(登録商標)などのネットワークインターフェース
でもよく、この部分のインターフェース方式は任意であ
る)315を介して接続されるデバッグ用のコンピュー
タ400と双方向通信することができる。
FIG. 2 shows an extension interface board 300.
3 is a functional block diagram of FIG. As shown in FIG. 2, the CPU 301 of the extension interface board 300
The system bus 31 based on the control program of M305
6 and is connected via a serial interface 315 (or a network interface such as Ethernet (registered trademark), the interface method of which is arbitrary). Bidirectional communication with the debugging computer 400.

【0016】また、図2において符号306、309、
312はプログラムROM206に格納された特定のプ
ログラム・モジュールの実行時間およびコール回数を測
定するカウンタを含むカウンタ手段であり、複数個並列
につながっている。符号307、310、313がプロ
グラム・モジュールの時間を計時するカウンタであり、
308、311、314がプログラム・モジュールのコ
ール回数を計測するカウンタである。これらのカウンタ
306、309、312…による計測は、拡張インター
フェースボード300のI/O空間に相当する所定アド
レスの特定のbitに“1”を書き込むことにより開
始、また、”0”を書き込むことにより停止させること
ができる。
In FIG. 2, reference numerals 306, 309,
Reference numeral 312 denotes counter means including a counter for measuring the execution time and the number of calls of a specific program module stored in the program ROM 206, and a plurality of the counter means are connected in parallel. Reference numerals 307, 310, and 313 are counters for counting the time of the program module,
308, 311 and 314 are counters for measuring the number of calls of the program module. The measurement by these counters 306, 309, 312,... Starts by writing "1" to a specific bit at a predetermined address corresponding to the I / O space of the extension interface board 300, and by writing "0". Can be stopped.

【0017】ここでは、プログラム・モジュールの実行
時間を厳密に測定するために、プログラム・モジュール
の実行時間およびコール回数を測定する一連の制御は拡
張インターフェースボード300上のCPU301が受
け持ち、余計な負荷をプリンタコントロールボード上の
CPU202には与えないようにしている。
Here, in order to precisely measure the execution time of the program module, a series of controls for measuring the execution time of the program module and the number of calls are taken over by the CPU 301 on the extension interface board 300, and an extra load is applied. It is not provided to the CPU 202 on the printer control board.

【0018】以下、図4に示すフローチャートを参照し
て、本発明に係る記録装置およびそのデータ転送方法に
ついて説明する。
Hereinafter, a recording apparatus and a data transfer method thereof according to the present invention will be described with reference to a flowchart shown in FIG.

【0019】図4は、本発明に係る記録装置のデータ処
理手順を示すフローチャートである。また、このフロー
チャートに係るプログラムは拡張インターフェースボー
ド300によりハードウェアで実行される。
FIG. 4 is a flowchart showing a data processing procedure of the recording apparatus according to the present invention. The program according to this flowchart is executed by hardware by the extension interface board 300.

【0020】プログラムROM206に格納するプログ
ラム・モジュールの測定を行なう場合、測定対象のプロ
グラム・モジュールの最初で拡張インターフェースボー
ド300のI/O空間に相当する所定アドレスの特定の
bitに“1”を書き込み、そして測定したいプログラ
ム・モジュールの最後で拡張インターフェースエリア内
の同じアドレスの同bitに“0”を書き込むように、
プログラムROM206にプログラムする。ここで、
“1”はカウンタイネーブル、“0”はカウンタディセ
ーブルをそれぞれ表し、bitにより複数あるカウンタ
の指定も行う。このプログラムは一つのプログラム・モ
ジュールに対してだけでなく、最大でカウンタ306、
309、312…の数だけ施す事ができる。
When measuring a program module stored in the program ROM 206, "1" is written into a specific bit at a predetermined address corresponding to the I / O space of the extension interface board 300 at the beginning of the program module to be measured. So that "0" is written to the same bit at the same address in the extended interface area at the end of the program module to be measured,
The program is programmed in the program ROM 206. here,
“1” indicates counter enable, “0” indicates counter disable, and a plurality of counters are designated by bits. This program is used not only for one program module, but also for counter 306, at most.
. 309, 312...

【0021】上記のカウンタ制御用のプログラムコード
はデバッグ用のもので、実際の製品版のプログラムから
は除去すればよい。また、プログラムROM206に格
納されるソフトウェアが明確にOS(オペレーティング
システム)とユーザプログラムに分離されたような形態
である場合には、そのOSの特定のシステムコールの回
数や実行時間を測定するような構成も可能である。たと
えば、そのOSのシステムコールを実現するカーネルル
ーチンの最初にカウンタイネーブルの“1”を出力する
コード、最後にカウンタディセーブル“0”を出力する
コードを置けばよい。また、このようなカウンタ制御用
のデータを出力するか否かを制御するための専用のシス
テムコールを用意しておく構成も考えられる。
The program code for controlling the counter is used for debugging, and may be removed from an actual product version program. When the software stored in the program ROM 206 is clearly separated into an OS (operating system) and a user program, the number of executions and the execution time of a specific system call of the OS are measured. Configurations are also possible. For example, a code for outputting a counter enable "1" at the beginning of a kernel routine for realizing the OS system call and a code for outputting a counter disable "0" at the end may be provided. A configuration is also conceivable in which a dedicated system call for controlling whether to output such counter control data is prepared.

【0022】以上のようなセットアップの後、ホストコ
ンピュータ100からプリンタ200に出力したいデー
タを出力する。インターフェース201を介して送られ
てきたコードデータはCPU202がプログラムROM
206中のプログラムを実行することにより中間コード
へ変換される。その後、中間コードに従って画像形成し
たデータをバンド処理を行ってビットマップ展開し、プ
リンタエンジン205に送る。こうした一連の流れの中
で、プログラムROM206中の測定対象プログラム・
モジュールが実行されたとする。
After the above-described setup, the host computer 100 outputs data to be output to the printer 200. The code data transmitted through the interface 201 is stored in the program ROM by the CPU 202.
The program is converted into an intermediate code by executing the program in 206. After that, the data on which the image is formed in accordance with the intermediate code is subjected to band processing to develop a bitmap, and is sent to the printer engine 205. In such a series of flows, the program to be measured in the program ROM 206
Assume that the module has been executed.

【0023】これにより、ステップS1で前記プログラ
ムROM206によって拡張インターフェースエリア内
の所定のアドレスのあるbitに“1”が書き込まれ、
時間計測カウンタにイネーブル信号が送られる。ここで
は時間計測カウンタ307にイネーブル信号が送られた
とする。そして、ステップS2においてステップS1で
指定された時間計測カウンタ307がカウントを始め、
それと同時にコール回数カウンタ308のカウントが一
つ足され保持される。ステップS3において、その後、
他の測定したいプログラム・モジュールが実行されない
場合、すなわちプログラム・モジュールが入れ子になら
ない場合は、現在計時しているプログラム・モジュール
が終了するまで、時間計測カウンタ307はカウントア
ップを続けることになる(ステップS4)。
As a result, at step S1, "1" is written by the program ROM 206 into a certain bit at a predetermined address in the extended interface area.
An enable signal is sent to the time measurement counter. Here, it is assumed that an enable signal has been sent to the time measurement counter 307. Then, in step S2, the time measurement counter 307 specified in step S1 starts counting,
At the same time, the count of the number-of-calls counter 308 is incremented by one and held. In step S3,
If another program module to be measured is not executed, that is, if the program module is not nested, the time measurement counter 307 continues counting up until the program module currently being clocked ends (step S4).

【0024】計時しているプログラム・モジュールが終
了した場合、プログラム・モジュールが実行された時と
同様に前記プログラムROM206によって拡張インタ
ーフェースエリア内の所定のアドレスのあるbitに
“0”が書き込まれ、時間計測カウンタ307にディセ
ーブル信号が送られる。ディセーブル信号が送られた時
間計測カウンタ307はステップS5においてカウント
アップを停止し、そのカウント値、すなわちプログラム
・モジュールの実行時間が同カウンタ内に保持される
(あるいは拡張インターフェースボード300のメモリ
303内のRAMに転送するようにしてもよい)。
When the program module being timed is completed, "0" is written to a bit at a predetermined address in the extended interface area by the program ROM 206 in the same manner as when the program module was executed, and A disable signal is sent to the measurement counter 307. The time measurement counter 307 to which the disable signal has been sent stops counting up in step S5, and the count value, that is, the execution time of the program module is held in the counter (or in the memory 303 of the extension interface board 300). May be transferred to the RAM).

【0025】また、ステップS3において時間計測カウ
ンタ307が計時中に、他の測定したいプログラム・モ
ジュールが実行された場合、すなわちプログラム・モジ
ュールが入れ子になっている場合(あるプログラム・モ
ジュールから他のプログラム・モジュールがコールされ
た場合)は、新たに実行されたプログラム・モジュール
の実行時間を計時する時間計測カウンタ(ここでは時間
計測カウンタ310とする)がカウントを始め、それと
同時にコール回数カウンタ311のカウントが一つ足さ
れ保存される。このプログラム・モジュールの切り換え
の制御を行なうための構成については、図3を用いて後
述する。
If another program module to be measured is executed while the time counter 307 is counting in step S3, that is, if the program module is nested (from one program module to another program module). When a module is called), a time counter (here, the time counter 310) that counts the execution time of the newly executed program module starts counting, and at the same time, the call counter 311 counts. Is added and saved. A configuration for controlling the switching of the program module will be described later with reference to FIG.

【0026】また、先に実行されていたプログラム・モ
ジュールの実行時間を計時していた時間計測カウンタ3
07がストップされ、そのカウント値が保持される(ス
テップS8)。
A time measurement counter 3 for measuring the execution time of the previously executed program module
07 is stopped, and the count value is held (step S8).

【0027】また、ステップS3と同様にステップS9
において、他の測定したいプログラム・モジュールが実
行されない場合は、現在計時しているプログラム・モジ
ュールが終了するまで、時間計測カウンタ310は計時
し続けることになる(ステップS10)。
Further, similarly to step S3, step S9
In step, when another program module to be measured is not executed, the time measurement counter 310 keeps measuring the time until the program module currently being timed ends (step S10).

【0028】ステップS9において、時間計測カウンタ
310が計時中に、その後、他の測定したいプログラム
・モジュールが実行された場合はステップS8に戻って
同様な処理を繰り返す。現在計時しているプログラム・
モジュールが終了した場合、時間計測カウンタ310が
停止され、そのカウント値が保持される。これと同時
に、ステップS8においてストップしていた時間計測カ
ウンタ307のストップを解除して、中断したカウント
値から再び計時をし始める(ステップS11)。この処
理のハードウェアの構成は後に述べることにする。
In step S9, while the time measurement counter 310 is counting time, if another program module to be measured is executed thereafter, the flow returns to step S8 to repeat the same processing. The program that is currently timing
When the module ends, the time measurement counter 310 is stopped, and the count value is held. At the same time, the stop of the time measurement counter 307 stopped in step S8 is released, and the timer starts counting again from the interrupted count value (step S11). The hardware configuration of this processing will be described later.

【0029】計時をしているカウンタがなくなるまでス
テップS9に戻って以上のような処理を繰り返す(ステ
ップS12)。
The process returns to step S9 and repeats the above processing until there is no longer any counter that is counting time (step S12).

【0030】計時しているカウンタがなくなったら、デ
バッグ用のコンピュータ400からシリアルインターフ
ェース315を介して、拡張インターフェースエリア内
の所定のアドレスにアクセスし、時間計測カウンタおよ
びコール回数カウンタにリード命令を送れば、デバッグ
用のコンピュータ400上でそれぞれのカウンタの値を
モニタすることが可能である(ステップS6)。
When there is no more time counter, the debug computer 400 accesses a predetermined address in the extended interface area via the serial interface 315 and sends a read instruction to the time measurement counter and the number of calls counter. It is possible to monitor the value of each counter on the debugging computer 400 (step S6).

【0031】その後、カウント値をクリアしたければ同
様にデバッグ用のコンピュータ400から拡張インター
フェースエリア内の所定のアドレスにアクセスし、所望
のカウンタに対してクリア命令を送れば、そのカウンタ
の値をクリアすることができる(ステップS7)。
Thereafter, if it is desired to clear the count value, the debug computer 400 similarly accesses a predetermined address in the extended interface area and sends a clear command to a desired counter to clear the counter value. Can be performed (step S7).

【0032】以上のようにして、最大で時間計測カウン
タの数だけ並行してプログラム・モジュールの実行時間
およびコール回数を計測することができる。測定結果は
デバッグ用のコンピュータ400からシリアルインター
フェース315を介して取り出すことができる。
As described above, the execution time and the number of calls of the program module can be measured in parallel up to the number of time measurement counters at the maximum. The measurement result can be taken out from the debugging computer 400 via the serial interface 315.

【0033】また、コンピュータ400からシリアルイ
ンターフェース315を介して各カウンタの計測動作を
一時停止させたり、再開させたり、計測値をクリアした
りするための適当なプログラムインターフェースを用意
する構成も考えられる。
It is also conceivable to provide an appropriate program interface for temporarily stopping or resuming the measurement operation of each counter from the computer 400 via the serial interface 315 or clearing the measured value.

【0034】ここで、図3を参照してプログラム・モジ
ュールが入れ子になった場合(あるプログラム・モジュ
ールから他のプログラム・モジュールがコールされた場
合)を取り扱うための構成について説明する。
Here, a configuration for handling a case where a program module is nested (a case where a certain program module calls another program module) will be described with reference to FIG.

【0035】プリンタ200から送られてきたカウンタ
のイネーブル信号は図3に示すように、拡張インターフ
ェース317を介してカウンタENABLE制御部50
1へ送られる。ここではプログラム・モジュールの開始
と終了を示すイネーブル信号の立ち上がりと立ち下がり
を検出する。プログラム・モジュールの開始を示すイネ
ーブル信号の立ち上がりを検出したら、立ち上がり検出
信号をLIFOメモリ505に送り、その時のイネーブ
ル信号を書き込んでプログラム・モジュールのコールさ
れた順番を記憶しておく。立ち上がり検出信号または立
ち下がり検出信号が送られたら、Dフリップフロップ5
02、503にイネーブル信号を書き込む。このように
して、プログラム・モジュールが入れ子になった時に先
に実行していたプログラム・モジュールの計時をストッ
プさせることができる。
As shown in FIG. 3, the counter enable signal sent from the printer 200 is transmitted to the counter ENABLE control unit 50 via the extension interface 317.
Sent to 1. Here, the rise and fall of the enable signal indicating the start and end of the program module are detected. When the rise of the enable signal indicating the start of the program module is detected, a rise detection signal is sent to the LIFO memory 505, the enable signal at that time is written, and the order in which the program modules are called is stored. When the rising detection signal or the falling detection signal is sent, the D flip-flop 5
02 and 503 are written with enable signals. In this way, when the program modules are nested, the timing of the previously executed program module can be stopped.

【0036】また、プログラム・モジュールの終了を示
すイネーブル信号の立ち下がりを検出したら、立ち下が
り検出信号をLIFOメモリ505に送り、記憶してい
たプログラム・モジュールのイネーブル状態を読み出
し、ストップしていたプログラム・モジュールの計時の
中断を解除して時間計測カウンタ307に送り、再び時
間計測カウンタ307をカウントさせる。すなわち、イ
ネーブルの立ち上がりで先に実行していたプログラム・
モジュールをストップさせ、イネーブルの立ち下がりで
そのストップを解除して再びカウントさせる。このカウ
ンタの再起動制御はセレクタ504を介して行なわれ
る。
When the falling edge of the enable signal indicating the end of the program module is detected, a falling edge detection signal is sent to the LIFO memory 505 to read out the stored enable state of the program module and stop the program that has been stopped. -The interruption of the time measurement of the module is released and sent to the time measurement counter 307, and the time measurement counter 307 is counted again. That is, the program executed earlier at the rise of enable
The module is stopped, the stop is released at the falling edge of the enable, and the module is counted again. Restart control of this counter is performed via the selector 504.

【0037】ここで、図5に2つのプログラム・モジュ
ールが入れ子になって実行された場合の計測の様子を具
体的に示す。
FIG. 5 specifically shows a state of measurement when two program modules are nested and executed.

【0038】図5において、まず、t1で計測したいプ
ログラム・モジュール1が実行され、計測時間カウンタ
307にイネーブル信号が送られると、時間計測カウン
タ307はカウントを開始し、同時にコール回数カウン
タ308は1になる。その後、t2で今度は別の計測し
たいプログラム・モジュール2が実行され、時間計測カ
ウンタ310にイネーブル信号が送られると、今度は時
間計測カウンタ310がカウントを開始し、同時にコー
ル回数カウンタ311が1となる。と、同時に今まで計
時していた時間計測カウンタ307にストップ信号が送
られ計時は中断する。
In FIG. 5, first, when the program module 1 to be measured at t1 is executed and an enable signal is sent to the measurement time counter 307, the time measurement counter 307 starts counting, and at the same time, the call number counter 308 is set to 1 become. Thereafter, at t2, another program module 2 to be measured is executed, and an enable signal is sent to the time measurement counter 310. Then, the time measurement counter 310 starts counting, and at the same time, the call number counter 311 becomes 1 Become. At the same time, a stop signal is sent to the time counter 307, which has been counting the time, and the counting is interrupted.

【0039】その後、t3でプログラム・モジュール2
の実行が終了して、計測時間カウンタ310にディセー
ブル信号が送られる。時間計測カウンタ310はディセ
ーブルになった瞬間にカウントを停止し、そのカウント
値を保持する。それと同時に、今まで計時を中断されて
いた時間計測カウンタ307のストップが解除され、中
断した時の値から再び計時を開始する。
Thereafter, at time t3, the program module 2
Is completed, and a disable signal is sent to the measurement time counter 310. The time measurement counter 310 stops counting at the moment of being disabled, and holds the count value. At the same time, the stop of the time measurement counter 307, which has been interrupted until now, is released, and the timer starts counting again from the value at the time of interruption.

【0040】そして、t4で再びプログラム・モジュー
ル2が実行されると、先ほどと同様に計測時間カウンタ
310にイネーブル信号が送られ、先ほどの値から再び
計時が開始される。同時にコール回数カウンタ311は
一つカウントアップされて2となる。またこの時再度時
間計測カウンタ307にストップ信号が送られ計時を中
断する。その後、t5で再びプログラム・モジュール2
の実行が終了し、時間計測カウンタ310にディセーブ
ル信号が送られると、再びカウントを開始していた時間
計測カウンタ310はカウントを停止し、その値を保持
する。それと同時に、t4で中断されていた時間計測カ
ウンタ307のストップが解除され再び計時を開始す
る。
Then, when the program module 2 is executed again at t4, an enable signal is sent to the measurement time counter 310 as before, and the time measurement is started again from the previous value. At the same time, the number-of-calls counter 311 is incremented by one to two. At this time, a stop signal is sent to the time measurement counter 307 again to interrupt the time measurement. Then, at t5, the program module 2
Is completed and the disable signal is sent to the time measurement counter 310, the time measurement counter 310 which has started counting again stops counting and holds the value. At the same time, the stop of the time measurement counter 307 interrupted at t4 is released, and the time measurement is started again.

【0041】最後に、プログラム・モジュール1の実行
が終了し、時間計測カウンタ307にディセーブル信号
が送られると、時間計測カウンタ307はカウントを停
止し、その値を保持する。
Finally, when the execution of the program module 1 is completed and a disable signal is sent to the time measurement counter 307, the time measurement counter 307 stops counting and holds the value.

【0042】以上のようにして、二つのプログラム・モ
ジュールの実行時間およびコール回数の測定を二つ同時
に並行して行なうことができる。測定したいプログラム
・モジュールの数が増えてもカウンタの数が足りていれ
ば、同様に処理できることは当然である。
As described above, the measurement of the execution time and the number of calls of two program modules can be performed simultaneously and in parallel. Even if the number of program modules to be measured increases, the same processing can be naturally performed if the number of counters is sufficient.

【0043】以上のように、本実施形態によれば、今ま
でのようにロジックアナライザを用いる必要なく、拡張
インターフェースを利用して同時に複数の特定プログラ
ム・モジュールの実行回数および実行時間を測定するこ
とができ、外部の端末から測定を制御するとともに測定
データを受信でき、システムの最適化作業の効率を大き
く改善し、快適なデバッグ環境を実現できる。
As described above, according to the present embodiment, the number of executions and the execution times of a plurality of specific program modules can be measured simultaneously using an extension interface without using a logic analyzer as in the past. It can control the measurement and receive the measurement data from the external terminal, greatly improve the efficiency of the system optimization work, and realize a comfortable debugging environment.

【0044】[0044]

【発明の効果】以上から明らかなように、本発明によれ
ば、入力された記録データに基づき、システムバスに接
続される各種のデバイスを総括的に制御して記録出力を
行なうためのプログラム・モジュールを格納したプログ
ラムROMを有する記録装置において、前記プログラム
ROMに格納されたプログラム・モジュールの実行回数
または実行時間を計測するカウンタ手段と、前記プログ
ラム・モジュールの実行が開始されたタイミングで前記
カウンタ手段を起動する制御手段を拡張インターフェー
スボード上に有する構成を採用しているので、拡張イン
ターフェースを利用して同時に複数の特定プログラム・
モジュールの実行回数および実行時間を測定することが
でき、外部の端末から測定を制御するとともに測定デー
タを受信でき、システムの最適化作業の効率を大きく改
善し、快適なデバッグ環境を実現できる、という優れた
効果がある。
As is apparent from the above description, according to the present invention, a program for controlling various devices connected to a system bus and performing recording output based on input recording data. In a recording apparatus having a program ROM storing modules, a counter means for measuring the number of times or execution time of a program module stored in the program ROM, and the counter means at a timing when the execution of the program module is started Has a control means for activating the program on the extension interface board.
It can measure the number of times and execution time of the module, control the measurement from an external terminal and receive the measurement data, greatly improve the efficiency of system optimization work, and realize a comfortable debugging environment. Has an excellent effect.

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

【図1】本発明を採用した記録装置の概略構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a recording apparatus employing the present invention.

【図2】図1の拡張インターフェースボードにおける内
部構造を示したブロック図である。
FIG. 2 is a block diagram showing an internal structure of the extension interface board of FIG.

【図3】図2のカウンタ制御部の構成を詳細に示したブ
ロック図である。
FIG. 3 is a block diagram illustrating a configuration of a counter control unit of FIG. 2 in detail;

【図4】本発明によるデータ処理手順の一例を示すフロ
ーチャート図である。
FIG. 4 is a flowchart illustrating an example of a data processing procedure according to the present invention.

【図5】本発明において2つのプログラム・モジュール
が入れ子になって実行された場合の処理の一例を示した
タイミングチャート図である。
FIG. 5 is a timing chart showing an example of processing when two program modules are nested and executed in the present invention.

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

100 ホストコンピュータ 200 プリンタ 201 インターフェース 202 CPU 203 ASIC 204 RAM 205 プリンタエンジン 206 プログラムROM 207 フォントROM 208 ROM 209 拡張インターフェース 210 システムバス 300 拡張インターフェースボード 301 CPU 302 カウンタ制御部 303 メモリ 304 RAM 305 ROM 306 カウンタ手段 307 時間計測カウンタ 308 コール回数カウンタ 309 カウンタ手段 310 時間計測カウンタ 311 コール回数カウンタ 312 カウンタ手段 313 時間計測カウンタ 314 コール回数カウンタ 315 シリアルインターフェース 316 システムバス Reference Signs List 100 host computer 200 printer 201 interface 202 CPU 203 ASIC 204 RAM 205 printer engine 206 program ROM 207 font ROM 208 ROM 209 extension interface 210 system bus 300 extension interface board 301 CPU 302 counter control unit 303 memory 304 RAM 305 ROM 306 counter means 307 Time measurement counter 308 Call number counter 309 Counter means 310 Time measurement counter 311 Call number counter 312 Counter means 313 Time measurement counter 314 Call number counter 315 Serial interface 316 System bus

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 入力された記録データに基づき、システ
ムバスに接続される各種のデバイスを総括的に制御して
記録出力を行なうためのプログラム・モジュールを格納
したプログラムROMを有する記録装置において、 前記プログラムROMに格納されたプログラム・モジュ
ールの実行回数または実行時間を計測するカウンタ手段
と、 前記プログラム・モジュールの実行が開始されたタイミ
ングで前記カウンタ手段を起動する制御手段を拡張イン
ターフェースボード上に有することを特徴とする記録装
置。
1. A recording apparatus having a program ROM storing a program module for performing general output control by controlling various devices connected to a system bus based on input recording data, Counter means for measuring the number of times or execution time of a program module stored in a program ROM, and control means for activating the counter means at the timing when the execution of the program module is started, are provided on an extension interface board. A recording device characterized by the above-mentioned.
【請求項2】 前記カウンタ手段による計測を一時停止
させるストップ手段、および計測データを消去するクリ
ア手段を有することを特徴とする請求項1に記載の記録
装置。
2. The recording apparatus according to claim 1, further comprising stop means for temporarily stopping the measurement by said counter means, and clear means for erasing the measurement data.
【請求項3】 前記カウンタ手段を複数個有し、同時に
複数のプログラム・モジュールの実行回数および実行時
間を計数することを特徴とする請求項1に記載の記録装
置。
3. The recording apparatus according to claim 1, further comprising a plurality of said counter means, wherein the number of executions and the execution time of a plurality of program modules are counted at the same time.
【請求項4】 あるプログラム・モジュールから別のプ
ログラム・モジュールが呼び出されたか否かを判定する
判定手段を有し、この判定手段の判定結果に応じて、あ
るプログラム・モジュールから別のプログラム・モジュ
ールが呼び出された場合は先に第1のカウンタ手段によ
り実行されていたプログラム・モジュールの計測を一時
停止させ、呼び出されたプログラム・モジュールの計測
を第2のカウンタ手段により実行させることを特徴とす
る請求項1に記載の記録装置。
4. It has a judging means for judging whether or not another program module is called from a certain program module, and according to the judgment result of this judging means, from one program module to another program module. Is called, the measurement of the program module previously executed by the first counter means is temporarily stopped, and the measurement of the called program module is executed by the second counter means. The recording device according to claim 1.
【請求項5】 前記の呼び出されたプログラム・モジュ
ールの実行が終了した時、前記第2のカウンタ手段の計
測を停止させ、一時停止させていた前記第1のカウンタ
によるプログラム・モジュールの計測を再起動すること
を特徴とする請求項4に記載の記録装置。
5. When the execution of the called program module is completed, the measurement of the second counter means is stopped, and the measurement of the program module by the first counter which has been temporarily stopped is restarted. The recording device according to claim 4, wherein the recording device is activated.
【請求項6】 前記カウンタ手段の計測データを格納す
る格納手段が拡張インターフェースボード上に設けら
れ、前記格納手段に格納されたプログラム・モジュール
実行回数または実行時間に関する計測データを外部装置
に転送する所定のインターフェース手段を有することを
特徴とする記録装置。
6. A storage means for storing the measurement data of said counter means is provided on an extension interface board, and said predetermined means for transferring the measurement data relating to the number of executions or execution time of the program module stored in said storage means to an external device. A recording apparatus comprising:
【請求項7】 前記インターフェース手段を介して、外
部装置から前記カウンタ手段によるプログラム・モジュ
ールの計測を一時停止させ、また、前記格納手段に格納
されたプログラム・モジュール実行回数または実行時間
に関する計測データをクリアすることを特徴とする請求
項6記載の記録装置。
7. The method according to claim 7, wherein the measurement of the program module by the counter means is temporarily stopped by an external device via the interface means, and the measurement data relating to the number of executions or the execution time of the program module stored in the storage means is transmitted. 7. The recording apparatus according to claim 6, wherein clearing is performed.
JP2001042640A 2001-02-20 2001-02-20 Recording device Withdrawn JP2002244890A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001042640A JP2002244890A (en) 2001-02-20 2001-02-20 Recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001042640A JP2002244890A (en) 2001-02-20 2001-02-20 Recording device

Publications (1)

Publication Number Publication Date
JP2002244890A true JP2002244890A (en) 2002-08-30

Family

ID=18904906

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001042640A Withdrawn JP2002244890A (en) 2001-02-20 2001-02-20 Recording device

Country Status (1)

Country Link
JP (1) JP2002244890A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009519520A (en) * 2005-12-16 2009-05-14 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system and computer program for measuring usage of software products based on real-time benchmarking of processing power
US9619361B2 (en) 2013-03-18 2017-04-11 Fujitsu Limited Performance profiling apparatus and performance profiling method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009519520A (en) * 2005-12-16 2009-05-14 インターナショナル・ビジネス・マシーンズ・コーポレーション Method, system and computer program for measuring usage of software products based on real-time benchmarking of processing power
US8799870B2 (en) 2005-12-16 2014-08-05 International Business Machines Corporation Method system and computer program for metering usage of software products based on real-time benchmarking of processing power
US9619361B2 (en) 2013-03-18 2017-04-11 Fujitsu Limited Performance profiling apparatus and performance profiling method

Similar Documents

Publication Publication Date Title
JP7313381B2 (en) Embedded scheduling of hardware resources for hardware acceleration
KR950009455A (en) Digital signal processor
JP5308098B2 (en) Information processing apparatus test program and method
US10705993B2 (en) Programming and controlling compute units in an integrated circuit
US20060143363A1 (en) Module interface handler for controller area network (CAN) communication module
US7711874B1 (en) Usage of EHCI companion USB controllers for generating periodic events
JP2006092029A (en) Microcomputer and trace control method
US7774513B2 (en) DMA circuit and computer system
JP2002244890A (en) Recording device
US20060193260A1 (en) Preemptive packet flow controller
JP2003263339A (en) Debug function-incorporated microcomputer
US11847461B2 (en) Out-of-order input / output write
KR102668599B1 (en) Embedded scheduling of hardware resources for hardware acceleration
JP2000155701A (en) Debugging circuit
JP2954006B2 (en) Emulation device and emulation method
JP2004252572A (en) Recording device
US6282600B1 (en) Method and apparatus of resolving conflicting register access requests from a service processor and system processor
KR0145932B1 (en) Dma controller in high speed computer system
JP2679440B2 (en) Information processing device
CN106598755B (en) Processor and DCC communication system
KR100259585B1 (en) Dma controller
JPH07149002A (en) Printer
JPH0644193A (en) I/o register access system
JP3022905B2 (en) Printing device
JPH10161970A (en) Recording device

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20070209

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080513