JPS6230653B2 - - Google Patents
Info
- Publication number
- JPS6230653B2 JPS6230653B2 JP57169137A JP16913782A JPS6230653B2 JP S6230653 B2 JPS6230653 B2 JP S6230653B2 JP 57169137 A JP57169137 A JP 57169137A JP 16913782 A JP16913782 A JP 16913782A JP S6230653 B2 JPS6230653 B2 JP S6230653B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- register
- direct
- memory
- addressing
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/34—Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
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)
- Memory System (AREA)
Description
【発明の詳細な説明】
産業上の利用分野
本発明は、マイクロコンピユータのページアド
レス指定時のメモリアドレス制御装置に関するも
のである。DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a memory address control device for specifying a page address in a microcomputer.
従来例の構成とその問題点
マイクロコンピユータの設計において、命令効
率の向上は一つの大きな課題である。命令効率の
向上とは、ある制御の実行を小容量のプログラム
で記述することを言う。即ち命令体系が冗長の少
ないものとなつておれば、効率のよい命令体系で
あると言える。勿論、応用分野によつて命令の効
率は大きく変化するわけであるが、本発明は比較
的小規模の制御を応用対象としたマイクロコンピ
ユータのメモリ直接アドレス方法を示す。Conventional configurations and their problems Improving instruction efficiency is one of the major issues in microcomputer design. Improving instruction efficiency refers to writing the execution of a certain control in a small-sized program. In other words, if the command system has less redundancy, it can be said to be an efficient command system. Of course, the efficiency of instructions varies greatly depending on the field of application, but the present invention describes a direct memory addressing method for microcomputers intended for relatively small-scale control applications.
直接アドレス指定とは、メモリの演算オペラン
ドアドレスを命令語の中に記述するアドレス方式
である。従来、直接アドレスモードにおけるアド
レス指定は、オペランドアドレスを完全に命令語
に含ませるか、又は特定のページ(メモリの上位
アドレス部によつて指定されるメモリブロツクを
ページと言う)に対してのみ有効な命令語を設け
るかであつた。たとえば、64K語のメモリ空間を
アクセスするためには、16ビツトのアドレスが必
要であり、プログラムの操作するRAM領域が小
さい場合にも、従来の例では直接アドレス指定時
には16ビツトでアドレス指定していた。又例え
ば、0番地から255番地を0ページとして、0ペ
ージだけアクセスする限定をつけて、8ビツトの
みで直接アドレス指定する方法も従来行なわれて
いる。これは、メモリ領域を限定し、命令効率の
向上を追求したものであるが、メモリ領域の限定
によつて応用適用分野が狭くなることがある。 Direct addressing is an addressing method in which the memory operation operand address is written in the instruction word. Conventionally, addressing in direct address mode involves either completely including the operand address in the instruction word, or valid only for a specific page (the memory block specified by the upper address part of memory is called a page). The idea was to create a command word. For example, in order to access a 64K word memory space, a 16-bit address is required, and even if the RAM area to be manipulated by a program is small, in the conventional example, addressing is specified using 16 bits when directly addressing. Ta. Furthermore, for example, a method has been used in which addresses 0 to 255 are designated as page 0, and a method is used in which direct addressing is performed using only 8 bits, with the restriction that only 0 pages are accessed. Although this is aimed at improving instruction efficiency by limiting the memory area, the field of application may be narrowed due to the limitation of the memory area.
発明の目的
本発明は、2つの直接アドレス指定制御フラツ
グを新たに導入し、直接アドレスによつて演算オ
ペランドを指定する命令の語長を短くするととも
に、大きなアドレス空間をもアクセス可能とする
メモリアドレス制御装置を提供することを目的と
するものである。Purpose of the Invention The present invention introduces two new direct addressing control flags to shorten the word length of instructions that specify arithmetic operands using direct addresses, and to address memory addresses that make it possible to access large address spaces. The purpose of this invention is to provide a control device.
発明の構成
上記目的を達成するために、本発明は、上位ア
ドレスレジスタと下位アドレスレジスタとからな
るレジスタ間接指定用のためのレジスタを有し、
命令語に記述された直接アドレス指定部によつて
メモリアドレスの下位アドレスを定め、メモリア
ドレスの上位アドレスを特定アドレスとするか、
前記上位アドレスレジスタの内容とするかを選択
指定する第1のフラツグと、前記と同一の命令語
に対して、メモリアドレスの下位アドレスを前記
下位アドレスレジスタの内容とし、メモリアドレ
スの上位アドレスを命令語に記述された直接アド
レス指定部を選択する第2のフラツグを有し、前
記第1のフラツグと第2のフラツグはフラツグ操
作命令によつて制御可能とした構成にしたもので
ある。Structure of the Invention In order to achieve the above object, the present invention has a register for register indirect specification consisting of an upper address register and a lower address register,
The lower address of the memory address is determined by the direct addressing part written in the instruction word, and the upper address of the memory address is set as a specific address, or
A first flag that selects and specifies whether the content of the upper address register is to be set, and for the same instruction word as above, the lower address of the memory address is set to the content of the lower address register, and the upper address of the memory address is set to the instruction. The device has a second flag for selecting a direct addressing section written in a word, and the first flag and the second flag can be controlled by a flag operation command.
実施例の説明
以下本発明の一実施例を図面に基づいて説明す
る。第1図は本発明のメモリアドレス指定モード
の一例を説明するものである。メモリアドレスレ
ジスタとして、H及びLレジスタがある。Hは上
位アドレスレジスタ、Lは下位アドレスレジスタ
である。以後の説明では、H,Lレジスタはそれ
ぞれ8ビツトのレジスタであるとする。DESCRIPTION OF EMBODIMENTS An embodiment of the present invention will be described below based on the drawings. FIG. 1 illustrates an example of the memory addressing mode of the present invention. There are H and L registers as memory address registers. H is an upper address register, and L is a lower address register. In the following description, it is assumed that the H and L registers are each 8-bit registers.
第1図aはいわゆるレジスタ間接アドレス指定
モードを示すものである。すなわち、(H,L)
で指定されたメモリの内容がオペランドとなる。 FIG. 1a shows the so-called register indirect addressing mode. That is, (H,L)
The contents of the memory specified by are the operands.
第1図b及びcは直接アドレス指定モードにお
けるアドレスを示すものである。bとcの相異点
は、上位アドレス部がbの場合は、“0”となつ
ており、cの場合は、上位アドレス部がHレジス
タで指定されることである。別の言い方をすれ
ば、bは特定ページ中の直接アドレス指定モード
であり、cは任意ページ中の直接アドレス指定モ
ードである。 Figures 1b and 1c show addresses in direct addressing mode. The difference between b and c is that in the case of b, the upper address part is "0", and in the case of c, the upper address part is specified by the H register. Stated another way, b is the direct addressing mode in a particular page and c is the direct addressing mode in any page.
第1図dは上位アドレス部が直接アドレスによ
つて指定され、下位アドレス部はレジスタLによ
つて指示されるアドレスモードである。このモー
ドの使い方は後で説明する。 FIG. 1d shows an address mode in which the upper address part is designated by a direct address and the lower address part is designated by register L. How to use this mode will be explained later.
本発明のポイントは、直接アドレス指定モード
において、第1図b,c及びdにおいて同一の命
令語を使いアドレス指定を識別制御するため、2
つの直接アドレス制御フラツグDFA及びDFBを導
入することにある。例えば第1図bの場合は
(DFA,DFB)=(1,0)、第1図cの場合は、
(DFA,DFB)=(0,0)、第1図dの場合は
(DFA,DFB)=(0,1)と制御される。 The key point of the present invention is that in the direct addressing mode, the same command words are used in FIG.
The present invention consists in introducing two direct address control flags DF A and DF B. For example, in the case of Figure 1 b, (DF A , DF B ) = (1, 0), and in the case of Figure 1 c,
(DF A , DF B )=(0, 0), and in the case of FIG. 1d, (DF A , DF B )=(0, 1).
第2図は本発明によるレジスタ間接及び直接ア
ドレス指定モードを有するロード命令Lの命令語
構成を示す。第2図aはレジスタ間接アドレス指
定モードの、第2図bは直接アドレス指定モード
の命令語構成である。ロード命令におけるアドレ
スモードの識別は、1語目の最下位ビツト
(LSB)によつて行なわれる。第2図bの直接ア
ドレス指定モードにおいては、DFA及びDFBの状
態によつて、第1図のb,c,dの如くアドレス
指定制御される。 FIG. 2 shows the instruction word structure of a load instruction L having register indirect and direct addressing modes according to the present invention. FIG. 2a shows the instruction word structure for the register indirect addressing mode, and FIG. 2b shows the instruction word structure for the direct addressing mode. The address mode in a load instruction is identified by the least significant bit (LSB) of the first word. In the direct addressing mode shown in FIG. 2b, addressing is controlled as shown in b, c, and d in FIG. 1 depending on the states of DF A and DF B.
第3図に第1図dの直接アドレスモードの一使
用例を示す。メモリの各ページの対応するアドレ
ス、たとえば0ページのα番地に対し、1ページ
のα+256番地、2ページのα+512番地、3ペー
ジのα+768番地に演算制御を実行するうえで密
接に関連するデータを格納しておくことがよくあ
る。このとき、αはレジスタで指し示すが、ペー
ジに相当する上位アドレス部は、直接アドレス指
示することによつて、処理プログラムの容量が大
幅に減少することが予想される。なお、下位アド
レス部であるαをレジスタで指定する理由は、α
はプログラム実行において、順次変化させられる
ことが多いからである。例えば、0番地、256番
地、512番地、768番地に格納されているデータの
処理終了後、下位アドレス部のレジスタをインク
レメントし、1番地、257番地、513番地、769番
地に格納されているデータの処理するのに都合が
よい。 FIG. 3 shows an example of the use of the direct address mode of FIG. 1d. Data closely related to the execution of arithmetic control is stored at the corresponding address of each page of memory, for example, address α on page 0, address α+256 on page 1, address α+512 on page 2, and address α+768 on page 3. It is often necessary to do so. At this time, α is pointed to by a register, but it is expected that the capacity of the processing program will be significantly reduced by directly pointing to the upper address part corresponding to the page. The reason why α, which is the lower address part, is specified by a register is that α
This is because they are often changed sequentially during program execution. For example, after completing the processing of the data stored at addresses 0, 256, 512, and 768, the register in the lower address part is incremented, and the data stored at addresses 1, 257, 513, and 769 is processed. Convenient for processing data.
すなわち、本アドレス指定制御方式の採用によ
つて、3つの直接アドレスモードを一つの命令語
によつて処理可能となる。ここで、アドレス制御
フラツグを導入せずに、以上のアドレスモード毎
に命令語を定義することも考えられるが、命令語
を増すことは必ずしも得策と言えない。というの
は、一般に、マイクロコンピユータの命令語の語
長は短いため、あまり使用頻度の高くない命令に
対して命令語を割り当てることは、全体の命令体
系構成上不利となるからである。しかしながら、
使用頻度がそれ程高くないからと言つて、それら
の命令を全て省略することは、マイクロコンピユ
ータにとつて、致命的な欠陥となる可能性があ
る。 That is, by adopting this addressing control system, three direct address modes can be processed using one instruction word. Here, it is possible to define instruction words for each of the above address modes without introducing an address control flag, but increasing the number of instruction words is not necessarily a good idea. This is because the word length of the instruction words of microcomputers is generally short, so assigning instruction words to instructions that are not used very frequently is disadvantageous in terms of the overall instruction system configuration. however,
Omitting all of these instructions, even if they are not used very often, could be a fatal flaw for a microcomputer.
第4図は、これまでに示したアドレス指定方法
を実現するメモリアドレス制御方法の一構成実施
例である。第4図において、1は第1の直接アド
レス制御フラツグ(DFA)、2は第2の直接アド
レス制御フラツグ(DFB)である。各DFA,DFB
1,2において、それぞれ図示されていない
CPUの命令デコード部よりの出力信号が、DFA
セツト信号線11、DFAリセツト信号線12、
DFBセツト信号線13、DFBリセツト信号線14
に印加され、各信号線はDFA1,DFB2のそれぞ
れセツト端子、リセツト端子に接続されており、
DFA1,DFB2は指定制御される。10は直接ア
ドレス指定制御信号線であり、本回路において、
直接アドレス指定モードの時に論理値“1”が、
レジスタ間接指定モードの時に論理値“0”が印
加される。16は直接アドレス信号線で、直接ア
ドレス指定モードの時に直接アドレスが印加され
る。 FIG. 4 shows a configuration example of a memory address control method that implements the addressing methods described above. In FIG. 4, 1 is a first direct address control flag (DF A ), and 2 is a second direct address control flag (DF B ). Each DF A , DF B
1 and 2, not shown respectively.
The output signal from the instruction decoding section of the CPU is DF A
Set signal line 11, DFA reset signal line 12,
DF B set signal line 13, DF B reset signal line 14
Each signal line is connected to the set terminal and reset terminal of DF A 1 and DF B 2, respectively.
DF A 1 and DF B 2 are designated and controlled. 10 is a direct addressing control signal line, and in this circuit,
When in direct addressing mode, logical value “1”
A logical value "0" is applied in the register indirect designation mode. 16 is a direct address signal line to which a direct address is applied in the direct addressing mode.
3は上位アドレスレジスタH、4は下位アドレ
スレジスタLである。ANDゲート5はNANDゲ
ート9の出力が“0”の時出力を“0”とし、
NANDゲート9の出力が1の時レジスタH3の内
容を出力する。MUXA6はマルチプレクサであ
り、ORゲート8の出力が“0”の時に直接アド
レス信号を、ORゲート8の出力が“1”の時に
レジスタL4の内容を出力する。MUXB7はマ
ルチプレクサであり、DFB=0の時にANDゲー
ト5の出力を、DFB=1の時に直接アドレス信号
を出力する。 3 is an upper address register H, and 4 is a lower address register L. AND gate 5 outputs "0" when the output of NAND gate 9 is "0",
When the output of NAND gate 9 is 1, the contents of register H3 are output. MUXA6 is a multiplexer, which outputs a direct address signal when the output of OR gate 8 is "0", and outputs the contents of register L4 when the output of OR gate 8 is "1". MUXB7 is a multiplexer, which outputs the output of the AND gate 5 when DF B =0, and directly outputs an address signal when DF B =1.
次に、本回路によるメモリアドレス生成動作を
第1図のa,b,c,dのそれぞれの場合につい
て説明する。 Next, the memory address generation operation by this circuit will be explained for each of cases a, b, c, and d in FIG.
aの場合
直接アドレス推定制御信号(信号線10上の信
号)=0 DFA=0 DFB=0
メモリアドレスの上位アドレス18には、レジ
スタH3の内容がANDゲート5、MUXB7を通
して出力される。またメモリアドレスの下位アド
レス17には、レジスタL4の内容がMUXA6
を通して出力される。In case a, direct address estimation control signal (signal on signal line 10) = 0 DF A = 0 DF B = 0 The contents of register H3 are output to the upper address 18 of the memory address through AND gate 5 and MUXB7. Furthermore, the contents of register L4 are stored in MUXA6 at lower address 17 of the memory address.
is output through.
bの場合
直接アドレス指定制御信号=1 DFA=1
DFB=0
メモリアドレスの上位アドレス18には、
ANDゲート5によつて生成された“0”信号が
MUXB7を通して出力される。また、メモリア
ドレスの下位アドレス17には、直接アドレス信
号線16に印加される直接アドレスがMUXA6
を通して出力される。For b Direct addressing control signal = 1 DF A = 1
DF B =0 The upper address 18 of the memory address is
The “0” signal generated by AND gate 5 is
Output through MUXB7. In addition, the direct address applied to the direct address signal line 16 is assigned to the lower address 17 of the memory address.
is output through.
cの場合
直接アドレス指定制御信号=1 DFA=0
DFB=0
メモリアドレスの上位アドレス18には、
ANDゲート5とMUXB7を通して、レジスタH
3の内容が出力される。また、メモリアドレスの
下位アドレス17には、直接アドレス信号線16
に印加される直接アドレスがMUXA6を通して
出力される。In the case of c, direct addressing control signal = 1 DF A = 0
DF B =0 The upper address 18 of the memory address is
Through AND gate 5 and MUXB7, register H
The contents of 3 are output. Further, the lower address 17 of the memory address is directly connected to the address signal line 16.
The direct address applied to is output through MUXA6.
dの場合
直接アドレス指定制御信号=1 DFA=0
DFB=1
メモリアドレスの上位アドレス18には、
MUXB7を介して直接アドレス信号線16に印
加される直接アドレスが出力される。またメモリ
アドレスの下位アドレス17には、レジスタL4
の内容がMUXA6を通して出力される。In the case of d, direct addressing control signal = 1 DF A = 0
DF B = 1 The upper address 18 of the memory address is
A direct address applied to the direct address signal line 16 is output via MUXB7. Also, at the lower address 17 of the memory address, there is a register L4.
The contents of are output through MUXA6.
この説明によつて明らかなように、第4図に示
したメモリアドレス制御回路により、第1図で述
べたメモリアドレス指定が可能となる。 As is clear from this explanation, the memory address control circuit shown in FIG. 4 enables the memory addressing described in FIG. 1.
発明の効果
以上本発明によれば、フラツグ操作命令によつ
て制御可能な2つの直接アドレス指定制御フラツ
グを導入したので、直接アドレス指定時の命令語
長を短くすることが可能となると同時に、第1図
のdの様な効果的な直接アドレス指定が1命令語
で可能となり、その結果、命令効率のよい、高機
能なマイクロコンピユータが実現できるに至つた
ものである。Effects of the Invention As described above, according to the present invention, two direct addressing control flags that can be controlled by flag manipulation instructions are introduced, so it is possible to shorten the instruction word length during direct addressing, and at the same time Effective direct addressing as shown in d in Figure 1 becomes possible with a single instruction word, and as a result, a highly functional microcomputer with high instruction efficiency can be realized.
第1図は本発明によるメモリアドレス指定モー
ド例を説明する図、第2図は本発明のレジスタ間
接及び直接アドレス指定モードの命令形式例を説
明する図、第3図はバンク直接アドレス指定モー
ドの利用説明図、第4図は本発明の一実施例を示
すメモリアドレス制御回路図である。
1……直接アドレス制御フラツグ(DFA)、2
……直接アドレス制御フラツグ(DFB)、3……
上位アドレスレジスタ、4……下位アドレスレジ
スタ、5……ANDゲート、6……マルチプレク
サ(MUXA)、7……マルチプレクサ
(MUXB)。
FIG. 1 is a diagram for explaining an example of the memory addressing mode according to the present invention, FIG. 2 is a diagram for explaining an example of the instruction format of the register indirect and direct addressing modes of the present invention, and FIG. 3 is a diagram for explaining the example of the bank direct addressing mode. FIG. 4 is a memory address control circuit diagram showing an embodiment of the present invention. 1...Direct address control flag (DF A ), 2
...Direct address control flag ( DFB ), 3...
Upper address register, 4... Lower address register, 5... AND gate, 6... Multiplexer (MUXA), 7... Multiplexer (MUXB).
Claims (1)
タとからなるレジスタ間接指定用のためのレジス
タを有し、命令語に記述された直接アドレス指定
部によつてメモリアドレスの下位アドレスを定
め、メモリアドレスの上位アドレスを特定アドレ
スとするか、前記上位アドレスレジスタの内容と
するかを選択指定する第1のフラツグと、前記と
同一の命令語に対してメモリアドレスの下位アド
レスを前記下位アドレスレジスタの内容とし、メ
モリアドレスの上位アドレスを命令語に記述され
た直接アドレス指定部を選択する第2のフラツグ
を有し、前記第1のフラツグと第2のフラツグは
フラツグ操作命令によつて制御可能としたことを
特徴とするメモリアドレス制御装置。1 It has a register for indirect register specification consisting of an upper address register and a lower address register, and determines the lower address of a memory address by the direct address specification section written in the instruction word, and the upper address of the memory address. A first flag that selects and specifies whether to use a specific address or the contents of the upper address register, and a memory address that sets the lower address of the memory address to the contents of the lower address register for the same instruction word as above. The first flag and the second flag are controllable by a flag manipulation command. memory address control device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57169137A JPS5957347A (en) | 1982-09-27 | 1982-09-27 | Memory address controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57169137A JPS5957347A (en) | 1982-09-27 | 1982-09-27 | Memory address controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5957347A JPS5957347A (en) | 1984-04-02 |
| JPS6230653B2 true JPS6230653B2 (en) | 1987-07-03 |
Family
ID=15880966
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57169137A Granted JPS5957347A (en) | 1982-09-27 | 1982-09-27 | Memory address controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5957347A (en) |
-
1982
- 1982-09-27 JP JP57169137A patent/JPS5957347A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5957347A (en) | 1984-04-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4654781A (en) | Byte addressable memory for variable length instructions and data | |
| US5319763A (en) | Data processor with concurrent static and dynamic masking of operand information and method therefor | |
| US5341500A (en) | Data processor with combined static and dynamic masking of operand for breakpoint operation | |
| US5574880A (en) | Mechanism for performing wrap-around reads during split-wordline reads | |
| JPH0248931B2 (en) | ||
| JPH0844565A (en) | Register file device and register file access method | |
| US4296468A (en) | Address conversion unit for data processing system | |
| JPS6230653B2 (en) | ||
| GB2108737A (en) | Byte addressable memory for variable length instructions and data | |
| US4747066A (en) | Arithmetic unit | |
| US6363469B1 (en) | Address generation apparatus | |
| JP2860655B2 (en) | Parallel instruction execution type processor | |
| JPS6148174B2 (en) | ||
| JPS6155755A (en) | memory controller | |
| JP2954988B2 (en) | Information processing device | |
| JP2659886B2 (en) | Processor system | |
| JPS62208145A (en) | Addressing method | |
| JPS6180331A (en) | Variable length data processor | |
| JPS62210541A (en) | Register selecting system | |
| JPH0338612B2 (en) | ||
| JPS6329295B2 (en) | ||
| JPS6047614B2 (en) | information processing equipment | |
| JPS6388657A (en) | Memory device | |
| JPS61147333A (en) | Register select circuit | |
| JPS6331816B2 (en) |