JPS6234239A - Logic constant setting system - Google Patents

Logic constant setting system

Info

Publication number
JPS6234239A
JPS6234239A JP17339985A JP17339985A JPS6234239A JP S6234239 A JPS6234239 A JP S6234239A JP 17339985 A JP17339985 A JP 17339985A JP 17339985 A JP17339985 A JP 17339985A JP S6234239 A JPS6234239 A JP S6234239A
Authority
JP
Japan
Prior art keywords
value
data
register
instruction
multiplexer
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
JP17339985A
Other languages
Japanese (ja)
Inventor
Takeshi Shinoki
剛 篠木
Akio Shinagawa
明雄 品川
Masashi Niwa
雅司 丹羽
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 JP17339985A priority Critical patent/JPS6234239A/en
Publication of JPS6234239A publication Critical patent/JPS6234239A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To attain the processing at a high speed with the titled system by setting the genuine/false value of a logic constant to a memory or a register with a single machine cycle, a signal microinstruction or a single machine instruction in response to the success/failure of conditions. CONSTITUTION:The arithmetic result, the genuine data T and the false value data NIL are supplied to a multiplexer 1 from an arithmetic and logic unit 4 and one of these three factors is outputted to be set to a designated register 2. Thus the unit 4 calculates the operand of the register 2 in a designated mode. The data T or the data NIL is set when a conditional flag 5 is turned on or off respectively. A decoder 9 controls the output signal according to the instruction received and the value of the flag 5. Thus a logic constant can be set in two steps.

Description

【発明の詳細な説明】 〔概要〕 条件の成立/不成立に応じてメモリ又はレジスタに論理
定数を分岐命令を使用することなく設定するものである
[Detailed Description of the Invention] [Summary] A logical constant is set in a memory or a register according to whether a condition is met or not, without using a branch instruction.

〔産業上の利用分野〕[Industrial application field]

本発明は、論理定数を有する言語の処理装置に係わり、
特に論理定数のメモリ又はレジスタへの設定を高速に実
行できる論理定数設定方式に関するものである。
The present invention relates to a processing device for a language having logical constants,
In particular, the present invention relates to a logic constant setting method that can quickly set logic constants in memory or registers.

〔従来技術と問題点〕[Prior art and problems]

例えばLi5p言語では論理定数を取り扱うことが出来
る。論理定数は真値及び偽値を取ることが出来る。論理
定数を取り扱うLi5pプログラムは例えば下記のよう
なものである。
For example, the Li5p language can handle logical constants. Logical constants can take true and false values. An example of a Li5p program that handles logical constants is as follows.

(SETQ  A (>=XY)) このLi5pプログラムはXが7以上のときには変数/
lこ真値(TRUE)を代入し、それ以外の場合には偽
値(NIL)を代入すべきことを意味している。第3図
は上述のLi5pプログラムを実行するための従来の処
理の流れを示す図である。
(SETQ A (>=XY)) This Li5p program sets the variable / when X is 7 or more.
This means that a true value (TRUE) should be substituted in each case, and a false value (NIL) should be substituted in other cases. FIG. 3 is a diagram showing a conventional process flow for executing the above-mentioned Li5p program.

第3図の処理はマイクロプログラム又は機械語プログラ
ムの実行によりなされる。第3図に示すような従来の方
法では、■で条件を計算して条件フラグを立て、■でそ
の条件フラグを見て分析する。
The processing shown in FIG. 3 is performed by executing a microprogram or a machine language program. In the conventional method as shown in FIG. 3, the condition is calculated in step 2 and a condition flag is set, and the condition flag is viewed and analyzed in step 2.

条件フラグがoffのときは■でNIL (偽値)をD
estinationに設定し、■で次処理へ分岐する
When the condition flag is off, press ■ to set NIL (false value) to D.
estination, and branch to the next process at ■.

条件フラグがonのときは■で分岐し■でT(真値)を
Destinationに設定し、次処理に進む。
When the condition flag is on, the process branches at ■, sets T (true value) as Destination at ■, and proceeds to the next process.

