JP2001265591A - Cpu - Google Patents

Cpu

Info

Publication number
JP2001265591A
JP2001265591A JP2000075181A JP2000075181A JP2001265591A JP 2001265591 A JP2001265591 A JP 2001265591A JP 2000075181 A JP2000075181 A JP 2000075181A JP 2000075181 A JP2000075181 A JP 2000075181A JP 2001265591 A JP2001265591 A JP 2001265591A
Authority
JP
Japan
Prior art keywords
address
input
instruction
jump
page
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
JP2000075181A
Other languages
Japanese (ja)
Inventor
Mamoru Tsunoda
護 角田
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP2000075181A priority Critical patent/JP2001265591A/en
Publication of JP2001265591A publication Critical patent/JP2001265591A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a CPU by which an existent assembler can be used as it is and an address space is extended by simple circuit constitution while the increase of instruction is suppressed. SOLUTION: The address signal A <15:0> of 16 bits generated when a jumping instruction is performed is decoded by a decoder 20, fixed data from outside is selected in accordance with a decoded 3-bit decode data by a selector 30 to be inputted to a CPU core 10 to output an extension address signal A<17:16> from the CPU core 10.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、命令をフェッチし
てフェッチした命令を実行するCPUに関する。
The present invention relates to a CPU that fetches an instruction and executes the fetched instruction.

【0002】[0002]

【従来の技術】近年のLSI技術の発達によって、メモ
リの大容量化が進んでおり、それに伴って、CPUにお
いても広いアドレス空間を取り扱うことが要求されてい
る。従来より、広いアドレス空間を取り扱うために、以
下の2つの手法が知られている。第1の手法は、CPU
の命令デコード部分を変更して、広いアドレス空間を取
り扱うための新たな命令を追加する手法である。第2の
手法は、CPUをそのまま使用し、MMU(Memor
y Management Unit)を用いてアドレ
ス空間を拡張する手法である。
2. Description of the Related Art With the development of LSI technology in recent years, the capacity of memories has been increased, and accordingly, it has been required that CPUs also handle a wide address space. Conventionally, the following two methods have been known for handling a wide address space. The first method is CPU
In this method, a new instruction for handling a wide address space is added by changing the instruction decoding part of the instruction. In the second method, the CPU is used as it is, and the MMU (Memory
y Management Unit) to expand the address space.

【0003】[0003]

【発明が解決しようとする課題】しかし、第1の手法で
は、CPUの命令デコード部分を変更する必要がある。
一般に、CPUの命令デコード部分は、多種多様の命令
をデコードするため、複雑な回路構成となっており、新
たな命令を追加するためにこの命令デコード部分を変更
した場合は、その変更に伴って他の命令の動作が正しく
実行されるか否かを検証する必要があり、非常に膨大な
作業となり、開発期間が長くなるという問題がある。ま
た、新命令を追加することは必ずしも簡単ではなく、例
えば全ての命令コード00h〜FFh(「h」は16進
数表示を示す)にわたり命令が定義されている8ビット
CPUにおいて新たな命令を追加する場合、例えば従来
の命令コードFFhを“FFh+00h”とし、新命令
コードを“FFh+01h”にするというように、1バ
イトの命令コードを2バイトの命令コードに変更する必
要がある。このため、マシン語レベルでの互換性が保た
れなくなり、従って既存のアセンブラをそのまま利用す
ることは困難であるという問題が発生する。
However, in the first method, it is necessary to change the instruction decoding part of the CPU.
In general, the instruction decoding portion of the CPU has a complicated circuit configuration for decoding a wide variety of instructions. If the instruction decoding portion is changed to add a new instruction, the instruction decoding portion is accompanied by the change. It is necessary to verify whether or not the operation of another instruction is executed correctly, which is a very enormous amount of work and has a problem that the development period is lengthened. It is not always easy to add a new instruction. For example, a new instruction is added in an 8-bit CPU in which instructions are defined over all instruction codes 00h to FFh ("h" indicates hexadecimal notation). In this case, for example, the 1-byte instruction code needs to be changed to a 2-byte instruction code such that the conventional instruction code FFh is “FFh + 00h” and the new instruction code is “FFh + 01h”. Therefore, compatibility at the machine language level cannot be maintained, and it is difficult to use the existing assembler as it is.

【0004】また、第2の手法では、MMUによりメモ
リ空間の一部あるいは全てがバンク化されてアドレス空
間の拡張が行なわれるが、その場合、バンク切替用のプ
ログラムを挿入する必要があり、この挿入されるプログ
ラムは複雑であり、従って命令コードの増大を招くとい
う欠点がある。
In the second method, a part or all of the memory space is banked by the MMU to expand the address space. In this case, it is necessary to insert a bank switching program. The inserted program is complex and therefore has the disadvantage of increasing the instruction code.

【0005】本発明は、上記事情に鑑み、既存のアセン
ブラがそのまま利用できるとともに、命令コードの増大
を抑えたまま簡単な回路構成でアドレス空間の拡張化が
図られたCPUを提供することを目的とする。
In view of the above circumstances, an object of the present invention is to provide a CPU in which an existing assembler can be used as it is and an address space is expanded with a simple circuit configuration while suppressing an increase in instruction codes. And

【0006】[0006]

