JPS59157751A - Program counter control circuit - Google Patents

Program counter control circuit

Info

Publication number
JPS59157751A
JPS59157751A JP555884A JP555884A JPS59157751A JP S59157751 A JPS59157751 A JP S59157751A JP 555884 A JP555884 A JP 555884A JP 555884 A JP555884 A JP 555884A JP S59157751 A JPS59157751 A JP S59157751A
Authority
JP
Japan
Prior art keywords
counter
program counter
program
executed
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP555884A
Other languages
Japanese (ja)
Inventor
Shuichi Torii
周一 鳥居
Tamotsu Arai
荒井 保
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP555884A priority Critical patent/JPS59157751A/en
Publication of JPS59157751A publication Critical patent/JPS59157751A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To reduce the number of steps of a program and improve the operation speed by stopping counting-up of the address in a program counter while the same instruction is executed for plural times. CONSTITUTION:Information indicating what times the same instruction should be executed repeatedly is written in a counter 3. A flip-flop 5 is set to stop temporarily a program counter 1. The program counter 1 is inhibited from incrementing by an output Q of a flip-flop 5. Contents of the counter 3 are decremented each time when one instruction cycle is executed. When a prescribed number of processings are terminated to generate a borrow output from the counter 3, the flip-flop 5 is reset. While the instruction is executed a required number of times, counting-up of the program counter 1 is inhibited with respect to hardware.

Description

【発明の詳細な説明】 本発明にプログラムの内蔵式電子計算機に用いるための
プログラムカウンタ一時停止回路に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a program counter temporary stop circuit for use in an electronic computer with a built-in program.

予め定められた順序に従って各命令を計算機において実
行させるにあたって、上記命令を上記順序に従ってRO
M(リードオンリメモリ)あるい1−CRAM(ランダ
ムアクセスメモリ)に記憶しておぎ、アドレスカワンタ
とも称されるプログラムカウンタを通じて順次命令を読
み出し、実行してゆく。そしてこの場合、一般にはプロ
グラムカウンタの内容をインクリメンタによって一命令
実行する毎に1つずつ増加させることにより順次命令の
実行を行うようにしである。
In order to execute each instruction in a computer according to a predetermined order, the above instructions are RO'd in the above order.
The commands are stored in M (Read Only Memory) or 1-CRAM (Random Access Memory), and are sequentially read out and executed through a program counter, also called an address counter. In this case, generally the contents of the program counter are incremented by one each time one instruction is executed by an incrementer, so that the instructions are executed sequentially.

ところで、電子卓上計算機、その他多桁の数値を演算処
理する計算機に3いてぼ、−個の演算処理をなすにあた
って同一の命令が桁数分実行する必要が頻出する。例え
ば、95405231 +43159867を行う場合
、1+7.3+6という風に対応する桁同志の和という
命令な9回繰返すということが必要である。
By the way, in electronic desktop calculators and other computers that process multi-digit numerical values, it is often necessary to execute the same instruction for each digit number when performing arithmetic processing of -. For example, to perform 95405231 +43159867, it is necessary to repeat the command 9 times, which is the sum of the corresponding digits, such as 1+7.3+6.

この場合、従来一般の演算方式によれば、プログラムに
より命令の実行必要回数を設定しておぎ。
In this case, according to conventional arithmetic methods, the number of times an instruction needs to be executed is set by a program.

該当命令の一回の実行を終える毎に設定された数値(実
行必要回数)を一つ減少させ、0になるまで該当命令の
実行を繰返させるという方法がとられた。
A method was adopted in which a set numerical value (necessary number of executions) was decremented by one each time the corresponding instruction was executed once, and the execution of the corresponding instruction was repeated until it reached 0.

ところで、この場合、−mの演算処理をするにあたって
、何回もプログラムカウンタを書き換える必要があり、
プログラムに必要なステップ数が増し、演算速度も遅く
なるという問題がある。
By the way, in this case, in order to process -m, it is necessary to rewrite the program counter many times.
There are problems in that the number of steps required for the program increases and the calculation speed becomes slower.

