JPS59100957A - Loop control system - Google Patents

Loop control system

Info

Publication number
JPS59100957A
JPS59100957A JP21014582A JP21014582A JPS59100957A JP S59100957 A JPS59100957 A JP S59100957A JP 21014582 A JP21014582 A JP 21014582A JP 21014582 A JP21014582 A JP 21014582A JP S59100957 A JPS59100957 A JP S59100957A
Authority
JP
Japan
Prior art keywords
loop
address
instruction
contents
register
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
JP21014582A
Other languages
Japanese (ja)
Inventor
Masushi Ikezawa
池沢 斗志
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP21014582A priority Critical patent/JPS59100957A/en
Publication of JPS59100957A publication Critical patent/JPS59100957A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/262Arrangements for next microinstruction selection

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)

Abstract

PURPOSE:To remove a useless cycle which is generated for each loop and to increase the speed of operation by discontinuing the control using a loop end sentence but using a loop declaring sentence. CONSTITUTION:An address N-1 of an instruction ROM2 is designated by a program counter PC1', and the contents of instruction of the address N-1 are sent to an instruction register 3. Then the loop frequency is set to a loop counter 5 via a decoder 4. Then the OC1' designates an address N of the ROM2, and both the loop declaring sentence of the contents of the address N and an address N+2 of a loop end are sent to the register 3. The value of the address N+1 of the PC1' of that time point is loaded to a stack 8 by said loop declaring sentence and an indication of a decoder 4'. Thus the address N+1 is used as the head address. At the same time, the last address N+1 of the loop is loaded to an end address setting register 9 by a command of the decoder 4'. The PC1' designates successively subsequent addresses N+1 and N+2 of the ROM2.

Description

【発明の詳細な説明】 (a)  発明の技術分野 本発明は命令読出し専用メモリ(以下ROMと称す)に
格納されたマイクロプログラム綿令で動作を制御されろ
マイクロ制御プロセッサに係り、特に実時間処理で、高
速に演努、処理ができるようにしたディジタル信号フ”
ロセッサにおり2ル一1制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION (a) Technical Field of the Invention The present invention relates to a microcontroller whose operation is controlled by microprogram instructions stored in an instruction read-only memory (hereinafter referred to as ROM), and particularly relates to a real-time A digital signal file that enables high-speed processing and processing.
This article relates to a 2-1 control system for processors.