【課題を解決するための手段】上記目的を達成する本発
明のCPUは、命令をフェッチしてフェッチした命令を
実行するCPUにおいて、アクセスしようとするアドレ
スを生成するアドレス生成回路と、所定のタイミングで
上記アドレス生成回路で生成されたアドレスに拡張アド
レスを付加する拡張アドレス付加回路とを備えたことを
特徴とする。
According to a first aspect of the present invention, there is provided a CPU for fetching an instruction and executing the fetched instruction, comprising: an address generating circuit for generating an address to be accessed; And an extension address adding circuit for adding an extension address to the address generated by the address generation circuit.

【0007】本発明のCPUは、所定のタイミングで生
成されたアドレスに拡張アドレスを付加するものである
ため、例えば、以下の実施形態で説明するように、従来
のジャンプ命令のタイミングで生成されたジャンプアド
レスに拡張アドレスを付加することにより、広いアドレ
ス空間を取り扱うことができる。従って、既存のアセン
ブラがそのまま利用できるとともに、命令コードの増大
を抑えたまま簡単な回路構成でアドレス空間の拡張化が
図られる。
The CPU of the present invention adds an extension address to an address generated at a predetermined timing. For example, as described in the following embodiment, a CPU generated at the timing of a conventional jump instruction is used. By adding an extension address to a jump address, a wide address space can be handled. Therefore, the existing assembler can be used as it is, and the address space can be expanded with a simple circuit configuration while suppressing an increase in instruction codes.

【0008】ここで、上記拡張アドレス付加回路が、所
定のアドレスがアクセスされたタイミングに基づいて生
成されたタイミングで、その所定のアドレスに応じて生
成された拡張アドレスを付加するものであることが好ま
しい。
Here, the extended address adding circuit may add an extended address generated according to the predetermined address at a timing generated based on a timing at which the predetermined address is accessed. preferable.

【0009】このようにすると、メモリの所定のアドレ
スをアクセスするだけで、その所定のアドレスに応じた
拡張アドレスを生成することができる。
By doing so, it is possible to generate an extension address corresponding to the predetermined address only by accessing the predetermined address of the memory.

【0010】[0010]

【発明の実施の形態】以下、本発明の実施形態について
説明する。
Embodiments of the present invention will be described below.

【0011】図1は、本発明の一実施形態のCPUの回
路図である。
FIG. 1 is a circuit diagram of a CPU according to an embodiment of the present invention.

【0012】図1に示すCPU100には、CPUコア
10と、デコーダ20と、セレクタ30とが備えられて
いる。
The CPU 100 shown in FIG. 1 includes a CPU core 10, a decoder 20, and a selector 30.

【0013】CPUコア10は、16ビットのアドレス
信号A<15:0>および2ビットの拡張アドレス信号
A<17:16>を出力する。
The CPU core 10 outputs a 16-bit address signal A <15: 0> and a 2-bit extended address signal A <17:16>.

【0014】デコーダ20は、CPUコア10から出力
された16ビットのアドレス信号A<15:0>をデコ
ードして、3ビットのデコードデータを出力する。この
デコーダ20では、アドレスFF00h〜FFFFhを
表わすアドレス信号A<15:0>が入力されると、3
ビットのデコードデータ‘111’が出力される。ま
た、アドレスFE00h〜FEFFhを表わすアドレス
信号A<15:0>が入力されると、3ビットのデコー
ドデータ‘110’が出力され、アドレスFD00h〜
FDFFhを表わすアドレス信号A<15:0>が入力
されると、3ビットのデコードデータ‘101’が出力
される。さらに、アドレスFC00h〜FCFFhを表
わすアドレス信号A<15:0>が入力されると、3ビ
ットのデコードデータ‘100’が出力され、上記以外
のアドレスFB00h〜0000hを表わすアドレス信
号A<15:0>が入力されると、3ビットのデコード
データ‘000’が出力される。
The decoder 20 decodes the 16-bit address signal A <15: 0> output from the CPU core 10 and outputs 3-bit decoded data. In this decoder 20, when an address signal A <15: 0> representing addresses FF00h to FFFFh is input, 3
Bit decoded data '111' is output. When an address signal A <15: 0> representing addresses FE00h to FEFFh is input, 3-bit decoded data '110' is output, and addresses FD00h to FEFFh are output.
When an address signal A <15: 0> representing FDFFh is input, 3-bit decoded data '101' is output. Further, when address signal A <15: 0> representing addresses FC00h to FCFFh is input, 3-bit decoded data '100' is output, and address signals A <15: 0 representing addresses FB00h to 0000h other than the above. When> is input, 3-bit decoded data '000' is output.