かかる問題を解決するのに、予め必要とされる実行回数
を記憶し、七の回数分の実行を終える間プログラムカウ
ンタの内容を一定のアドレス番地に固定することにより
プログラムのステップ数を減少することが極めて有効で
ある。本発明はこのような認識の下になされたもので、
任意の回数分プログラムカウンタのアドレス番地を固定
できるプログラムカウンタ一時停止回路を提供すること
を目的とするものである口 上記目的を達成するだめの本発明の一実施態様ぼ、カウ
ンタ、クリメンタ及びフリップフロップ回路を有し、任
意の数値に書き込むことのできるカウンタのボロー(又
はキャリー)出力により。
To solve this problem, the number of steps in the program can be reduced by storing the required number of executions in advance and fixing the contents of the program counter at a fixed address while the number of executions is completed. is extremely effective. The present invention was made with this recognition in mind.
An object of the present invention is to provide a program counter temporary stop circuit that can fix the address of a program counter for an arbitrary number of times.An embodiment of the present invention to achieve the above object is a counter, a climenter, and a flip-flop. With the borrow (or carry) output of a counter that has circuitry and can be written to any number.

プログラムカウンタのインクリメント(又はデクリメン
ト)用回路を、上記カウンタに書き込まれた数値をカウ
ントし7終るまでは停止させ、カウントし終えた後にそ
の停止を解除するように制御してなることを特徴とする
ものである。
The circuit for incrementing (or decrementing) the program counter is controlled to stop counting the numerical value written in the counter until it reaches 7, and to release the stopping after the counting is finished. It is something.

以下本発明を実施例により説明する。The present invention will be explained below with reference to Examples.

第1図は本発明の一実施例に係るプログラムカウンタ一
時停止回路の基本的構成図であろう1μプログラムカウ
ンタで実行アドレス番地を格納するものであるう2ぼプ
ログラムカウンタな+1するインクリメンタで、この+
1動作によって一実行を終える毎にプログラムカウンタ
が書き換えられ、RAMにプログラムされた順序に命令
を実行するのに寄与する。3に任意の数値を書き。
FIG. 1 is a basic configuration diagram of a program counter temporary stop circuit according to an embodiment of the present invention. It is a 1μ program counter that stores an execution address address. This +
The program counter is rewritten each time one execution is completed by one operation, contributing to executing instructions in the order programmed into the RAM. Write any number in 3.

込むカウンタ、4はカウンタ3を−1するデクリメンタ
、5にセットカウンタ信号SCによりセットされ、カウ
ンタからのボロー出力によりリセットされるフリップフ
ロップ回路、6にプログラムを記憶するRAM、7ぼR
AMから取り出された命令を実行する演算回路ALUで
ある。8に示す部分がプログラムカウンタ一時停止回路
となる。
4 is a decrementer for decrementing the counter 3 by 1; 5 is a flip-flop circuit that is set by the set counter signal SC and reset by the borrow output from the counter; 6 is a RAM for storing a program;
This is an arithmetic circuit ALU that executes instructions retrieved from AM. The part shown at 8 becomes a program counter temporary stop circuit.

第2図ぽプログラムカウンタ一時停止回路に関するタイ
ムチャート図であり5これを参照して回路動作を説明す
る。例えば9命令分プログラムカウンタの格納内容を一
定のアドレス番地P+1に固定するとぎはカウンタ3に
9ヶ予め書き込んでおき、プログラムカウンタを一時停
止させるときにセットカウンタ信号SCによってフリッ
プフロップ5をセットする。そしてフリップフロップ5
の出力Qによってプログラムカウンタlがインクリメン
トされんとするのを禁止(1nhibit) jる。
FIG. 2 is a time chart relating to the program counter temporary stop circuit, and the operation of the circuit will be explained with reference to this. For example, to fix the stored contents of the program counter for 9 instructions at a fixed address P+1, 9 instructions are written in the counter 3 in advance, and when the program counter is temporarily stopped, the flip-flop 5 is set by the set counter signal SC. and flip flop 5
Inhibit (1nhibit) the program counter l from being incremented by the output Q of j.

禁止はカウンタ3側からのボロウ出力によってリセット
されるまで続くうすなわち、カウンタ3にセットされた
9がセットカウンタ信号SC力泳1j加された後の最初
のタイミングで−1されて8となり、次いで7となると
いう風に1命令サイクル毎に順次カウンタ内容が−っず
っ減少し、−1になったときボロウ出力か生じ、フリッ
プフロップ5をリセットするのである。
The prohibition continues until it is reset by a borrow output from the counter 3 side, that is, the 9 set in the counter 3 is decremented by 1 to become 8 at the first timing after the set counter signal SC force 1j is added, and then becomes 7. In this way, the contents of the counter are sequentially decremented by - every instruction cycle, and when it reaches -1, a borrow output occurs and the flip-flop 5 is reset.