条件の成立/不成立に応じて論理定数をメモリ又はレジ
スタに設定するために、条件による分岐命令を用い、条
件の成立/不成立に応じて分岐命令の飛び先き又は次命
令で論理定数を設定する従来方法は、分岐命令を含んで
いるので、処理時間が長くなると言う欠点を有しでいる
Use a conditional branch instruction to set a logical constant in memory or a register depending on whether a condition is met or not, and set the logical constant at the destination of the branch instruction or the next instruction depending on whether the condition is met or not. The conventional method has the disadvantage that the processing time is long because it includes a branch instruction.

〔発明の目的〕[Purpose of the invention]

本発明は、上記の考察に岱づくものであって、従来技術
で述べた分岐命令をなくし、論理定数の設定を行うこと
を目的としている。
The present invention is based on the above considerations, and aims to eliminate the branch instructions described in the prior art and to set logical constants.

〔目的を達成するための手段〕[Means to achieve the purpose]

そしてそのため本発明の論理定数設定方式は、論理定数
を有する言語の処理装置における論理定数設定方式であ
って、真値データ、偽値データ及び一般値が人力される
と共に選択信号の値に応じてこれらのデータの中の1個
を出力するマルチプレクサと、該マルチプレクサの出力
を記憶する手段と、条件フラグと、該条件フラグの値を
定める手段と、命令レジスタと、該命令レジスタ内の命
令及び上記条件フラグの値が入力されるデコーダとを具
備し、上記デコーダは、上記条件フラグの値が所定値で
あり且つ所定の命令が入力されたとき真値データを出力
すべきことを指示するマルチプレクサ選択信号を出力し
、上記条件フラグの値が他の所定値であり且つ所定の命
令が入力されたとき偽値データを出力すべきことを指示
するマルチプレクサ選択信号を出力するように構成され
ていることを特徴とするものである。
Therefore, the logical constant setting method of the present invention is a logical constant setting method in a language processing device having logical constants, in which true value data, false value data, and general values are input manually and are also set according to the value of a selection signal. a multiplexer for outputting one of these data, a means for storing the output of the multiplexer, a condition flag, a means for determining the value of the condition flag, an instruction register, an instruction in the instruction register and the above. a decoder to which the value of the condition flag is input; the decoder includes a multiplexer selector for instructing that true value data should be output when the value of the condition flag is a predetermined value and a predetermined instruction is input; and is configured to output a multiplexer selection signal instructing that false value data should be output when the value of the condition flag is another predetermined value and a predetermined command is input. It is characterized by:

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。第1図は本
発明の1実施例のブロック図、第2図は本発明における
論理定数を設定するだめの処理の流れを示す図である。
Hereinafter, the present invention will be explained with reference to the drawings. FIG. 1 is a block diagram of one embodiment of the present invention, and FIG. 2 is a diagram showing the flow of processing for setting logical constants in the present invention.