【0015】セレクタ30の入力端子30aには、CP
Uコア10からの2ビットの拡張アドレス信号A<1
7:16>が入力される。また、各入力端子30b,3
0c,30d,30eには、外部から各2ビットの固定
データ‘11’,‘10’,‘01’,‘00’が入力
される。ここで、セレクタ30のセレクト端子30f
に、デコーダ20からデコードデータ‘111’が入力
されると、そのセレクタ30の入力端子30bに入力さ
れている固定データ‘11’が選択され、その固定デー
タ‘11’がジャンプアドレス信号JPA<17:16
>として出力される。また、デコーダ20からデコード
データ‘110’が入力されると、セレクタ30の入力
端子30cに入力されている固定データ‘10’が選択
され、その固定データ‘10’がジャンプアドレス信号
JPA<17:16>として出力される。さらに、デコ
ーダ20からデコードデータ‘101’が入力される
と、セレクタ30の入力端子30dに入力されている固
定データ‘01’が選択され、その固定データ‘01’
がジャンプアドレス信号JPA<17:16>として出
力される。また、デコーダ20からデコードデータ‘1
00’が入力されると、セレクタ30の入力端子30e
に入力されている固定データ‘00’が選択され、その
固定データ‘00’がジャンプアドレス信号JPA<1
7:16>として出力される。さらに、デコーダ20か
らデコードデータ‘000’が入力されると、セレクタ
30の入力端子30aに入力されている拡張アドレス信
号A<17:16>が選択され、その拡張アドレス信号
A<17:16>がジャンプアドレス信号JPA<1
7:16>として出力される。
The input terminal 30a of the selector 30 has a CP
2-bit extended address signal A <1 from U core 10
7:16> is input. In addition, each input terminal 30b, 3
To 0c, 30d, and 30e, 2-bit fixed data '11', '10', '01', and '00' are input from outside. Here, the select terminal 30f of the selector 30
When the decoded data '111' is input from the decoder 20, the fixed data '11' input to the input terminal 30b of the selector 30 is selected, and the fixed data '11' is set to the jump address signal JPA <17. : 16
> Are output. When the decoded data '110' is input from the decoder 20, the fixed data '10' input to the input terminal 30c of the selector 30 is selected, and the fixed data '10' is used as the jump address signal JPA <17: 16>. Further, when the decoded data '101' is input from the decoder 20, the fixed data '01' input to the input terminal 30d of the selector 30 is selected, and the fixed data '01' is selected.
Is output as the jump address signal JPA <17:16>. Also, the decoder 20 outputs the decoded data '1
When 00 ′ is input, the input terminal 30e of the selector 30
Is selected, and the fixed data '00' is input to the jump address signal JPA <1.
7:16>. Further, when decode data '000' is input from the decoder 20, the extension address signal A <17:16> input to the input terminal 30a of the selector 30 is selected, and the extension address signal A <17:16> is selected. Is the jump address signal JPA <1
7:16>.

【0016】図2は、図1に示すCPUコアに接続され
るメモリの構成を示す図である。
FIG. 2 is a diagram showing a configuration of a memory connected to the CPU core shown in FIG.

【0017】図1に示すCPUコア10には、図2に示
すメモリ40が接続される。このメモリ40は、64K
B(バイト)×1のサイズからなるメモリ部40aを4
つ有する64KB(バイト)×4のメモリである。4つ
のメモリ部40aは、ページ0,1,2,3に区分けさ
れている。各メモリ部40aには、図2の左側に示すよ
うに、プログラムが格納されるプログラム領域(アドレ
ス0000h〜FBFFh)と、ページ0を指定するた
めのページ0指定領域(アドレスFC00h〜FCFF
h)と、ページ1を指定するためのページ1指定領域
(アドレスFD00h〜FDFFh)と、ページ2を指
定するためのページ2指定領域(アドレスFE00h〜
FEFFh)と、ページ3を指定するためのページ3指
定領域(アドレスFF00h〜FFFFh)とから構成
されている。ここで、プログラム領域に格納されたジャ
ンプ命令JPnnnnが、そのプログラム領域内のアド
レスnnnnhにジャンプする場合は、従来通りの通常
のジャンプ命令が実行される。また、詳細は後述する
が、プログラム領域に格納されたジャンプ命令JPnn
nnhが、ページ0指定領域内にジャンプするタイミン
グでメモリ40のページ0が指定される。また、ページ
1指定領域内にジャンプするタイミングでページ1が指
定され、ページ2指定領域内にジャンプするタイミング
でページ2が指定され、ページ3指定領域内にジャンプ
するタイミングでページ3が指定される。
The memory 40 shown in FIG. 2 is connected to the CPU core 10 shown in FIG. This memory 40 is 64K
B (byte) × 1 memory unit 40a
It is a 64 KB (byte) × 4 memory. The four memory units 40a are divided into pages 0, 1, 2, and 3. As shown on the left side of FIG. 2, each memory unit 40a has a program area (addresses 0000h to FBFFh) for storing programs and a page 0 designation area (addresses FC00h to FCFF) for designating page 0.
h), a page 1 designation area (addresses FD00h to FDFFh) for designating page 1 and a page 2 designation area (addresses FE00h to FDFFh) for designating page 2.
FEFFh) and a page 3 designation area (addresses FF00h to FFFFh) for designating page 3. Here, when the jump instruction JPnnnnn stored in the program area jumps to the address nnnnh in the program area, a conventional normal jump instruction is executed. As will be described later in detail, the jump instruction JPnn stored in the program area
Page 0 of the memory 40 is designated at the timing when nnh jumps into the page 0 designation area. Also, page 1 is specified at the timing of jumping to the page 1 specified area, page 2 is specified at the timing of jumping to the page 2 specified area, and page 3 is specified at the timing of jumping to the page 3 specified area. .

【0018】図3は、図1に示すCPUコアの回路の一
部を示す図である。
FIG. 3 is a diagram showing a part of the circuit of the CPU core shown in FIG.