このようにすれは、必要な数命令サイクルの間プログラ
ムカウンタのアドレス番地を一定の値に固定し、ハード
ウェア的手段によって同一命令を桁数分hif!!、−
1ことができるのである。したがってプログラムのステ
ップ数が著しく減少する。
In this way, the address of the program counter is fixed at a constant value for the required number of instruction cycles, and the same instruction is executed by hif! by hardware means for the number of digits! ! ,−
1 can be done. The number of program steps is therefore significantly reduced.

従来の場合と本発明による場合とをこのステップ数に関
しである一つの例について比較してみると次のようにな
る。
A comparison of the conventional case and the case according to the present invention with respect to the number of steps will be as follows.

演算前のRAMの状態を表1に示す。Table 1 shows the state of the RAM before calculation.

表1 そして、RAM(0、Y)+RAM(2、Y)Y=0〜
8の結果をRAM(2、Y)、Y=0〜8に入れて表2
に示すようにする。
Table 1 And RAM (0, Y) + RAM (2, Y) Y = 0~
Put the results of 8 into RAM (2, Y), Y = 0 to 8 and write in Table 2.
Do as shown below.

表2 このような演算処理をする場合、従来においてげ下記の
プログラムによって行われていた。
Table 2 In the past, such arithmetic processing was performed using the following program.