第1図において、■はマルチプレクサ、2はレジスタ、
3はメモリ、4は演算論理ユニット、5は条件フラグ、
6はプログラム・カウンタ、7はメモリ、8は命令レジ
スタ、9はデコーダをそれぞれ示している。マルチプレ
クサ1には、演算論理ユニット4がらの演算結果(一般
値)、T(真値)データ、N I L (偽値)データ
が入力され、選択信号の値に応じてその中の1個が出力
され、指定されたレジスタ2にセットされる。なお、レ
ジスタ2は1個しか図示されていないが、実際には複数
個存在するものである。演算論理ユニット4は指定され
たレジスタ2の演算数を指定された態様で演算する。条
件フラグ5は、例えばXからYを減算したとき結果が0
以上であればon(論理1)にセットされ、0より小で
あればorfされる。メモリ7にはマイクロプログラム
又は機械語プログラムが格納されている。プログラム・
カウンタ6で指定された番地の命令がメモリ7から読み
出され、この命令は命令レジスタ8にセットされる。命
令レジスタ8の命令はデコーダ9に送られ、デコーダ9
は受は取った命令及び条件フラグ5の値に従って出力信
号を制御する。
In Figure 1, ■ is a multiplexer, 2 is a register,
3 is a memory, 4 is an arithmetic logic unit, 5 is a condition flag,
6 is a program counter, 7 is a memory, 8 is an instruction register, and 9 is a decoder. The multiplexer 1 receives the operation results (general value), T (true value) data, and N I L (false value) data from the arithmetic logic unit 4, and selects one of them according to the value of the selection signal. It is output and set in the designated register 2. Although only one register 2 is shown in the figure, there are actually a plurality of registers. The arithmetic logic unit 4 calculates the arithmetic number in the specified register 2 in a specified manner. Condition flag 5 indicates that, for example, when Y is subtracted from X, the result is 0.
If it is greater than or equal to 0, it is set to on (logical 1), and if it is less than 0, it is orfed. The memory 7 stores microprograms or machine language programs. program·
The instruction at the address specified by the counter 6 is read from the memory 7, and this instruction is set in the instruction register 8. The instruction in the instruction register 8 is sent to the decoder 9.
The receiver controls the output signal according to the received command and the value of condition flag 5.

第2図は本発明における論理定数を設定するだめの処理
の流れを示す図である。この処理はメモリ7に格納され
ているプログラムを実行することによりなされる。第2
図に示すように、■で条件を計算し、■でその条件フラ
グを見てonならTが、offならN I L−/J<
Destinationに設定され、次処理に進む。こ
のように、本発明においては論理定数を設定するための
処理は2stepで終了するが、第3図に示したような
従来方法では真値設定に3step、偽値設定に4st
epを要する。
FIG. 2 is a diagram showing the flow of processing for setting logical constants in the present invention. This process is performed by executing a program stored in the memory 7. Second
As shown in the figure, the condition is calculated in ■, and the condition flag is checked in ■. If it is on, it is T, and if it is off, it is N I L-/J<
It is set as Destination and proceeds to the next process. In this way, in the present invention, the process for setting a logical constant is completed in 2 steps, but in the conventional method shown in FIG.
It requires an ep.

第1図において、条件フラグ5の値がonで且つ命令レ
ジスタ8の命令が第2図の■の処理を行う命令である場
合、マルチプレクサ選択信号はT(真値)を出力すべき
ことを指令する値となり、また条件フラグ5の値がof
fで且つ命令レジスタ8の命令が第2図の■の処理を行
う命令である場合、マルチプレクサ選択信号はNIL 
(偽値)を出力すべきことを指令する値となる。なお、
論理定数の書き込み先をメモリとすることが出来ること
は当然である。
In FIG. 1, if the value of condition flag 5 is on and the instruction in instruction register 8 is an instruction to perform the process (■) in FIG. 2, the multiplexer selection signal instructs that T (true value) should be output. and the value of condition flag 5 is off.
f and the instruction in the instruction register 8 is an instruction that performs the process (■) in FIG. 2, the multiplexer selection signal is NIL.
This is a value that instructs that a (false value) should be output. In addition,
It goes without saying that the logical constants can be written to memory.

〔発明Φ効果〕[Invention Φ effect]

以上の説明から明らかなように、本発明によれば、条件
の成立/不成立に応じてメモリ又はレジスタに論理定数
の真値/偽値を1マシン・サイクル、1マイクロ命令又
はlマシン命令で設定できるため、高速処理が可能とな
る。
As is clear from the above description, according to the present invention, a true value/false value of a logical constant is set in a memory or register in one machine cycle, one microinstruction, or one machine instruction depending on whether a condition is met or not. This enables high-speed processing.

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