【0019】図3に示すCPUコア10には、インクリ
メンタ11と、レジスタ12,14と、セレクタ13と
が備えられている。レジスタ12,14には、電源投入
時等の初期の時点で‘L’レベルのリセット信号RES
ETが所定時間入力されるリセット端子12d,14d
が備えられている。
The CPU core 10 shown in FIG. 3 is provided with an incrementer 11, registers 12, 14 and a selector 13. The registers 12 and 14 have an “L” level reset signal RES at an initial time such as when power is turned on.
Reset terminals 12d and 14d to which ET is input for a predetermined time
Is provided.

【0020】尚、インクリメンタ11と、レジスタ12
と、セレクタ13とが、本発明にいうアドレス生成回路
に相当する。また、レジスタ14と、図1に示すデコー
ダ20およびセレクタ30が、本発明にいう拡張アドレ
ス付加回路に相当する。
The incrementer 11 and the register 12
And the selector 13 correspond to an address generation circuit according to the present invention. The register 14, the decoder 20 and the selector 30 shown in FIG. 1 correspond to the extended address adding circuit according to the present invention.

【0021】インクリメンタ11は、セレクタ13の出
力端子13dから出力された16ビットのアドレス信号
A<15:0>を入力し、入力されたアドレス信号A<
15:0>の値をインクリメントして16ビットのアド
レスデータを出力する。
The incrementer 11 receives the 16-bit address signal A <15: 0> output from the output terminal 13d of the selector 13, and inputs the input address signal A <15: 0>.
15: 0> is incremented and 16-bit address data is output.

【0022】レジスタ12のデータ端子12aには、イ
ンクリメンタ11からの16ビットのアドレスデータが
入力される。またレジスタ12のクロック端子12bに
は、図示しない内部回路からのクロックパルスCK_P
Cが入力される。レジスタ12は、データ端子12aに
入力された16ビットのアドレスデータをクロックパル
スCK_PCで内部に取り込み、PC(Program
Counter)データPC<15:0>を出力す
る。
The 16-bit address data from the incrementer 11 is input to the data terminal 12a of the register 12. A clock pulse CK_P from an internal circuit (not shown) is connected to a clock terminal 12b of the register 12.
C is input. The register 12 takes in the 16-bit address data input to the data terminal 12a with a clock pulse CK_PC, and outputs the data to a PC (Program
Counter) data PC <15: 0> is output.

【0023】セレクタ13の入力端子13bには、PC
データPC<15:0>が入力される。また、セレクタ
13の入力端子13aには、図示しない内部回路からジ
ャンプアドレス信号JPA<15:0>が入力される。
このジャンプアドレス信号JPA<15:0>は、CP
Uコア10でジャンプ命令が実行されると、そのジャン
プ命令により発生する飛び先番地を指定するためのアド
レス信号である。また、セレクタ13のセレクト端子1
3cには、セレクト信号SELJPが入力される。この
セレクト信号SELJPは、ジャンプ命令が実行される
タイミングで‘H’レベルになり、ジャンプ命令以外の
他の命令が実行されるタイミングで‘L’レベルになる
信号である。セレクタ13は、通常の実行状態では、セ
レクト信号SELJPが‘L’レベルであるため、入力
端子13bに入力されているPCデータPC<15:0
>をアドレス信号A<15:0>として外部に出力す
る。一方、ジャンプ命令が実行されて、セレクト信号S
ELJPが‘H’レベルになると、入力端子13aに入
力されているジャンプアドレス信号JPA<15:0>
をアドレス信号A<15:0>として外部に出力する。
ここまでは、従来のCPUの動作と同じである。以下、
本実施形態の特徴部分について、図1〜図3および図4
を参照して説明する。
The input terminal 13b of the selector 13 has a PC
Data PC <15: 0> is input. Further, a jump address signal JPA <15: 0> is input to an input terminal 13a of the selector 13 from an internal circuit (not shown).
This jump address signal JPA <15: 0>
When a jump instruction is executed by the U core 10, this is an address signal for designating a jump address generated by the jump instruction. Also, the select terminal 1 of the selector 13
The select signal SELJP is input to 3c. The select signal SELJP is a signal that goes to “H” level when a jump command is executed and goes to “L” level when another command other than the jump command is executed. Since the select signal SELJP is at “L” level in the normal execution state, the selector 13 outputs the PC data PC <15: 0 input to the input terminal 13b.
> To the outside as an address signal A <15: 0>. On the other hand, when the jump instruction is executed, the select signal S
When ELJP goes high, the jump address signal JPA <15: 0> input to the input terminal 13a is input.
As an address signal A <15: 0>.
The operation so far is the same as the operation of the conventional CPU. Less than,
FIGS. 1 to 3 and FIGS.
This will be described with reference to FIG.

【0024】図4は、図1に示すCPUコアのタイミン
グチャートである。
FIG. 4 is a timing chart of the CPU core shown in FIG.