0.1−X、Y (X、Y l+(2、Y)− (2,Y)、Yl1−Y (X、Y)+(2,Y)− (2,Yl、Yl1−Y (X、Y )+(2、Y )、 − (2,Y)、Yl1−Y (X、Y)+(2,Y)− (2,Y)、Yl 1−Y (X、Y)+(2,Y)− (2,Y)、Yl1−Y (X、Y )+(2、Y )− (2、Y )、 Yl1−Y (X、Y )+(2、Y > − (2,Y)、Yl1−Y (X、Y )十(2、Y ) − (2、Y )、 Yl1−Y (X、Y)+(2,Y)− (2,Y)、Yl1−Y すなわち10命令というプログラムステップ数が従来に
おいて必要とされた。
0.1-X, Y (X, Y l+(2, Y)- (2, Y), Yl1-Y (X, Y)+(2, Y)- (2, Yl, Yl1-Y (X, Y ) + (2, Y ), - (2, Y), Yl1-Y (X, Y) + (2, Y) - (2, Y), Yl 1-Y (X, Y) + (2, Y) - (2, Y), Yl1-Y (X, Y) + (2, Y) - (2, Y), Yl1-Y (X, Y) + (2, Y > - (2, Y) , Yl1-Y (X, Y) ten (2, Y) - (2, Y), Yl1-Y (X, Y) + (2, Y) - (2, Y), Yl1-Y That is, 10 instructions. The number of program steps required in the past.

しかし、同じ演算処理を本発明によれは、プログラムカ
ウンタに格納されたアドレス番地を一定値に固定できる
ので、下記の3命令で行うことができる。
However, according to the present invention, the address stored in the program counter can be fixed to a constant value, so the same arithmetic processing can be performed using the following three instructions.

0.1−X、Y SC9(カウンタに9をセットせよ) (X、Y)+(2、Y )− (2、Y )、Yl1−Y このようにプログラムステップ数が1/3以下となる。0.1-X, Y SC9 (Set 9 on the counter) (X, Y) + (2, Y) - (2, Y), Yl1-Y In this way, the number of program steps is reduced to ⅓ or less.

本発明u S −S (Storage −Stora
ge )形式でかつBCD演算が1インストラクシヨン
で実行できるものに有効であり、この場合を従来におけ
る3 −R(Storage −Register )
  形式の場合と比較するとステップ数は1/10以下
に減少し、演算時間は約1/20以下となる。
The present invention u S -S (Storage - Stora
ge ) format and BCD operation can be executed in one instruction, and in this case, the conventional 3-R (Storage-Register)
Compared to the format, the number of steps is reduced to 1/10 or less, and the calculation time is reduced to about 1/20 or less.

第3(a)図は本発明の他の実施例を示すものである。FIG. 3(a) shows another embodiment of the present invention.

この実施例に一つのアダーAdder  でグログラム
カウンタ1のインクリメントとカウンタ3のインクリメ
ントを行わしめるものである。すなわち、プログラムカ
ウンタlをインクリメントするときにカウンタ3はイン
クリメントされず、カウンタ3をインクリメントすると
きはプログラムカウンタ1にインクリメントされないこ
とに着目してインクリメンタというべきアダーを兼用し
たものである。
In this embodiment, one adder is used to increment the glogram counter 1 and the counter 3. That is, the adder is also used as an incrementer, focusing on the fact that when the program counter 1 is incremented, the counter 3 is not incremented, and when the counter 3 is incremented, the program counter 1 is not incremented.

切換に切換器8をフリップフロップ5の出力Qによって
制御することにより行う。なおりウンタ3はシフトレジ
スタタイプのカウンタである。
The switching is performed by controlling the switch 8 using the output Q of the flip-flop 5. The naori counter 3 is a shift register type counter.

以上説明したように1本発明によれば、必要に応じてプ
ログラムカウンタに格納されるアドレス番地を固定し同
一番地の命令を任意の回数繰返して実行させることがで
きる。したがって、僅かなハードウェア手段を増すこと
によってプログラムステップ数の軽減を図ることができ
、演算速度も向上する。
As explained above, according to one aspect of the present invention, the address stored in the program counter can be fixed as needed, and the instruction at the same address can be repeatedly executed an arbitrary number of times. Therefore, by adding a small number of hardware means, the number of program steps can be reduced, and the calculation speed can also be improved.

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

第1図は本発明の一実施例を示す構成図、第2図げタイ
ムチャート図、第3(a)図は本発明の他の実施例を示
す回路図、第3(bj図に第3(a)図の回路記号を説
明するための回路図である。 1・・・プログラムカウンタ、2,4・・・クリメンタ
。 3・・・カウンタ、5・・・フリップフロッグ、6・・
・RAM、7・・・ALU、8・・・切換器。
Fig. 1 is a configuration diagram showing one embodiment of the present invention, Fig. 2 is a time chart diagram, Fig. 3 (a) is a circuit diagram showing another embodiment of the present invention, and Fig. 3 (Fig. (a) It is a circuit diagram for explaining the circuit symbols in the figure. 1... Program counter, 2, 4... Climenter. 3... Counter, 5... Flip frog, 6...
・RAM, 7...ALU, 8...Switcher.

Claims (1)

【特許請求の範囲】[Claims] 1、演算処理回路を制御するためのプログラム・カウン
タと前記プログラム・カウンタを制?IJJするための
制御回路よりなり、繰返し演算処理において、前記プロ
グラム・カウンタの動作を上記制御回路圧より制御する
ようにしたことを特徴とするプログラム・カウンタ制御
回路。
1. Control the program counter and the program counter for controlling the arithmetic processing circuit? 1. A program counter control circuit comprising a control circuit for IJJ, wherein the operation of the program counter is controlled by the control circuit pressure in repetitive arithmetic processing.
JP555884A 1984-01-18 1984-01-18 Program counter control circuit Pending JPS59157751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP555884A JPS59157751A (en) 1984-01-18 1984-01-18 Program counter control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP555884A JPS59157751A (en) 1984-01-18 1984-01-18 Program counter control circuit

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2478177A Division JPS53110439A (en) 1977-03-09 1977-03-09 Temporal stopping circuit for program counter

Publications (1)

Publication Number Publication Date
JPS59157751A true JPS59157751A (en) 1984-09-07

Family

ID=11614524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP555884A Pending JPS59157751A (en) 1984-01-18 1984-01-18 Program counter control circuit

Country Status (1)

Country Link
JP (1) JPS59157751A (en)

Similar Documents

Publication Publication Date Title
US4181942A (en) Program branching method and apparatus
JPS62180427A (en) Program control circuit
KR0138468B1 (en) Microcomputer
JPH03204737A (en) Debug circuit of signal processing processor
JPH0766286B2 (en) Processing method of NC device
EP0240606A2 (en) Pipe-line processing system and microprocessor using the system
JPS59157751A (en) Program counter control circuit
US3737867A (en) Digital computer with accumulator sign bit indexing
JP2907958B2 (en) Time mechanism control method
JP2784001B2 (en) Instruction processing circuit of programmable controller
JPH0222413B2 (en)
JPS60134957A (en) Parallel operation processing device
JPS62279438A (en) Tracking circuit
JPS5999552A (en) Microcomputer
US20200285472A1 (en) Context-Switching Method and Apparatus
KR0170706B1 (en) External memory usage of microprocessor
JPS5842487B2 (en) Program loading method
JP2591211B2 (en) High-speed interrupt processing device
JPS6017146B2 (en) computing device
JPH0338613B2 (en)
JPS6236576B2 (en)
JPH02178837A (en) Speed governing system for microprogram
JPH02109130A (en) Arithmetic circuit
JPH04346128A (en) Device and method for data processing
JPS6116114B2 (en)