(b)従来技術と問題点 以下従来のルー1制御方式につき、図を用いて説明する
。第1因は従来例のルーフ′制御回路を主体とした回路
のブロック図、第2図は第1図における命令ROM2の
番地と命令の内容の一例を示す図、第3図は第1図の’
6部のタイムチャートで(4)は7”ログラムカウンタ
、a3)は命令RαM、 (Qは命令レジスタ、(2)
はループカウンタ、(ト)はループエンド信号、町はデ
コーダよシのロード信号、(G)はプログラムカウンタ
へのロード信号を示す。
(b) Prior Art and Problems The conventional Lu1 control system will be explained below with reference to the drawings. The first cause is a block diagram of a circuit mainly consisting of a conventional roof' control circuit, FIG. '
In the time chart of part 6, (4) is the 7" program counter, a3) is the instruction RαM, (Q is the instruction register, (2)
(G) indicates a loop counter, (G) indicates a loop end signal, (G) indicates a load signal to the decoder, and (G) indicates a load signal to the program counter.

N、N+11N+2.N+3.N+4.N+5は命令R
OMの番地、のンCンのNtN+ltN+2.N+3s
N+4は自該香地の命令内容、(2)のKはルーズ回数
を示す。
N, N+11N+2. N+3. N+4. N+5 is command R
Address of OM, NtN+ltN+2. N+3s
N+4 indicates the content of the command of the current player, and K in (2) indicates the number of looses.

PCIより命令ROM2のN番地を指定すると、第2図
に示すように命令ROMのN番地の命令の内容%Kをル
ープカウンタ回路に設定〃が命令レジスタ3に送られ、
デコーダ4を介してLC5にループ回数Kを設定する。
When the PCI specifies the N address of the instruction ROM 2, the content %K of the instruction at the N address of the instruction ROM is set in the loop counter circuit and sent to the instruction register 3, as shown in FIG.
A loop number K is set in the LC 5 via the decoder 4.

次にPCIよシ命令R−OM2のN+1sN”2番地を
次々と指定すると、第2図に示す命令ROM2のN+L
N+2香地の命令の内容東演算〃が命令レジスタ3に送
られ、マイクロ制御プロセッサは演算を行う。次にPC
Iより、命令ROM2ON+3番地を指定すると、第2
図に示す命令ROM2のN+3査地のループエンド文の
内容が命令レジスタ3に送られ、このループエンド文に
より出力するデコーダ4の第3図(ト)に示すロード信
号が、LC5のルーズを実行する毎に、先に設定したル
ー1回数によt)、5Httづつ減算する値が%1sに
なる迄の間、アンド回路6を介して、第3図G)に示す
PCIのロード信号となり、ループエンド文中のもどり
先番地N+1を命令レジスタ3の出力よυPCIにロー
ドしてルーズを形成している。LC5のルーズ回数の値
が第3図(2)に示す如(、z1〃になると、LC5は
第3図(ト)に示す如く、電1/Iレベルの信号を出力
し、ノット回路7を介しアンド回路6に入力しデコーダ
4よシのロード信号を禁止する。従ってPCIは、命令
R0M2の次々の番地を指定しマイクロ制御プロセッサ
は次の命令を実行する。しかしながら、かかる従来のル
ープ制御回路では、以下の欠点が生じる。すなわち、P
 CIが命令ROMZを指定するN+3査地の命令室ル
ーズエンド文〃で実行する処理は、実質的に演算処理を
行っておらず、ルーズ演算処理上、むだ時間となり、演
算処理の高速化が図れないという欠点があった。
Next, by specifying the N+1sN"2 addresses of the PCI instruction R-OM2 one after another, N+L of the instruction ROM2 shown in FIG.
The content of the N+2 instruction, ``operation'', is sent to the instruction register 3, and the microcontrol processor performs the operation. Next, the PC
When instruction ROM2ON+3 address is specified from I, the second
The contents of the loop end statement at location N+3 of the instruction ROM 2 shown in the figure are sent to the instruction register 3, and the load signal shown in FIG. Each time t) is subtracted by 5Htt according to the number of loops set previously, the PCI load signal becomes the PCI load signal shown in FIG. 3G) through the AND circuit 6 until the value becomes %1s. The return destination address N+1 in the loop end statement is loaded into υPCI as the output of the instruction register 3 to form a loose loop. When the value of the loose number of LC5 reaches z1 as shown in FIG. 3 (2), LC5 outputs a signal of power 1/I level as shown in FIG. The PCI then specifies successive addresses of instruction R0M2 and the microcontroller executes the next instruction.However, such a conventional loop control circuit In this case, the following drawback arises: P
The processing that the CI executes with the instruction room loose-end statement in the N+3 location that specifies the instruction ROMZ does not actually perform arithmetic processing, resulting in dead time in loose arithmetic processing, making it difficult to speed up the arithmetic processing. There was a drawback that there was no

(c)  発明の目的 本発明の目的は上記の欠点に鑑み、ループエンド文によ
る制御をやめ、ループ宣言文により、ループ毎に生ずる
無駄なサイクルの取シ除き、?¥it算を高速化出来る
ルー1制御方式の提供にある0(d)  発明の構成 本発明は上記の目的を達成するために、ループ金形成し
たい時に、ループ宣言文により、ループエンドの番地を
エンドアドレス設定レジスタに設定しておき、グログ2
ムカウンタと、該レジスタの内容を比較する比較器への
出力が一致した時、次のサイクルの先頭で、ループ宣言
文によpスタックに退避されていたループ先頭番地をプ
ログラムカウンタヘロードするよう動作させる。しかる
後、ループカウンタの値を1減算する。以上のような一
連の動作をループカウンタの値が所定の値になる迄繰返
し行なうように制御することにより無駄なサイクルを取
除き演算を高速化出来ることを特徴とする0 (e)  発明の実施例 以下本発明の1実施例につき図に従って説明する。第4
図は本発明の実施例のループ制御回路を主体とした回路
のブロック図、第5図は比4図の場合の命令ROMの番
地と命令の内容を示す1例の命令文の図、第6図は第4
図の各部のタイムチャートで(4)はプログラムカウン
タ、a3)は命令ROM。
(c) Purpose of the Invention In view of the above-mentioned drawbacks, the purpose of the present invention is to eliminate control using loop end statements and use loop declaration statements to eliminate wasteful cycles that occur in each loop. 0(d) Structure of the Invention To achieve the above object, the present invention provides a loop end address using a loop declaration statement when forming loop money. Set it in the end address setting register and log 2
When the output from the program counter and the comparator that compares the contents of the register match, at the beginning of the next cycle, the loop start address that was saved in the p stack by the loop declaration statement is loaded into the program counter. let After that, the value of the loop counter is decremented by 1. By controlling the series of operations as described above to be repeated until the value of the loop counter reaches a predetermined value, unnecessary cycles can be removed and calculation speed can be increased.0 (e) Implementation of the Invention EXAMPLE Hereinafter, one embodiment of the present invention will be explained with reference to the drawings. Fourth
5 is a block diagram of a circuit mainly consisting of a loop control circuit according to an embodiment of the present invention, FIG. The figure is number 4
In the time chart of each part in the figure, (4) is a program counter, and a3) is an instruction ROM.

