Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPS631622B2 - - Google Patents
[go: Go Back, main page]

JPS631622B2 - - Google Patents

Info

Publication number
JPS631622B2
JPS631622B2 JP57121595A JP12159582A JPS631622B2 JP S631622 B2 JPS631622 B2 JP S631622B2 JP 57121595 A JP57121595 A JP 57121595A JP 12159582 A JP12159582 A JP 12159582A JP S631622 B2 JPS631622 B2 JP S631622B2
Authority
JP
Japan
Prior art keywords
circuit
page
addition
subtraction
branch
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
Application number
JP57121595A
Other languages
Japanese (ja)
Other versions
JPS5911451A (en
Inventor
Teruaki Nakamura
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.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP57121595A priority Critical patent/JPS5911451A/en
Publication of JPS5911451A publication Critical patent/JPS5911451A/en
Publication of JPS631622B2 publication Critical patent/JPS631622B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/324Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address using program counter relative addressing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/321Program or instruction counter, e.g. incrementing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 本発明は電子計算機のプログラムにおいて最も
使用頻度の高い分岐命令に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to branch instructions that are most frequently used in electronic computer programs.

電子計算機のプログラムにおいて効率的プログ
ラムを作成する為に共通の制御を行なえる部分は
同じ処理を行ない、異なる制御を必要とする部分
はそれぞれに分岐し異なる処理を行なう手法や、
同じ処理を何度も繰り返し行なうループ処理手法
がある。前記2つの手法は電子計算機のプログラ
ムを作成する場合、最も有効でかつ良く使われる
手法であり、その場合に分岐命令が多用される。
従つて分岐命令の機能が電子計算機の機能を左右
すると言つても過言ではない。分岐命令の中にプ
ログラム・メモリの全番地に自由に分岐する命令
や、限られた範囲内で分岐する命令がある。前者
は分岐先の制約が無いが命令コードが複数語必要
で有り、プログラム効率が悪い。後者は分岐先の
制約は有るが命令コードが一般には一語で良くプ
ログラム効率は良いと云う特徴が有る。
In order to create efficient programs in computer programs, parts that can be controlled in common perform the same processing, and parts that require different control are branched out to perform different processing.
There is a loop processing method that repeats the same process over and over again. The above two methods are the most effective and frequently used methods when creating programs for electronic computers, and branch instructions are often used in this case.
Therefore, it is no exaggeration to say that the function of branch instructions influences the function of electronic computers. Among branch instructions, there are instructions that branch freely to all addresses in the program memory, and instructions that branch within a limited range. The former has no restrictions on branch destinations, but requires multiple instruction codes, resulting in poor program efficiency. Although the latter has restrictions on branch destinations, it has the characteristic that the instruction code is generally only one word and program efficiency is good.

プログラム・メモリの広い範囲で分岐する頻度
は比較的少なく狭い範囲で分岐する場合が圧倒的
に多く、従つて後者の分岐命令の機能が非常に重
要である。
The frequency of branching over a wide range of program memory is relatively low, and branching over a narrow range is overwhelmingly the case, so the function of the latter branch instruction is very important.

従来から行なわれている分岐範囲が限られた分
岐命令の1つにページ内分岐命令が有る。すなわ
ちプログラム・メモリ番地を複数の小ブロツクに
分け、各ブロツクは同数の連続するアドレスで構
成されている。該小ブロツクをページと呼ぶ、該
ページ内分岐命令は現在のページ内の各アドレス
へ分岐する命令であり、ページ外への分岐は不可
能である。
One of conventional branch instructions with a limited branch range is an intra-page branch instruction. That is, the program memory address is divided into a plurality of small blocks, each block consisting of the same number of consecutive addresses. The small block is called a page, and the intra-page branch instruction is an instruction that branches to each address within the current page, and branching outside the page is not possible.

第1図は該ページ内分岐命令の命令コード及び
プログラムカウンタを示す。1aは命令コードの
ページ内分岐命令を示す部分であり、電子計算機
が命令部1aを解読すると命令コードのアドレス
データ部1bがプログラムカウンタのアドレス部
2bへ書き込まれる。プログラム・カウンタのペ
ージ部2aは変らない。アドレスデータ部1bは
本説明では6ビツトであるから64通りの分岐が出
来るが物理的アドレスが隣であつてもページが異
なる為に分岐出来ない場合がある。第2図がそれ
を説明する図である。
FIG. 1 shows the instruction code and program counter of the intra-page branch instruction. 1a is a part of the instruction code indicating an intra-page branch instruction, and when the electronic computer decodes the instruction part 1a, the address data part 1b of the instruction code is written to the address part 2b of the program counter. The page portion 2a of the program counter remains unchanged. Since the address data section 1b has 6 bits in this explanation, it is possible to branch in 64 ways, but even if the physical addresses are adjacent, there are cases where branching cannot be performed because the pages are different. FIG. 2 is a diagram explaining this.

プログラム・メモリ3のKページ・0アドレス
と仮定する。現アドレスの隣りである(K―1)
ページ・63アドレスへの分岐は不可能である。す
なわちたとえ隣のアドレスであつてもページが異
なれば分岐不可能であり、プログラム作成の非常
な障害となつている。
Assuming page K of program memory 3, address 0. It is next to the current address (K-1)
Branching to page 63 address is not possible. In other words, even if the addresses are adjacent, if the pages are different, branching is not possible, which is a serious obstacle to programming.

前記ページ内分岐の欠点を補なう命令として現
在のアドレスから前後方向へ、何アドレス離れた
アドレスに分岐するか指定する相対分岐命令が有
る。該分岐命令を一般に相対分岐命令と呼んでい
る該相対分岐命令はページの制約はないが、反
面、現アドレスとオフセツト値との演算を演算回
路で行なう為に該データを演算部へ転送、演算及
び演算結果をプログラム・カウンタに書き込む処
理が必要で処理時間が長いと云う欠点がある。処
理時間を短縮する為にプログラム・カウンタに専
用の演算回路を付加する事で前記欠点は解消する
がプログラム・カウンタが複雑となり、論理回路
の集積化にとつて大きな障害となる。
As an instruction to compensate for the drawbacks of the intra-page branch, there is a relative branch instruction that specifies how many addresses away from the current address the branch should be made in the forward/backward direction. The relative branch instruction, which is generally called a relative branch instruction, has no page restrictions, but on the other hand, in order to perform the operation between the current address and the offset value in the arithmetic circuit, the data is transferred to the arithmetic unit and the arithmetic operation is performed. It also requires a process of writing the calculation result to the program counter, which has the drawback that the process takes a long time. Although the above-mentioned drawbacks can be overcome by adding a dedicated arithmetic circuit to the program counter in order to shorten the processing time, the program counter becomes complicated, which becomes a major obstacle to the integration of logic circuits.

本発明の目的は従来のページ内分岐命令及び相
対分岐命令の欠点に鑑み、それぞれの長所を相持
つた分岐制御方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a branch control method that takes advantage of the advantages of conventional intra-page branch instructions and relative branch instructions.

本発明によれば処理手順である命令語の集合体
が格納されたプログラム・メモリと、該プログラ
ム・メモリの実行位置を指定するプログラム・カ
ウンタにより所定の命令語を取り出し、上記命令
語を解読し、命令語に対応する処理を行なうデー
タ処理装置において、上記プログラム・メモリを
複数個の小ブロツクに分割し、上記プログラム・
カウンタを前記小ブロツク内のアドレスに対応す
る下位カウンタ部と、前記小ブロツクの番号に対
応する上位カウンタ部に分割し、特定の分岐命令
語を解読して実行する際、命令語中の前記下位カ
ウンタのビツト長に対応するビツト長のデータを
下位カウンタに転送する手段と、上記転送データ
とは異なる命令語中のデータに基き、上記上位カ
ウンタを命令語の存在する小ブロツクからの相対
位置に対応する値に修飾する手段とを有する分岐
制御方式が得られる。
According to the present invention, a predetermined instruction word is retrieved using a program memory storing a collection of instruction words, which is a processing procedure, and a program counter that specifies an execution position in the program memory, and the above instruction word is decoded. , in a data processing device that performs processing corresponding to an instruction word, the program memory is divided into a plurality of small blocks, and the program memory is divided into a plurality of small blocks.
The counter is divided into a lower counter part corresponding to the address in the small block and an upper counter part corresponding to the number of the small block. A means for transferring data of a bit length corresponding to the bit length of the counter to a lower counter, and based on data in the instruction word that is different from the transfer data, the upper counter is moved to a relative position from the small block where the instruction word exists. A branch control scheme is obtained having means for modifying the corresponding values.

次に本発明について説明する。 Next, the present invention will be explained.

以下の説明では分岐命令は現ページを含めて前
後の3ページ間の各アドレスへ分岐可能な相対ペ
ージ分岐命令である。
In the following explanation, the branch instruction is a relative page branch instruction that can branch to each address between three pages before and after the current page.

第3図に本発明の説明における分岐命令コード
とプログラム・カウンタを示す。1aは本相対ペ
ージ分岐命令コードを示す部分であり、1bは各
ページ内の分岐するアドレスを示すアドレス部で
あり、1cの2ビツトに依り現ページを含めて前
後の3ページの中の1ページを示す部分である。
相対ページ分岐命令コード部1aが解読される
と、アドレス部1bがプログラム・カウンタのア
ドレス部2bに書き込まれると同時に、1cの2
ビツトにより前ページへ分岐する場合はページ部
から1を減算し、現ページへ分岐する場合は0を
加減するか、以前の値を保持し、後ページへ分岐
する場合はページ部に1を加算する。
FIG. 3 shows a branch instruction code and a program counter in the explanation of the present invention. 1a is a part that shows the relative page branch instruction code, 1b is an address part that shows the branch address in each page, and depending on the 2 bits of 1c, one of the three pages before and after including the current page is selected. This is the part that shows.
When the relative page branch instruction code part 1a is decoded, the address part 1b is written to the address part 2b of the program counter, and at the same time, the 2nd part of 1c is
When branching to the previous page depending on the bit, subtract 1 from the page part; when branching to the current page, add or subtract 0, or keep the previous value, and when branching to the next page, add 1 to the page part. do.

第4図がそれを説明する概念図である。図に示
すように現ページを含め前後3ページ内で分岐が
可能でありプログラムの自由度が高まる。
FIG. 4 is a conceptual diagram explaining this. As shown in the figure, branching is possible within three pages before and after the current page, increasing the degree of freedom of the program.

第5図は本発明の相対ページ分岐命令を説明す
るプログラム・カウンタ部のブロツク図である。
FIG. 5 is a block diagram of the program counter section explaining the relative page branch instruction of the present invention.

命令コードが相対ページ分岐命令であると解読
されるとプログラム・カウンタのページ部10の
値を制御信号に依つて前ページの場合は1を減
算し、現ページの場合は0の加減算か、もしくは
前の値を保持し、後ページの場合は1を加算する
と同時に命令コードのアドレス部のデータが伝送
路12を通りプログラムカウンタのアドレス部1
1へ伝えられ、書き込み信号によつて該データが
書き込まれる。
When the instruction code is decoded as a relative page branch instruction, the value of page section 10 of the program counter is subtracted by 1 for the previous page, or added or subtracted by 0 for the current page, or The previous value is held, and in the case of the next page, 1 is added. At the same time, the data in the address part of the instruction code passes through the transmission path 12 and is transferred to the address part 1 of the program counter.
1, and the data is written by the write signal.

第6図a,b,cはそれぞれ、ページ内分岐命
令、相対分岐命令、相対ページ分岐命令の処理動
作のタイミングを示す図である。ページ内分岐命
令は最初のサイクルで命令を解読し、次のサイク
ルでアドレスデータをプログラム・カウンタのア
ドレス部へ書き込む。相対分岐命令は最初のサイ
クルで命令を解読し、次のサイクルでプログラム
カウンタの値を演算部へ伝送する、第3サイクル
で命令コードのアドレスデータと演算を行なう。
第4サイクルで分岐先のデータをプログラム・カ
ウンタに書き込む。相対ページ分岐命令は最初の
サイクルで命令を解読し、第2サイクルでプログ
ラム・カウンタのページ部内で+1,0,−1の
演算と同時にプログラム・カウンタのアドレス部
へ命令コードのアドレス・データを書き込む。す
なわち処理時間は従来のページ内分岐命令と同じ
く短かい。
FIGS. 6a, 6b, and 6c are diagrams showing the timing of processing operations for an intra-page branch instruction, a relative branch instruction, and a relative page branch instruction, respectively. An intrapage branch instruction decodes the instruction in the first cycle and writes address data to the address field of the program counter in the next cycle. In the relative branch instruction, the instruction is decoded in the first cycle, the value of the program counter is transmitted to the arithmetic unit in the next cycle, and the address data of the instruction code is operated on in the third cycle.
In the fourth cycle, the branch destination data is written to the program counter. A relative page branch instruction decodes the instruction in the first cycle and writes the address data of the instruction code to the address field of the program counter at the same time as +1, 0, -1 operations in the page field of the program counter in the second cycle. . In other words, the processing time is as short as the conventional intra-page branch instruction.

第5図のプログラム・カウンタのページ部10
の最下位部とアドレス部11の最上位部を示すブ
ロツク図が第7図である。分岐命令でない命令時
のプログラム・カウンタの動作は命令を実行する
毎に+1値が増加する。加算回路15の加算出力
信号と伝送路21から送られるデータを切換信号
26に依り、どちらかを選択する切換回路が18
であり、本分岐命令時に伝送路からのデータ21
を選択し、他の場合は加算回路15の加算出力を
選択する。切換回路18に依つて選択された信号
はラツチ回路17―1が書き換えられるまで保持
される。ラツチ回路17―1の出力は加算回路1
5に加えられ前段の桁上げ信号20と加算され
る、桁上げが有る場合はORゲート27に伝えら
れる。制御信号25はアドレス部11からの桁上
げ信号を無視しページ部10だけの加減算動作を
制御する。ANDゲート16はORゲート27の出
力を無視し、加減算動作を禁止させる制御信号2
5で制御される。加減算回路14はラツチ回路1
7―2の出力と桁上げ/桁下げ信号に相等する
ANDゲート16の出力を入力とし加減算制御信
号23に依つて加算又は減算が行なわれる。加減
算の結果はラツチ回路17―2に入力され、桁上
げ/桁下げ信号22は後段に伝達される。
Page portion 10 of the program counter in FIG.
FIG. 7 is a block diagram showing the lowest part of the address section 11 and the highest part of the address section 11. When an instruction is not a branch instruction, the program counter increases in value by +1 each time the instruction is executed. A switching circuit 18 selects between the addition output signal of the addition circuit 15 and the data sent from the transmission line 21 according to a switching signal 26.
, data 21 from the transmission path at the time of this branch instruction
is selected, and in other cases, the addition output of the addition circuit 15 is selected. The signal selected by the switching circuit 18 is held until the latch circuit 17-1 is rewritten. The output of the latch circuit 17-1 is the adder circuit 1
5 and is added to the carry signal 20 at the previous stage. If there is a carry, it is transmitted to the OR gate 27. The control signal 25 ignores the carry signal from the address section 11 and controls addition and subtraction operations only in the page section 10. AND gate 16 ignores the output of OR gate 27 and prohibits addition/subtraction operation with control signal 2.
Controlled by 5. Addition/subtraction circuit 14 is latch circuit 1
Equivalent to the output of 7-2 and carry/down signal
Addition or subtraction is performed depending on the addition/subtraction control signal 23 using the output of the AND gate 16 as input. The results of addition and subtraction are input to the latch circuit 17-2, and the carry/carry down signal 22 is transmitted to the subsequent stage.

本発明の相対ページ分岐命令の動作を第7図で
説明する。
The operation of the relative page branch instruction of the present invention will be explained with reference to FIG.

命令コードを解読し、相対ページ分岐命令と判
断されると、プログラム・カウンタのアドレス部
11は切換信号26が出力され、それまで選択さ
れていた加算回路15の出力が切断され、伝送路
21から送られて来る命令コードのアドレス部デ
ータを選択回路18に依つて選択し、ラツチ回路
17―1に出力される。プログラム・カウンタの
ページ部10は桁上禁止信号25が出力されアド
レス部からの桁上信号がORゲート27で禁止さ
れる。更に命令コードのページ部の+1,0,−
1を指示する部分(第3図の1c)により+1動
作の場合は制御信号24が出力されANDゲート
16は“1”となる。加減算制御信号23も同時
に出力され加減算回路14でページ部のみで+1
された値がラツチ回路17―2に出力される。ペ
ージ部の−1動作の場合は制御信号24及び25
は同じであり、加減制御信号23が減算を指示し
加減算回路14でページ部のみで−1された値が
ラツチ回路17―2に出力される。ページ部の値
が変らない場合は制御信号24にてANDゲート
16の出力を“0”と制御し、加減算を行なえば
ページ部の値は変らない。以上の動作で本発明の
相対ページ分岐が行なえる。本発明のページ部に
おける加減算回路14はプログラム・カウンタに
内蔵する加算回路に簡単な桁下げ回路を付加する
だけで実現出来る。
When the instruction code is decoded and determined to be a relative page branch instruction, the address section 11 of the program counter outputs a switching signal 26, the output of the adder circuit 15 that had been selected up to that point is cut off, and the output from the transmission line 21 is cut off. The address part data of the received instruction code is selected by the selection circuit 18 and outputted to the latch circuit 17-1. A carry inhibit signal 25 is output to the page section 10 of the program counter, and a carry signal from the address section is inhibited by an OR gate 27. Furthermore, +1, 0, - of the page part of the instruction code
In the case of +1 operation, the control signal 24 is outputted by the part indicating 1 (1c in FIG. 3), and the AND gate 16 becomes "1". The addition/subtraction control signal 23 is also output at the same time, and the addition/subtraction circuit 14 outputs +1 only in the page section.
The determined value is output to the latch circuit 17-2. In the case of -1 operation of the page section, control signals 24 and 25
are the same, the addition/subtraction control signal 23 instructs subtraction, and the value subtracted by 1 only in the page portion by the addition/subtraction circuit 14 is output to the latch circuit 17-2. If the value of the page part does not change, the output of the AND gate 16 is controlled to "0" by the control signal 24, and the value of the page part does not change if addition and subtraction are performed. The relative page branching of the present invention can be performed by the above operations. The addition/subtraction circuit 14 in the page section of the present invention can be realized by simply adding a simple down-down circuit to the addition circuit built into the program counter.

第8図は第7図の加減算回路14と加算回路1
5の一実施例を論理回路で示し前記2つの回路で
共通な部分は同一番号とし合せて説明を行なう。
ANDゲート30及び31は前段の桁上げ(又は
桁下げ)信号と演算入力が不一致の場合に“1”
を出力するように接続し、前記ANDゲート30
及び31はORゲート32に接続されている。従
つてORゲート32の出力は加減算結果を表らわ
す。ANDゲート33は桁上げを検出する信号で
前段の桁上げ信号と演算入力が接続されている。
ANDゲート34は減算時の桁下げ検出回路、
ANDゲート35は加算時の桁上げ検出回路であ
り、ANDゲート34及び35はORゲート36に
接続され該出力は桁上げ及び桁下げ信号を出力す
る。ところで本発明の加減算回路は特別の回路を
必要としないすなわちプログラム・カウンタは加
算回路を内蔵しているので、該プログラム・カウ
ンタに簡単な回路を付加するのみで加減算回路を
構成出来る。
Figure 8 shows the addition/subtraction circuit 14 and addition circuit 1 in Figure 7.
An embodiment of Embodiment 5 will be shown as a logic circuit, and parts common to the two circuits will be described using the same numbers.
AND gates 30 and 31 are “1” when the carry (or carry down) signal of the previous stage and the calculation input do not match.
The AND gate 30
and 31 are connected to the OR gate 32. The output of OR gate 32 therefore represents the result of addition and subtraction. The AND gate 33 is a signal for detecting carry, and the carry signal of the previous stage and the calculation input are connected.
AND gate 34 is a undercarriage detection circuit during subtraction;
AND gate 35 is a carry detection circuit during addition, and AND gates 34 and 35 are connected to OR gate 36, whose output outputs carry and carry down signals. By the way, the addition/subtraction circuit of the present invention does not require any special circuit; in other words, since the program counter has a built-in addition circuit, the addition/subtraction circuit can be constructed by simply adding a simple circuit to the program counter.

本発明の相対ページ分岐は従来のプログラム・
カウンタに簡単な回路を付加する事で従来のペー
ジ内分岐の欠点であつた分岐の自由度を高め、従
来の相対分岐の処理時間が長い欠点を補ない、従
来のそれぞれの長所を合せ持つ分岐処理が可能で
ある。従つて回路構成が極めて簡単であるから論
理回路の集積化にとつて極めて有効であり、プロ
グラム開発においても、使用頻度の非常に高い分
岐命令の自由度が高まる為にプログラム作成が容
易となる、従つて本発明の有効性は極めて高い。
The relative page branch of the present invention is similar to that of conventional programs.
By adding a simple circuit to the counter, the degree of freedom in branching, which was a disadvantage of conventional intra-page branching, is increased, and the disadvantage of the long processing time of conventional relative branching is compensated for.This branching combines the advantages of each conventional branch. Processing is possible. Therefore, since the circuit configuration is extremely simple, it is extremely effective for integrating logic circuits, and in program development, it is easy to create programs because the degree of freedom of branch instructions, which are very frequently used, is increased. Therefore, the effectiveness of the present invention is extremely high.

本発明の一実施例として説明したページの相対
値を+1,0,−1としたが+2又は−2の値で
修飾する事も可能であり、その場合最下位から2
番目のビツトに桁上げ又は桁下げ信号を入力する
事で実現が出来る。更に、本実施例のプログラ
ム・カウンタは演算回路を使用した2進カウンタ
であるがシフトカウンタの場合、値を相対的に修
飾することはシフト方向を制御する事で実現出来
る。
Although the relative values of the page explained as an example of the present invention are set to +1, 0, and -1, it is also possible to modify them with a value of +2 or -2, and in that case, the relative value of the page is 2 from the lowest.
This can be achieved by inputting a carry or carry down signal to the th bit. Furthermore, although the program counter of this embodiment is a binary counter using an arithmetic circuit, in the case of a shift counter, relative modification of values can be achieved by controlling the shift direction.

すなわちプログラム・カウンタのカウント動作
に応じた制御を行なえばカウンタの種類は問わな
い。
That is, the type of counter does not matter as long as control is performed according to the counting operation of the program counter.

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

第1図は従来例における命令コードとプログラ
ム・アドレスの説明図、第2図は従来例を説明す
る概念図、第3図は本発明の実施例における命令
コードとプログラム・アドレスの説明図、第4図
は本発明の実施例を説明する概念図、第5図は本
発明の実施例のブロツク図、第6図a〜cな従来
例及び本発明の実施例の処理タイミングを表らわ
す説明図、第7図は本発明の実施例の一部の詳細
図、第8図は本発明の実施例の中の加減算回路の
論理回路図を示す。
FIG. 1 is an explanatory diagram of the instruction code and program address in the conventional example, FIG. 2 is a conceptual diagram explaining the conventional example, and FIG. 3 is an explanatory diagram of the instruction code and program address in the embodiment of the present invention. FIG. 4 is a conceptual diagram explaining an embodiment of the present invention, FIG. 5 is a block diagram of an embodiment of the present invention, and FIG. 7 is a detailed diagram of a part of an embodiment of the present invention, and FIG. 8 is a logic circuit diagram of an addition/subtraction circuit in the embodiment of the present invention.

Claims (1)

【特許請求の範囲】[Claims] 1 ページ単位に分割されたプログラムメモリに
対して、上位カウンタ部でページを指定し、下位
カウンタ部でページ内のアドレスを指定するプロ
グラムカウンタを用いて分岐制御を行なう方式に
おいて、前記下位カウンタ部は加算回路、該加算
回路の出力データと外部から入力されるデータと
のいずれか一方を選択する選択回路および選択さ
れたデータを保持する第1のラツチ回路を有し、
前記上位カウンタ部は加減算回路および該加減算
回路の出力を保持する第2のラツチ回路を有し、
前記下位カウンタ部からのキヤリー信号をゲート
回路を介して前記上位カウンタ部の前記加減算回
路に入力し、非分岐時は前記ゲート回路を開いて
前記キヤリー信号を前記上位カウンタ部に印加で
きるようにして前記下位カウンタ部と前記上位カ
ウンタ部とで+1づつ連続的に増加するアドレス
を生成し、分岐時は前記ゲート回路を閉じて前記
加減算回路に外部からキヤリーの有無を指定する
信号を与えるとともに加算および減算のいずれか
を指示し、ページ境界を越えた分岐動作を行なう
ことを特徴とする分岐制御方式。
1. In a method of performing branch control using a program counter in which an upper counter section specifies a page and a lower counter section specifies an address within the page for a program memory divided into pages, the lower counter section is It has an adder circuit, a selection circuit that selects either the output data of the adder circuit or data input from the outside, and a first latch circuit that holds the selected data,
The upper counter section has an addition/subtraction circuit and a second latch circuit that holds the output of the addition/subtraction circuit,
A carry signal from the lower counter section is inputted to the addition/subtraction circuit of the upper counter section via a gate circuit, and when non-branching, the gate circuit is opened so that the carry signal can be applied to the upper counter section. The lower counter section and the upper counter section generate addresses that continuously increase by +1, and when branching, the gate circuit is closed and a signal designating the presence or absence of carry is given to the addition/subtraction circuit from the outside, and the addition and subtraction circuits are A branch control method characterized by instructing either subtraction and performing a branch operation beyond page boundaries.
JP57121595A 1982-07-13 1982-07-13 Branch controlling system Granted JPS5911451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57121595A JPS5911451A (en) 1982-07-13 1982-07-13 Branch controlling system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57121595A JPS5911451A (en) 1982-07-13 1982-07-13 Branch controlling system

Publications (2)

Publication Number Publication Date
JPS5911451A JPS5911451A (en) 1984-01-21
JPS631622B2 true JPS631622B2 (en) 1988-01-13

Family

ID=14815139

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57121595A Granted JPS5911451A (en) 1982-07-13 1982-07-13 Branch controlling system

Country Status (1)

Country Link
JP (1) JPS5911451A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2026201A1 (en) * 2007-08-10 2009-02-18 Cortus S.A. Processor branch instruction encoding

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5788244U (en) * 1980-11-19 1982-05-31
JPS57193841A (en) * 1981-05-22 1982-11-29 Hitachi Ltd Program counter circuit

Also Published As

Publication number Publication date
JPS5911451A (en) 1984-01-21

Similar Documents

Publication Publication Date Title
JPS6351287B2 (en)
KR950033857A (en) How to efficiently move bits between data processors with valid bit shift qualifications and their operands, and how to execute bit shift instructions efficiently
JPS61122747A (en) Data processor
JPS6227412B2 (en)
JPH0225537B2 (en)
JPS631622B2 (en)
JPH034936B2 (en)
JPH0379736B2 (en)
GB1119002A (en) Data processors
EP0661648B1 (en) Digital signal processing circuit
GB1129659A (en) Signal generating circuits
US5301345A (en) Data processing system for performing a shifting operation and a constant generation operation and method therefor
JPH03269728A (en) Instruction execution control system for pipeline computer
JPS63111535A (en) Data processor
JP3533825B2 (en) Logical operation unit and logical operation device
JPS5851353A (en) Program control circuit
JPS59184944A (en) Rounding operation method
JPS6148735B2 (en)
JP2956390B2 (en) Drawing processor
JPS6260755B2 (en)
KR20060076549A (en) High speed full adder
JPS6045501B2 (en) associative memory device
JPS6225348A (en) Address bus extension system
JPS6145264B2 (en)
WO2001016712A1 (en) Digital signal processing apparatus and method for controlling the same