【0025】本実施形態のCPUコア10には、前述し
たように、ページ0,1,2,3に区分けされたメモリ
40(図2参照)が接続されている。このメモリ40の
ページ0に対応するメモリ部40aのプログラム領域
(アドレス0000h〜FBFFh)のうちのアドレス
m,m+1,m+2には、3バイトのジャンプ命令JP
nnnnh(C3,nnnn(L),nnnn(H))
が格納されている。尚、このジャンプ命令JPnnnn
hは、そのメモリ部40a内のページ1指定領域(アド
レスFD00h〜FDFFh)内の所定のアドレスにジ
ャンプするものとする。
As described above, the memory 40 (see FIG. 2) divided into pages 0, 1, 2, and 3 is connected to the CPU core 10 of the present embodiment. Addresses m, m + 1, and m + 2 in the program area (addresses 0000h to FBFFh) of the memory unit 40a corresponding to page 0 of the memory 40 include a 3-byte jump instruction JP.
nnnnnh (C3, nnnnn (L), nnnnn (H))
Is stored. Note that this jump instruction JPnnnn
h jumps to a predetermined address in the page 1 designated area (addresses FD00h to FDFFh) in the memory unit 40a.

【0026】ここでは、ページ0に格納されたプログラ
ムがアドレスmまで進んだ状態から説明する。時刻t0
では、セレクト信号SELJPは‘L’レベルにあるも
のとする。従って、セレクタ13の出力端子13dから
は、アドレス信号A<15:0>として、セレクタ13
の入力端子13bに入力されているPCアドレス信号P
C<15:0>、即ちアドレスmを表わすアドレス信号
A<15:0>が出力されている。
Here, a description will be given from a state where the program stored in page 0 has advanced to address m. Time t0
In this case, it is assumed that the select signal SELJP is at the “L” level. Therefore, the selector 13 outputs the address signal A <15: 0> from the output terminal 13 d of the selector 13.
Address signal P input to the input terminal 13b
C <15: 0>, that is, an address signal A <15: 0> representing the address m is output.