(Qは命令レジスタ、(2)はループカウンタ、(ト)
はルーズエンド伯号、(ト)はプログラムカウンタへの
ロード信号、(G)はスタック、卸はエンドアドレス設
定レジスタ、(1)は比較器の一致信号出方を示す〇図
中第1図、勇3図と同一機能のものは同一記号で示し、
1′はプログラムカウンタ(PC)、4’はデコーダ、
8はスタック、9はエンドアドレス設定レジスタ、10
は比較器、第6図09のN+1はルーズの先頭番地、第
6図ψ〃のN+2はループエンド番地金示す。
(Q is the instruction register, (2) is the loop counter, (g)
is the loose end number, (G) is the load signal to the program counter, (G) is the stack, wholesale is the end address setting register, (1) is the way the match signal is output from the comparator. Items with the same functions as Isamu 3 are shown with the same symbols.
1' is a program counter (PC), 4' is a decoder,
8 is the stack, 9 is the end address setting register, 10
is a comparator, N+1 in FIG. 609 is a loose start address, and N+2 in FIG. 6 ψ is a loop end address.

pci’より命令ROM2のN−1贅地を指定すると、
第5図に示す命令ROM2のN−1番地の命令の内容X
XKをループカウンタに設定〃が命令レジスタ3に送ら
れ、デコーダ4を介し、Lc5にルーズ回数−に//を
設定する。これは後のルーズ宣言文中に同時に定義され
てもかまわない。次にPCIより命令ROIVi2のN
番地を指定すると、記5図に示す命令ROM2のN番地
の内容のループ宣言文及びルーズエンドの番地N+2が
命令レジスタ3に送られる。このループ宣言文によシ、
其の時のP−CI’の値N+1査地金、デコーダ4′の
指令によりスタック8にロードする。これがループの先
頭番地となる。又同時にループの最後の番地N+2をエ
ンドアドレス設定レジスタ9にデコーダ4′の指令によ
りロードする。PCI’は次々と命令ROM2の次々の
番地N+11N+2を指定する。PCI’の出力とエン
ドアドレス設定レジスタ9の出力は比較器10に入力さ
れ、両者の値が一致すると(この場合はN+2で一致)
第6図の(I)に示す如く、一致イ8号を出力する。こ
の一致信号は、Lc5のループを実行する毎に先に設定
したループ回数にょ広−1〃づつ減算する値が1になる
迄の間は、アンド回路6を介し、第6図的に示すPCI
’のロード信号となり、スタック8に記憶している先頭
番地のを命令レジスタ3に送る。命令レジスタ3が、N
番地の内容を受J411、上記のN+1番地の内容を命
令ROM2より受取る間に、先のN+1.N+2番地#
P の命令内容が演算を、マイクロ制御プロセッサは行う。
When specifying the N-1 area of instruction ROM2 from pci',
Contents of the instruction at address N-1 of the instruction ROM 2 shown in FIG.
"Set XK as loop counter" is sent to the instruction register 3, and via the decoder 4, Lc5 is set to the loose number -//. This may be defined simultaneously in a later loose declaration statement. Next, from the PCI, the N of the instruction ROIVi2 is
When the address is specified, the loop declaration statement at address N of the instruction ROM 2 and the loose end address N+2 shown in FIG. 5 are sent to the instruction register 3. According to this loop declaration statement,
The value of P-CI' at that time, N+1, is loaded into the stack 8 according to a command from the decoder 4'. This becomes the starting address of the loop. At the same time, the last address N+2 of the loop is loaded into the end address setting register 9 by a command from the decoder 4'. PCI' specifies successive addresses N+11N+2 of the instruction ROM 2 one after another. The output of PCI' and the output of end address setting register 9 are input to comparator 10, and when both values match (in this case, match at N+2)
As shown in (I) of FIG. 6, a coincidence No. 8 is output. This coincidence signal is passed through the AND circuit 6 to the PCI interface shown in FIG.
' becomes a load signal, and sends the first address stored in the stack 8 to the instruction register 3. Instruction register 3 is N
While receiving the contents of address N+1 from the instruction ROM 2, J411 receives the contents of address N+1 from the instruction ROM 2. N+2 address #
The microcontroller processor performs an operation based on the instruction contents of P.

以上の説明よシ判る如く、PCl4の命令R−OM2の
番地指定は組6囚囚に示す如くエンドアドレスN+2 
’(i=指定した次には先頭アドレスN+iを指足する
ことになる。従ってマイクロ制御プロセッサは無駄なサ
イクルかなく、ループ内の演算を次々と行なう。LC5
のループ回数の値が第6図(2)に示す如<%1//に
なるとLC5は第6図(ト)に示す如くλ\1〃レベル
の信号を出力し、ノット回路7を介してアンド回路6に
入力し、比較器lOよ)の一致信号全県止する。従って
PCI’へのロード信号は裁6図(3)に示す如くなく
なる。従ってpci’は次々の命令ROM2の番地N+
3jN+4を指足し、マイクロ制御プロセッサは次々の
命令を実行する。
As can be seen from the above explanation, the address specification of the instruction R-OM2 of PCl4 is the end address N+2 as shown in the prisoner of group 6.
'(After specifying i=, the first address N+i is added. Therefore, the microcontrol processor performs operations in the loop one after another without wasting cycles.LC5
When the value of the number of loops becomes <%1// as shown in FIG. 6 (2), the LC5 outputs a signal of λ\1〃 level as shown in FIG. It is input to the AND circuit 6, and all match signals from the comparator 1O are stopped. Therefore, the load signal to PCI' disappears as shown in Figure 6 (3). Therefore, pci' is the address N+ of successive instruction ROM2.
3jN+4, the microcontroller processor executes one instruction after another.

以上のようにすることによ!JPCB’はルーズエンド
文の如き無駄な倚地を指定する必要がなくなり、実際必
要な演算命令の番地のみ指定することになるので、ルー
ズ実行の高速化が計れる。
By doing the above! JPCB' eliminates the need to specify wasteful locations such as loose end statements, and specifies only the addresses of actually necessary arithmetic instructions, thereby increasing the speed of loose execution.

(f)  発明の効果 以上詳細に説明する如く本発明によれは、ループを実行
する際、無駄なサイクルが取除かれるので演算を高速化
出来る効果がある。
(f) Effects of the Invention As described in detail above, the present invention has the effect of speeding up calculations since unnecessary cycles are removed when executing a loop.

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

第1図は従来例のルー1制御回路を主体とした回路のブ
ロック図、第2囚は亀1図の場合の命令ROIViの番
地と命令の内容を示す1例の命令文図、第3図は第1図
の各部のタイムチャート、あ4図は本発明の実施例のル
ーンー制御回路を主体とした回路のブロック図、第5図
は第4図の場合の命令ROMの番地と命令の内容を示す
1例の命令文図、第6図は第4因の各部のタイムチャー
トである。 図中1,1′はグログラムカウンタ、2は命令R−OM
13は命令レジスタ、4 、4’−i’1.デコード、
5はループカウンタ、6はアシド回路、7はノット回路
、8はスタック、9はエンドアドレス設定レジスタ、l
Oは比較器を示す。
Fig. 1 is a block diagram of a circuit mainly consisting of a conventional loop 1 control circuit, the second figure is an example instruction statement diagram showing the address of the instruction ROIVi and the contents of the instruction in the case of figure 1, and Fig. 3 1 is a time chart of each part in FIG. 1, FIG. 4 is a block diagram of a circuit mainly consisting of a rune control circuit according to an embodiment of the present invention, and FIG. 5 is an address of the instruction ROM and contents of instructions in the case of FIG. 4. FIG. 6 is a time chart of each part of the fourth factor. In the figure, 1 and 1' are glogram counters, and 2 is an instruction R-OM.
13 is an instruction register; 4, 4'-i'1. decode,
5 is a loop counter, 6 is an acid circuit, 7 is a not circuit, 8 is a stack, 9 is an end address setting register, l
O indicates a comparator.

Claims (1)

【特許請求の範囲】[Claims] 命令読出し専用メモリに格納されたマイクロプログラム
命令で動作を制御されるマイクロ制御プロセッサにおい
て、命令によシループを形成する隙、ルー1文の先頭に
ルーフ命令を置き、そのルーズ命令により、ルーズの先
頭番地を、プログラムカウンタの内容を退避出来るスタ
ック、ループ命令中に設定されたループエンドの番地を
設定するレジスタ、及び該レジスタの内容と該10グラ
ムカウンタの内容を比較する比較器を設け、該比較器に
おける比較内容が一致した時、該スタックより、該グロ
グ2ムカウンタへ、ループ命令中数を格納したループカ
ウンタに設定した回数だけ先頭番地をロードするように
したことを特徴とするルーズ制御方式。
In a microcontroller whose operation is controlled by microprogram instructions stored in instruction read-only memory, a roof instruction is placed at the beginning of a loop 1 statement to form a loop with instructions, and the roof instruction is used to close the loop at the beginning of the loop. A stack that can save the contents of the program counter, a register that sets the loop end address set in the loop instruction, and a comparator that compares the contents of the register and the contents of the 10-gram counter are provided. This loose control system is characterized in that when the comparison contents in the devices match, the first address is loaded from the stack to the log counter a number of times set in a loop counter storing the number of loop instructions.
JP21014582A 1982-11-30 1982-11-30 Loop control system Pending JPS59100957A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21014582A JPS59100957A (en) 1982-11-30 1982-11-30 Loop control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21014582A JPS59100957A (en) 1982-11-30 1982-11-30 Loop control system

Publications (1)

Publication Number Publication Date
JPS59100957A true JPS59100957A (en) 1984-06-11

Family

ID=16584510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21014582A Pending JPS59100957A (en) 1982-11-30 1982-11-30 Loop control system

Country Status (1)

Country Link
JP (1) JPS59100957A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61156335A (en) * 1984-12-21 1986-07-16 アドバンスト・マイクロ・デイバイシズ・インコーポレーテツド Integrated programable controller
JPS61259339A (en) * 1985-05-13 1986-11-17 Hitachi Ltd Sequence controlling device
JPH02254540A (en) * 1989-03-29 1990-10-15 Fujitsu Ltd Instruction counter control system
JPH02287827A (en) * 1989-04-28 1990-11-27 Yokogawa Hewlett Packard Ltd Sequence control system
JPH04227541A (en) * 1990-04-23 1992-08-17 Internatl Business Mach Corp <Ibm> Method for processing control function of processer and loop

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61156335A (en) * 1984-12-21 1986-07-16 アドバンスト・マイクロ・デイバイシズ・インコーポレーテツド Integrated programable controller
JPS61259339A (en) * 1985-05-13 1986-11-17 Hitachi Ltd Sequence controlling device
JPH058451B2 (en) * 1985-05-13 1993-02-02 Hitachi Ltd
JPH02254540A (en) * 1989-03-29 1990-10-15 Fujitsu Ltd Instruction counter control system
JPH02287827A (en) * 1989-04-28 1990-11-27 Yokogawa Hewlett Packard Ltd Sequence control system
JPH04227541A (en) * 1990-04-23 1992-08-17 Internatl Business Mach Corp <Ibm> Method for processing control function of processer and loop

Similar Documents

Publication Publication Date Title
CN114153584A (en) Task processing method, equipment and storage medium for game frame circulation
JPS59100957A (en) Loop control system
JPS6019028B2 (en) information processing equipment
JPS6212529B2 (en)
JPS6226486B2 (en)
JPS62156738A (en) Program controller
JPH0328933A (en) Task control method
JPS60241104A (en) Arithmetic method of digital controller
JPH0573296A (en) Microcomputer
KR920005092Y1 (en) Apparatus for counter command of programmable controller
JPS58172757A (en) Program counter with loop counter
JPS6353643A (en) Instruction control device
JPS61220001A (en) Sequence control/direct digital control mixing type process control method
JPS63268032A (en) Loop control circuit
JPS6027032A (en) Program starting method
JPS5949644A (en) Arithmetic processing circuit of sequence controller
JPS6156814B2 (en)
JPH02103604A (en) Programmable controller
JPH0471034A (en) Multitask execution device
JPH012142A (en) Microprocessor standby instruction execution device
JPH02193228A (en) Information processor
JPS58146944A (en) Processor for information
JPH03237577A (en) Automatic sorting processing system for data flow program
JPS61127035A (en) Processor containing repetition control circuit
JPS6142055A (en) Input/output control device