第1図は本発明の1実施例のブロック図、第2図は論理
定数を設定するための本発明の詳細な説明する図、第3
図は論理定数を設定するための従来方法を説明する図で
ある。 l・・・マルチプレクサ、2・・・レジスタ、3°゛メ
モリ、4・・・演算論理ユニット、5・・・条件フラグ
、6・・・プログラム・カウンタ、7・・・メモリ、8
・・・命令レジスタ、9・・・デコーダ。
FIG. 1 is a block diagram of one embodiment of the present invention, FIG. 2 is a detailed diagram of the present invention for setting logical constants, and FIG.
The figure is a diagram illustrating a conventional method for setting logical constants. l...Multiplexer, 2...Register, 3°゛memory, 4...Arithmetic logic unit, 5...Condition flag, 6...Program counter, 7...Memory, 8
...Instruction register, 9...Decoder.

Claims (1)

【特許請求の範囲】[Claims] 論理定数を有する言語の処理装置における論理定数設定
方式であって、真値データ、偽値データ及び一般値が入
力されると共に選択信号の値に応じてこれらのデータの
中の1個を出力するマルチプレクサと、該マルチプレク
サの出力を記憶する手段と、条件フラグと、該条件フラ
グの値を定める手段と、命令レジスタと、該命令レジス
タ内の命令及び上記条件フラグの値が入力されるデコー
ダとを具備し、上記デコーダは、上記条件フラグの値が
所定値であり且つ所定の命令が入力されたとき真値デー
タを出力すべきことを指示するマルチプレクサ選択信号
を出力し、上記条件フラグの値が他の所定値であり且つ
所定の命令が入力されたとき偽値データを出力すべきこ
とを指示するマルチプレクサ選択信号を出力するように
構成されていることを特徴とする論理定数設定方式。
A logical constant setting method in a language processing device having logical constants, in which true value data, false value data, and general values are input, and one of these data is output according to the value of a selection signal. A multiplexer, means for storing the output of the multiplexer, a condition flag, means for determining the value of the condition flag, an instruction register, and a decoder into which the instructions in the instruction register and the value of the condition flag are input. The decoder outputs a multiplexer selection signal instructing that true value data should be output when the value of the condition flag is a predetermined value and a predetermined command is input; 1. A logic constant setting method, characterized in that the logic constant setting method is configured to output a multiplexer selection signal instructing that false value data should be output when the other predetermined value and a predetermined command are input.
JP17339985A 1985-08-07 1985-08-07 Logic constant setting system Pending JPS6234239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17339985A JPS6234239A (en) 1985-08-07 1985-08-07 Logic constant setting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17339985A JPS6234239A (en) 1985-08-07 1985-08-07 Logic constant setting system

Publications (1)

Publication Number Publication Date
JPS6234239A true JPS6234239A (en) 1987-02-14

Family

ID=15959690

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17339985A Pending JPS6234239A (en) 1985-08-07 1985-08-07 Logic constant setting system

Country Status (1)

Country Link
JP (1) JPS6234239A (en)

Similar Documents

Publication Publication Date Title
JP3237858B2 (en) Arithmetic unit
US5276822A (en) System with enhanced execution of address-conflicting instructions using immediate data latch for holding immediate data of a preceding instruction
JPH0772864B2 (en) Digital signal processor
JPS6234239A (en) Logic constant setting system
JP2577023B2 (en) Address extension control method for information processing equipment
JPH0218729B2 (en)
JPS6315628B2 (en)
JP2925842B2 (en) Pipeline processing equipment
JPH0793151A (en) Instruction supplying device
JPH01271840A (en) Microcomputer
JPS60250438A (en) Information processor
JP2825315B2 (en) Information processing device
JPH0228724A (en) System for controlling branching instruction
JPS6116334A (en) Data processor
JPH04116726A (en) Information processor
JPS63253434A (en) Signal processing system
JPS60163131A (en) Information processing unit
JPS58169243A (en) Instruction processor
JPH0353322A (en) Information processor
JPS59160239A (en) Information processing device
JPS62288939A (en) Information processor
JPH05197543A (en) Instruction decoding system of information processor
JPH0559451B2 (en)
JPS63284640A (en) Instruction decoding device
JPH02219173A (en) Central processing unit for executing parallel processing of plural instructions