【0027】レジスタ14のデータ端子14aには、図
1に示すセレクタ30からの2ビットのジャンプアドレ
ス信号JPA<17:16>が入力される。CPUコア
10からは、アドレスmを表わすアドレス信号A<1
5:0>が出力されており、このアドレスmはアドレス
0000h〜FBFFh内にあるため、デコーダ20か
らデコードデータ‘000’が出力され、これによりセ
レクタ30では入力端子30aに入力されている、ペー
ジ0を表わす拡張アドレス信号A<17:16>が、ジ
ャンプアドレス信号JPA<17:16>として出力さ
れる。従って、固定データ‘00’を有するジャンプア
ドレス信号JPA<17:16>がレジスタ14のデー
タ端子14aに入力されることとなる。また、レジスタ
14のイネーブル端子14eには、内部回路からジャン
プ信号JPNNNNが入力される。このジャンプ信号J
PNNNNは、前述したページ0,1,2,3指定領域
(FC00h〜FFFFh)が指定された場合に‘H’
レベルになり、通常のプログラム領域(0000h〜F
BFFh)が指定された場合は‘L’レベルになる。こ
こでは、‘L’レベルのジャンプ信号JPNNNNが入
力される。
The data terminal 14a of the register 14 receives a 2-bit jump address signal JPA <17:16> from the selector 30 shown in FIG. Address signal A <1 representing address m is provided from CPU core 10.
5: 0> is output, and since this address m is within the addresses 0000h to FBFFh, the decoded data '000' is output from the decoder 20, whereby the selector 30 inputs the page data input to the input terminal 30a. Extended address signal A <17:16> representing 0 is output as jump address signal JPA <17:16>. Therefore, the jump address signal JPA <17:16> having the fixed data '00' is input to the data terminal 14a of the register 14. The jump signal JPNNNN is input from an internal circuit to the enable terminal 14e of the register 14. This jump signal J
PNNNNN is “H” when the above-described page 0, 1, 2, 3 designated area (FC00h to FFFFh) is designated.
Level, and the normal program area (0000h-F
When (BFFh) is specified, the level becomes “L” level. Here, an “L” level jump signal JPNNNN is input.

【0028】時刻t0において、リード信号RDが立ち
下がると、アドレスmに格納されている1バイト分のデ
ータC3がCPUコア10内に取り込まれる。CPUコ
ア10では、このデータC3がジャンプ命令であると解
釈し、所定時間経過後リード信号RDを立ち上げる。ま
た、インクリメンタ11の値をインクリメントし、クロ
ックパルスCK_PCを出力する。すると、レジスタ1
2に、インクリメンタ11でインクリメントされた値が
取り込まれ、これによりセレクタ13からアドレスm+
1を表わすアドレス信号A<15:0>が出力される。
また、時刻t0は時刻t1に移行する。
At time t0, when the read signal RD falls, one byte of data C3 stored at the address m is taken into the CPU core 10. The CPU core 10 interprets the data C3 as a jump command, and raises the read signal RD after a predetermined time has elapsed. Further, it increments the value of the incrementer 11 and outputs a clock pulse CK_PC. Then register 1
2, the value incremented by the incrementer 11 is fetched.
Address signal A <15: 0> representing 1 is output.
Further, time t0 shifts to time t1.

【0029】時刻t1において、リード信号RDが立ち
下がると、アドレスm+1に格納されている1バイト分
のデータnnnn(L)がCPUコア10内に取り込ま
れる。次いで、リード信号RDが立ち上がる。また、イ
ンクリメンタ11の値がインクリメントされ、次いでク
ロックパルスCK_PCが出力される。すると、そのイ
ンクリメントされた値がレジスタ12に取り込まれ、こ
れによりセレクタ13からアドレスm+2を表わすアド
レス信号A<15:0>が出力される。また、時刻t1
は時刻t2に移行する。
At time t1, when the read signal RD falls, one byte of data nnnn (L) stored at the address m + 1 is taken into the CPU core 10. Next, the read signal RD rises. Further, the value of the incrementer 11 is incremented, and then the clock pulse CK_PC is output. Then, the incremented value is taken into the register 12, whereby the selector 13 outputs the address signal A <15: 0> representing the address m + 2. Also, at time t1
Shifts to time t2.

【0030】時刻t2において、リード信号RDが立ち
下がると、アドレスm+2に格納されている1バイト分
のデータnnnn(H)がCPUコア10内に取り込ま
れる。CPUコア10では、3バイトのジャンプ命令
(C3,nnnn(L),nnnn(H))が取り込ま
れて、JMP命令(JPnnnnh)が実行される。す
ると、ジャンプ信号JPNNNが‘L’レベルから
‘H’レベルに変化する。また、アドレスnnnnhを
表わすジャンプアドレス信号JPA<15:0>が出力
される。さらに、セレクト信号SELJPが‘L’レベ
ルから‘H’レベルに変化する。これにより、セレクタ
13からアドレスnnnnhを表わすアドレス信号A<
15:0>が出力される。このアドレスnnnnhを表
わすアドレス信号A<15:0>は、アドレスFD00
h〜FDFFh内の所定のアドレス、即ちページ1を指
定するためのアドレス信号A<15:0>であり、従っ
てデコーダ20からはデコードデータ‘101’が出力
される。これにより、セレクタ30では、入力端子30
dに入力されている外部からの2ビットの固定データ
‘01’が選択され、そのデータ‘01’を有するジャ
ンプアドレス信号JPA<17:16>が出力される。
このようにして、レジスタ14のデータ端子14aに、
固定データ‘01’を有するジャンプアドレス信号JP
A<17:16>が入力されることとなる。
At time t2, when the read signal RD falls, one byte of data nnnn (H) stored at the address m + 2 is taken into the CPU core 10. The CPU core 10 fetches a 3-byte jump instruction (C3, nnnn (L), nnnn (H)) and executes a JMP instruction (JPnnnnh). Then, the jump signal JPNNN changes from “L” level to “H” level. Further, jump address signal JPA <15: 0> representing address nnnnnh is output. Further, the select signal SELJP changes from “L” level to “H” level. Thus, the selector 13 supplies the address signal A <representing the address nnnnnh.
15: 0> is output. Address signal A <15: 0> representing address nnnnnh is applied to address FD00.
h to FDFFh, that is, an address signal A <15: 0> for designating page 1, and therefore, the decoder 20 outputs decoded data '101'. Thereby, in the selector 30, the input terminal 30
External 2-bit fixed data '01' input to d is selected, and a jump address signal JPA <17:16> having the data '01' is output.
In this manner, the data terminal 14a of the register 14
Jump address signal JP having fixed data '01'
A <17:16> will be input.

【0031】また、CPUコア10では、インクリメン
タ11の値をインクリメントし、クロックパルスCK_
PCを出力する。クロックパルスCK_PCは、レジス
タ12のクロック端子12bに入力され、これによりレ
ジスタ12にインクリメンタ11の値が格納される。ま
た、クロックパルスCK_PCは、レジスタ14のクロ
ック端子14bにも入力される。ここで、レジスタ14
のイネーブル端子14eには、‘H’レベルのジャンプ
信号JPNNNNが入力されているため、データ端子1
4aに入力されているジャンプアドレス信号JPA<1
7:16>がクロックパルスCK_PCで取り込まれ、
これによりレジスタ14の出力端子14cから固定デー
タ‘01’を有する拡張アドレス信号A<17:16>
が出力される。このようにして、CPUコア10から
は、アドレスnnnnhを表わすアドレス信号A<1
5:0>と、ページ1を表わす拡張アドレス信号A<1
7:16>とが出力され、これによりメモリ40のペー
ジ1におけるアドレスnnnnhが指定される。また、
時刻t2は時刻t3に移行する。
In the CPU core 10, the value of the incrementer 11 is incremented and the clock pulse CK_
Output PC. The clock pulse CK_PC is input to the clock terminal 12 b of the register 12, whereby the value of the incrementer 11 is stored in the register 12. The clock pulse CK_PC is also input to the clock terminal 14b of the register 14. Here, register 14
Since the “H” level jump signal JPNNNN is input to the enable terminal 14 e of the
4a input to the jump address signal JPA <1
7:16> is captured by the clock pulse CK_PC,
Thereby, the extension address signal A <17:16> having the fixed data '01' is output from the output terminal 14c of the register 14.
Is output. Thus, from CPU core 10, address signal A <1 representing address nnnnnh is output.
5: 0> and an extended address signal A <1 representing page 1
7:16>, thereby specifying the address nnnnh in page 1 of the memory 40. Also,
Time t2 shifts to time t3.

【0032】時刻t3において、リード信号RDが立ち
下がると、ページ1のアドレスnnnnhに格納されて
いるデータがCPUコア10内に取り込まれるととも
に、ジャンプ信号JPNNNが‘H’レベルから‘L’
レベルに変化する。所定時間経過後、時刻t3から時刻
t4に移行する。
At time t3, when the read signal RD falls, the data stored in the address nnnnnh of page 1 is taken into the CPU core 10, and the jump signal JPNNNN changes from "H" level to "L".
Change to a level. After a lapse of a predetermined time, the process shifts from time t3 to time t4.

【0033】時刻t4において、リード信号RDが立ち
下がると、ページ1のアドレスnnnn+1hに格納さ
れているデータがCPUコア10内に取り込まれる。こ
のようにして、ページ0に格納されているジャンプ命令
JPnnnnhを実行することによりページ1に移行
し、そのページ1のアドレスnnnnhに格納されてい
るプログラムを実行することができる。
At time t4, when the read signal RD falls, the data stored at the address nnnn + 1h of page 1 is taken into the CPU core 10. In this way, by executing the jump instruction JPnnnnh stored in page 0, the program shifts to page 1 and the program stored in the page 1 at the address nnnnh can be executed.

【0034】図5は、既存のアセンブラ(16ビット)
で記述されたプログラムで、18ビットに拡張されたア
ドレス空間を実行する様子を示す図である。
FIG. 5 shows an existing assembler (16 bits)
FIG. 9 is a diagram showing a state where an address space extended to 18 bits is executed by a program described in FIG.

【0035】従来のCPUでは、図5の右側に示すよう
に、ページ1のアドレス2345hに格納されたジャン
プ命令JPDIST(DISTはアドレス4567hと
定義されている)が実行されると、同じページ1内で、
即ちアドレス12345hからアドレス14567hに
ジャンプする。このように、従来のCPUでは、16ビ
ットのアドレス空間のみでプログラムが実行される。
In the conventional CPU, as shown on the right side of FIG. 5, when a jump instruction JPIST (DIST is defined as address 4567h) stored at address 2345h of page 1 is executed, so,
That is, the address jumps from the address 12345h to the address 14567h. As described above, in the conventional CPU, the program is executed only in the 16-bit address space.

【0036】一方、本実施形態では、図5の左側に示
す、既存のアセンブラで記述されたプログラムによれ
ば、ページ1のアドレス2345hに格納されたジャン
プ命令JPFF00hが実行されると、そのページ1の
アドレスFF00hにジャンプする。このアドレスFF
00hは、ページ3指定領域(アドレスFF00h〜F
FFFh)内にあり、ジャンプ命令JPFF00hが実
行されると、前述したようにして、デコーダ20,セレ
クタ30を経由してページ3を指定するための、固定デ
ータ‘11’を有するジャンプアドレス信号JPA<1
7:16>がCPUコア10に向けて出力され、これに
よりCPUコア10からページ3を表わす拡張アドレス
信号<17:16>が出力される。すると、メモリ40
のページ3が指定され、そのページ3内のアドレスFF
00hに格納されているデータが読み出されることとな
る。ここでは、ページ3内のアドレスFF00hには、
ジャンプ命令JPDIST(DISTはアドレス456
7hと定義されている)が格納されており、このためペ
ージ3においてジャンプ命令JP4567が実行され
る。従って、アドレス12345hからアドレス345
67hに移行することとなる。このように、18ビット
にアドレス空間が拡張されたメモリ40をアクセスする
にあたり、間接ジャンプを挿入することにより16ビッ
トで納まるため、既存のアセンブラでプログラムを記述
することができる。
On the other hand, in this embodiment, according to the program described in the existing assembler shown on the left side of FIG. 5, when the jump instruction JPFF00h stored at the address 2345h of page 1 is executed, the page 1 Jump to address FF00h of This address FF
00h is a page 3 designation area (addresses FF00h to F
FFFh), and when the jump instruction JPFF00h is executed, the jump address signal JPA <having fixed data '11' for designating page 3 via the decoder 20 and the selector 30 as described above. 1
7:16> is output to the CPU core 10, whereby the CPU core 10 outputs an extended address signal <17:16> representing page 3. Then, the memory 40
Page 3 is specified, and the address FF in the page 3
The data stored in 00h is read. Here, at address FF00h in page 3,
Jump instruction JPIST (DIST is address 456
7h) is stored, so that the jump instruction JP4567 is executed in page 3. Therefore, the address 345h is changed to the address 345h.
It will shift to 67h. As described above, when accessing the memory 40 in which the address space is expanded to 18 bits, the data can be stored in 16 bits by inserting an indirect jump. Therefore, a program can be described using an existing assembler.

【0037】尚、本実施形態では、ジャンプ命令のタイ
ミングで生成されたアドレスに拡張アドレスを付加する
例で説明したが、本発明は、ジャンプ命令に限られるも
のではなく、所定のタイミングで生成されたアドレスに
拡張アドレスを付加するものであればよい。
In the present embodiment, an example has been described in which an extension address is added to an address generated at the timing of a jump instruction. However, the present invention is not limited to a jump instruction, but is generated at a predetermined timing. What is necessary is just to add an extended address to the address.

【0038】[0038]

【発明の効果】以上説明したように、本発明によれば、
既存のアセンブラがそのまま利用できるとともに、命令
コードの増大を抑えたまま簡単な回路構成でアドレス空
間の拡張化を図ることができる。
As described above, according to the present invention,
The existing assembler can be used as it is, and the address space can be expanded with a simple circuit configuration while suppressing an increase in instruction codes.

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

【図1】本発明の一実施形態のCPUの回路図である。FIG. 1 is a circuit diagram of a CPU according to an embodiment of the present invention.

【図2】図1に示すCPUコアに接続されるメモリの構
成を示す図である。
FIG. 2 is a diagram showing a configuration of a memory connected to a CPU core shown in FIG. 1;

【図3】図1に示すCPUコアの回路の一部を示す図で
ある。
FIG. 3 is a diagram illustrating a part of a circuit of a CPU core illustrated in FIG. 1;

【図4】図1に示すCPUのタイミングチャートであ
る。
FIG. 4 is a timing chart of the CPU shown in FIG. 1;

【図5】既存のアセンブラ(16ビット)で記述された
プログラムで、18ビットに拡張されたアドレス空間を
実行する様子を示す図である。
FIG. 5 is a diagram showing how a program described in an existing assembler (16 bits) executes an address space extended to 18 bits.

【符号の説明】[Explanation of symbols]

10 CPUコア 11 インクリメンタ 12,14 レジスタ 12a,14a データ端子 12b,14b クロック端子 12c,14c,13d 出力端子 12d,14d リセット端子 14e イネーブル端子 13 セレクタ 13a,13b,30a,30b,30c,30d,3
0e 入力端子 13c,30f セレクト端子 20 デコーダ 30 セレクタ 40 メモリ 40a メモリ部 100 CPU
Reference Signs List 10 CPU core 11 Incrementor 12, 14 Register 12a, 14a Data terminal 12b, 14b Clock terminal 12c, 14c, 13d Output terminal 12d, 14d Reset terminal 14e Enable terminal 13 Selector 13a, 13b, 30a, 30b, 30c, 30d, 3
0e Input terminal 13c, 30f Select terminal 20 Decoder 30 Selector 40 Memory 40a Memory unit 100 CPU

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 命令をフェッチしてフェッチした命令を
実行するCPUにおいて、 アクセスしようとするアドレスを生成するアドレス生成
回路と、 所定のタイミングで前記アドレス生成回路で生成された
アドレスに拡張アドレスを付加する拡張アドレス付加回
路とを備えたことを特徴とするCPU。
An address generation circuit for generating an address to be accessed in a CPU that fetches an instruction and executes the fetched instruction, and an extension address is added to the address generated by the address generation circuit at a predetermined timing. A CPU comprising:
【請求項2】 前記拡張アドレス付加回路が、所定のア
ドレスがアクセスされたタイミングに基づいて生成され
たタイミングで、該所定のアドレスに応じて生成された
拡張アドレスを付加するものであることを特徴とする請
求項1記載のCPU。
2. The method according to claim 1, wherein the extension address adding circuit adds an extension address generated according to the predetermined address at a timing generated based on a timing at which the predetermined address is accessed. The CPU according to claim 1, wherein
JP2000075181A 2000-03-17 2000-03-17 Cpu Pending JP2001265591A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000075181A JP2001265591A (en) 2000-03-17 2000-03-17 Cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000075181A JP2001265591A (en) 2000-03-17 2000-03-17 Cpu

Publications (1)

Publication Number Publication Date
JP2001265591A true JP2001265591A (en) 2001-09-28

Family

ID=18593111

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000075181A Pending JP2001265591A (en) 2000-03-17 2000-03-17 Cpu

Country Status (1)

Country Link
JP (1) JP2001265591A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101288316B (en) * 2005-10-11 2010-09-29 松下电器产业株式会社 Chroma killer detection circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101288316B (en) * 2005-10-11 2010-09-29 松下电器产业株式会社 Chroma killer detection circuit
US8031269B2 (en) 2005-10-11 2011-10-04 Panasonic Corporation Chroma killer detection circuit

Similar Documents

Publication Publication Date Title
JP4901285B2 (en) Memory card that can improve read performance
US20070283139A1 (en) Information processing apparatus and control method used thereby
US7853773B1 (en) Program memory space expansion for particular processor instructions
KR920007253B1 (en) Controlling apparatus for micro-program
US7702860B2 (en) Memory access apparatus
JP2001265591A (en) Cpu
KR100321745B1 (en) A micro controller unit for external memory access
KR100484247B1 (en) An instruction decoder for a RCI MCU
JPH04305735A (en) Microprogram control circuit
JP2906792B2 (en) Digital processor and control method thereof
JP4159586B2 (en) Information processing apparatus and information processing speed-up method
JPH0588884A (en) State mode setting system
JPH0795269B2 (en) Instruction code decoding device
US5463747A (en) Microprogram data processor processing operand address calculation and instruction execution with common hardware
JP2583506B2 (en) Data processing device
JP2001265651A (en) Data processor
JP5263498B2 (en) Signal processor and semiconductor device
JP2004302827A (en) Microcontroller
JP2003196087A (en) Memory addressing system of microcontroller and page mapping device
US20020069350A1 (en) Apparatus and method for executing a block data transfer instruction inside processor
JPH05250156A (en) Risc processor
JPH09114779A (en) Wait control system for information processor
JP2004288203A (en) Processor core and processor using the same
JPH07105171A (en) Data processor
JPH10187487A (en) Microcomputer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090203

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090602