JPH0740213B2 - Computer system - Google Patents

Computer system

Info

Publication number
JPH0740213B2
JPH0740213B2 JP60216474A JP21647485A JPH0740213B2 JP H0740213 B2 JPH0740213 B2 JP H0740213B2 JP 60216474 A JP60216474 A JP 60216474A JP 21647485 A JP21647485 A JP 21647485A JP H0740213 B2 JPH0740213 B2 JP H0740213B2
Authority
JP
Japan
Prior art keywords
clock
selection circuit
timer
signal
program
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.)
Expired - Lifetime
Application number
JP60216474A
Other languages
Japanese (ja)
Other versions
JPS6275822A (en
Inventor
俊和 今野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP60216474A priority Critical patent/JPH0740213B2/en
Publication of JPS6275822A publication Critical patent/JPS6275822A/en
Publication of JPH0740213B2 publication Critical patent/JPH0740213B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はソフトウェアタイマを持つコンピュータシステ
ムに関する。
Description: TECHNICAL FIELD OF THE INVENTION The present invention relates to a computer system having a software timer.

〔発明の技術的背景とその問題点〕[Technical background of the invention and its problems]

マイクロプロセッサ(MPU)は開発の過程でスピードア
ップがはかられる。例えばインテル社の16ビットMPU808
6は先ず5MHZ(メガヘルツ)クロックのものが発表さ
れ、その後8MHZクロックのものにグレードアップされ
た。ザイログ社の8ビットMPU,Z80は2MHZ版でスタート
し、これも4MHZから6MHZへとグレードアップされた。こ
れらのMPUを使ったシステムではMPUの性能に合せてクロ
ック周波数をあげシステムの性能アップを行うのが通例
である。
Microprocessors (MPUs) can speed up the process of development. For example Intel 16-bit MPU808
The 6 was first announced with 5MHZ (megahertz) clock, and then upgraded to 8MHZ clock. Zilog's 8-bit MPU, Z80 started with a 2MHZ version, which was also upgraded from 4MHZ to 6MHZ. In systems using these MPUs, it is customary to raise the clock frequency according to the performance of the MPU to improve the system performance.

この場合に唯一問題となるのがソフトウェアタイマルー
チンである。即ち、ある一定時間ウェイトさせる(例え
ば、フロッピィディスクドライブのセットリングタイム
を確保するといった場合)とき、MPUクロックが4MHZの
場合と8MHZの場合とではループ回数を1対2としなけれ
ばならない。また8MHZを想定してループ回数を設定して
おくと、4MHZでは2倍のウェイト時間になってしまう。
従って、周波数が変わる毎にループ回数を変更する必要
があり、プログラマの負担となっていたものである。
The only problem in this case is the software timer routine. That is, when waiting for a certain period of time (for example, when securing the settling time of the floppy disk drive), the number of loops must be 1 to 2 depending on whether the MPU clock is 4 MHz or 8 MHz. If the number of loops is set assuming 8 MHz, the wait time will be doubled at 4 MHz.
Therefore, it is necessary to change the number of loops each time the frequency changes, which is a burden on the programmer.

〔発明の目的〕[Object of the Invention]

本発明は上記事情に基づいてなされたものであり、ソフ
トウェアタイマ部分のクロックスピードをダイナミック
に変更することにより、プログラマの負担を軽減したコ
ンピュータシステムを提供することを目的とする。
The present invention has been made based on the above circumstances, and an object of the present invention is to provide a computer system in which the load on the programmer is reduced by dynamically changing the clock speed of the software timer portion.

〔発明の概要〕[Outline of Invention]

本発明は、上記目的を実現するため、この種コンピュー
タシステムが従来から持つコンポーネントに更にクロッ
ク選択回路を付加して入力される複数種のクロックのい
ずれか1個をプロセッサユニットに対し供給する構成に
すると共に、カウント値をセットした後、上記選択回路
が割当てられているポートをアクセスし、クロックをタ
イマ用のものに切換え、タイマ終了後にもとのクロック
に切換える処理を行なうプログラムを用意した。該プロ
グラムに従い、ダイナミックにソフトウェアタイマのク
ロックスピードを固定とし、ソフトウェアタイマをクロ
ックスピードによって再作成する作業を不要としたもの
である。
In order to achieve the above object, the present invention has a configuration in which any one of a plurality of types of clocks input by further adding a clock selection circuit to the conventional components of this type computer system is supplied to the processor unit. At the same time, after setting the count value, a program is prepared for accessing the port to which the selection circuit is assigned, switching the clock to the one for the timer, and switching to the original clock after the timer ends. According to the program, the clock speed of the software timer is dynamically fixed, and the work of recreating the software timer at the clock speed is unnecessary.

このことによりプログラムの変更が不要となり、ソフト
ウェアプログラマの負担が軽減される。
This eliminates the need to change the program and reduces the burden on the software programmer.

〔発明の実施例〕Example of Invention

以下、図面を使用して本発明実施例につき詳細に説明す
る。第1図は本発明の実施例を示すブロック図である。
図において、はクロック切換え回路であり、周波数の
異なるクロックA、クロックBがそれぞれライン2,3を
介して供給される。ライン3を介して供給される信号は
制御信号であり、クロックA,Bのいずれか一方をライン
5を介して選択出力する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention.
In the figure, reference numeral 1 is a clock switching circuit, and clocks A and B having different frequencies are supplied via lines 2 and 3, respectively. The signal supplied via the line 3 is a control signal, and one of the clocks A and B is selectively output via the line 5.

第2図は、タイマ部分のクロックスピードを固定とする
プログラムの動作フローを示す。該プログラムは、カウ
ントをセットした後に第1図に示したクロック選択回路
が割当てられているポートをアクセスし、クロックを
タイマ用のものに切換え、タイマ終了後に元のクロック
に切換える処理を行なうものである。詳細は後述する。
FIG. 2 shows an operation flow of a program in which the clock speed of the timer part is fixed. The program is the clock selection circuit shown in FIG. 1 after setting the count.
The port to which 1 is assigned is accessed, the clock is switched to that for the timer, and the process of switching to the original clock after the timer is completed is performed. Details will be described later.

第3図は、第1図に示したクロック選択回路の具体的
回路構成を示す図である。クロック選択回路は、5個
のDタイマフリップフロップ11,12,13,14,15と2個のオ
アゲート16,17、1個のアンドゲート18から成る。図
中、第1図に付された記号あるいは番号と同一記号ある
いは番号の付されたものは第1図のそれと同じものとす
る。又、Dnはデータビット、OUTはOUT命令により到来す
る信号を示す。
FIG. 3 is a diagram showing a specific circuit configuration of the clock selection circuit 1 shown in FIG. The clock selection circuit 1 includes five D timer flip-flops 11, 12, 13, 14, 15 and two OR gates 16, 17 and one AND gate 18. In the figure, the same symbols or numbers as the symbols or numbers given in FIG. 1 are the same as those in FIG. Further, Dn indicates a data bit, and OUT indicates a signal which arrives by the OUT instruction.

第4図は本発明実施例の動作を示すタイミングチャート
である。図中、第3図に付された番号と同一番号の付さ
れたブロックもしくはラインは第3図のそれと同じもの
とする。
FIG. 4 is a timing chart showing the operation of the embodiment of the present invention. In the figure, blocks or lines with the same numbers as those in FIG. 3 are the same as those in FIG.

以下、本発明実施例の動作につき詳細に説明する。ま
ず、第1図、第2図を用いて概略動作から説明する。ク
ロック選択回路にはクロックAとクロックBがそれぞ
れ、ライン2,3を介し入力されている。クロックAとク
ロックBは周波数の異なるクロックである。通常、クロ
ックA又はクロックBのどちらか一方のクロック信号出
力(ライン5)にてCPUが動作している。他方のクロッ
クに切換えるには制御信号(ライン4)をあるポートア
ドレスに割り当てておき、プログラムにてそのポートを
アクセスし制御信号を反転させることによって行なう。
即ち、あるプログラムにおいてタイマ(ループ)に相当
する部分(第2図に示すフローチャートのwait)でカウ
ント回数をセットした後に第1図に示したクロック選択
回路が割り当てられているポートをアクセスしプログ
ラム設計時の論理クロックに必要に応じて切換えること
によって実際にループする間のクロックを固定する。ル
ープが終了したならば、またポートをアクセスし通常の
CPUクロックに切換えて続く処理を行なうようにする。
Hereinafter, the operation of the embodiment of the present invention will be described in detail. First, a schematic operation will be described with reference to FIGS. 1 and 2. The clock A and the clock B are input to the clock selection circuit 1 via lines 2 and 3, respectively. The clock A and the clock B are clocks having different frequencies. Normally, the CPU is operating with the clock signal output (line 5) of either clock A or clock B. To switch to the other clock, a control signal (line 4) is assigned to a certain port address, and that port is accessed by a program to invert the control signal.
That is, after a count number is set in a part (wait in the flowchart shown in FIG. 2) corresponding to a timer (loop) in a certain program, the port to which the clock selection circuit 1 shown in FIG. The clock is fixed during the actual loop by switching to the logical clock at the time of design as necessary. When the loop is finished, access the port again and
Switch to the CPU clock and perform the subsequent processing.

以下、第3図、第4図を用いてクロック切換えの動作に
つき詳細に説明する。
The clock switching operation will be described in detail below with reference to FIGS. 3 and 4.

フリップフロップ11はUT命令によりデータビットDnの
到来を待ってセット/リセットされ、クロック選択信号
(ライン4)を記憶する。ここでライン4を伝播する信
号が“High"レベルであるとき、フリップフロップ12〜1
5はセット状態にあり、オアゲート16の一方は“High"レ
ベルであるのでクロックAは無視されている。オアゲー
ト17の一方の入力は“Low"レベルにあるので、クロック
13がアンドゲート18を通してライン5に出力されてい
る。UT命令によりフリップフロップ11がリセットされ
ると、クロックBの立上りでフリップフロップ14及び15
がリセットされる。フリップフロップ15がリセットされ
ると、オアゲート17の一方が“High"レベルになりクロ
ックBが無視される。フリップフロップ12のプリセット
が“High"レベルとなるとクロックAの立上りでフリッ
プフロップ12及び13がリセットされ、オアゲート16の一
方が“Low"レベルとなるので、クロックAがアンドゲー
ト18を通してライン5に出力されるようになる。フリッ
プフロップ11がセットされるときはこの逆の動作でクロ
ックAからクロックBへの切換えが行われる。
The flip-flop 11 is set / reset by the UT instruction waiting for the arrival of the data bit Dn, and stores the clock selection signal (line 4). Here, when the signal propagating on the line 4 is at the “High” level, the flip-flops 12 to 1
Clock 5 is ignored because clock 5 is in the set state and one of the OR gates 16 is at the "High" level. Since one input of the OR gate 17 is at "Low" level, the clock
13 is output to the line 5 through the AND gate 18. When the flip-flop 11 is reset by the UT instruction, the flip-flops 14 and 15 are turned on at the rising edge of the clock B.
Is reset. When the flip-flop 15 is reset, one of the OR gates 17 becomes "High" level and the clock B is ignored. When the preset of the flip-flop 12 becomes "High" level, the flip-flops 12 and 13 are reset at the rising edge of the clock A, and one of the OR gates 16 becomes "Low" level, so that the clock A is output to the line 5 through the AND gate 18. Will be done. When the flip-flop 11 is set, the clock A is switched to the clock B by the opposite operation.

この回路の特徴は切換えの時に高周波数のクロック(こ
の実施例ではクロックA)のパルス幅より狭いパルスと
ならないことにより、ダイナミックに切換えを行っても
MPUの動作が保証されることである。クロックの遅いシ
ステムではクロック選択回路を持たさなければ切換え
のためのUT命令はNOオペレーションとなる。故にソフ
トウェアは第2図に示すようにコーディングさえしてお
けば性能アップのためにクロック周波数を上げてもルー
プ回数を変更する必要はなくなる。
The characteristic of this circuit is that the pulse width is not narrower than the pulse width of the high-frequency clock (clock A in this embodiment) at the time of switching, so that even if switching is performed dynamically.
The operation of the MPU is guaranteed. In a system with a slow clock, the UT instruction for switching is a NO operation unless the clock selection circuit 1 is provided. Therefore, if the software is coded as shown in FIG. 2, it is not necessary to change the number of loops even if the clock frequency is increased to improve the performance.

〔発明の効果〕〔The invention's effect〕

以上説明の様に、上述したクロック選択回路を付加し、
且つフローチャートで示すタイマ部のプログラムを用意
することにより以下に示す効果が得られる。即ち、クロ
ックAにてCPUが動作していると仮定し、そのクロック
スピードにてクロックBのスピードで作られたソフトウ
ェアタイマを実行すると論理的なWait時間が確保できな
くなる。(クロックAがクロックBより速ければWait時
間は短かくなる。)従来はクロックが変わるごとにタイ
マにプログラムを変更しなければならなかったが、本発
明の様に選択回路を付加して複数のクロックを入力して
おき、CPUのクロックがスピードアップされてもタイマ
に使われているクロックが選択回路に入力されていれば
タイマ部のクロックは常に固定されることになり、従っ
てプログラムの変更が不要となるものである。
As described above, adding the clock selection circuit described above,
In addition, the following effects can be obtained by preparing the program of the timer unit shown in the flowchart. That is, assuming that the CPU is operating at the clock A and executing the software timer made at the speed of the clock B at that clock speed, the logical Wait time cannot be secured. (If the clock A is faster than the clock B, the Wait time becomes shorter.) Conventionally, the program had to be changed in the timer each time the clock changed, but a plurality of selection circuits are added by adding a selection circuit as in the present invention. Even if the clock is input and the CPU clock is speeded up, if the clock used for the timer is input to the selection circuit, the clock of the timer section will always be fixed, so the program change It is unnecessary.

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

第1図は本発明の実施例を示すブロック図、第2図はタ
イマ部分のクロックのスピードを固定とするプログラム
の動作フローを示す図、第3図は第1図に示したクロッ
ク選択回路の詳細な回路構成を示す図、第4図は本発明
実施例の動作を示すタイミングチャートである。 ……クロック選択回路、11〜15……Dタイプフリップ
フロップ、16,17……オアゲート、18……アンドゲー
ト。
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a diagram showing an operation flow of a program in which the clock speed of a timer portion is fixed, and FIG. 3 is a diagram showing the clock selection circuit shown in FIG. FIG. 4 is a diagram showing a detailed circuit configuration, and FIG. 4 is a timing chart showing the operation of the embodiment of the present invention. 1 ... Clock selection circuit, 11 to 15 ... D type flip-flop, 16, 17 ... OR gate, 18 ... AND gate.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】プロセッサユニットに対して所定周波数の
動作クロックを供給し、このクロックに基づいて各種プ
ログラムを動作させるコンピュータシステムにおいて、 通常のプログラムを動作させる第1のクロックと、ソフ
トウエアタイマループを動作させる第2のクロックとが
入力され、所定の信号によりいずれか一方のクロックを
プロセッサユニットに出力するクロック選択回路と、 ソフトウエアタイマループ動作前に、プロセッサユニッ
トに供給されるクロックを前記第1のクロックから前記
第2のクロックに切り換える第1の信号と、ソフトウエ
アタイマループ終了後は、前記クロック選択回路から出
力されるクロックを前記第2のクロックから前記第1の
クロックに切り換える第2の信号を出力する手段と、 を具備したことを特徴とするコンピュータシステム。
1. In a computer system for supplying an operating clock of a predetermined frequency to a processor unit and operating various programs based on this clock, a first clock for operating a normal program and a software timer loop are provided. The second clock to be operated is input and a clock selection circuit that outputs one of the clocks to the processor unit according to a predetermined signal, and the clock supplied to the processor unit before the software timer loop operation is the first clock. From the second clock to the second clock, and a second signal that switches the clock output from the clock selection circuit from the second clock to the first clock after the end of the software timer loop. And a means for outputting a signal. Computer systems that.
JP60216474A 1985-09-30 1985-09-30 Computer system Expired - Lifetime JPH0740213B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60216474A JPH0740213B2 (en) 1985-09-30 1985-09-30 Computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60216474A JPH0740213B2 (en) 1985-09-30 1985-09-30 Computer system

Publications (2)

Publication Number Publication Date
JPS6275822A JPS6275822A (en) 1987-04-07
JPH0740213B2 true JPH0740213B2 (en) 1995-05-01

Family

ID=16689011

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60216474A Expired - Lifetime JPH0740213B2 (en) 1985-09-30 1985-09-30 Computer system

Country Status (1)

Country Link
JP (1) JPH0740213B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6409600B2 (en) * 2015-02-05 2018-10-24 富士通株式会社 Timer control device, wireless communication device, and timer control method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6020224A (en) * 1983-07-15 1985-02-01 Hitachi Ltd Semiconductor integrated circuit device
JPS61109126A (en) * 1984-10-31 1986-05-27 Mitsubishi Electric Corp One-chip microcomputer

Also Published As

Publication number Publication date
JPS6275822A (en) 1987-04-07

Similar Documents

Publication Publication Date Title
US5041962A (en) Computer system with means for regulating effective processing rates
US5887129A (en) Asynchronous data processing apparatus
US6047381A (en) Variable speed controller
US4095268A (en) System for stopping and restarting the operation of a data processor
US5734927A (en) System having registers for receiving data, registers for transmitting data, both at a different clock rate, and control circuitry for shifting the different clock rates
EP0110227B1 (en) Control memory organization
JPH02123449A (en) Computer system having clock speed interrupted and interrupt control thereof
JPH0740213B2 (en) Computer system
JPH0573296A (en) Microcomputer
JP2744431B2 (en) Computer equipment
JPH01112335A (en) Electronic equipment
JP2591211B2 (en) High-speed interrupt processing device
JP2870812B2 (en) Parallel processor
JPS61136115A (en) Basic clock generating circuit of microcomputer system
JPH03246628A (en) Microprocessor control type information processor
CA1209273A (en) High-speed auxiliary computer plug-in units
JPH02252047A (en) Microprocessor
JPH0635794A (en) Method and device for controlling timing in computer system
JPS63269231A (en) Interruption priority control system
JPH06282353A (en) Timer device having time shortening function
JPS61166631A (en) Microprogram control processor
JPS61241843A (en) Information processor
JPH0612254A (en) Information processor
JPH05342142A (en) Direct memory access control system
JPS6120139A (en) Interruption control system