JPH08221322A - Device and method for controlling memory - Google Patents

Device and method for controlling memory

Info

Publication number
JPH08221322A
JPH08221322A JP2173495A JP2173495A JPH08221322A JP H08221322 A JPH08221322 A JP H08221322A JP 2173495 A JP2173495 A JP 2173495A JP 2173495 A JP2173495 A JP 2173495A JP H08221322 A JPH08221322 A JP H08221322A
Authority
JP
Japan
Prior art keywords
bank
memory
window
processing unit
central processing
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
JP2173495A
Other languages
Japanese (ja)
Inventor
Yoshihiko Hasegawa
嘉彦 長谷川
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.)
SNK Corp
Original Assignee
SNK 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 SNK Corp filed Critical SNK Corp
Priority to JP2173495A priority Critical patent/JPH08221322A/en
Publication of JPH08221322A publication Critical patent/JPH08221322A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To provide a device and a method for controlling memory capable of easily performing programming. CONSTITUTION: The logical address of a memory space accessible from a central processing unit 16 is supplied to bank control registers CR1, CR2, and its content is constituted so as to be rewritten and reread. A bank switching control means 14, when the central processing unit 16 accesses a window WD1, performs switching to which bank memory BK0-BKF access is performed according to the content of the bank control register CR1, and also, when the central processing unit 16 accesses a window WD2, performs the switching to which bank memory BK0-BKF the access is performed according to the content of the bank control register CR2. The contents of the bank control registers CR1, CR2 are read in a program.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明はメモリの制御装置およ
びメモリの制御方法に関し、特に、バンクメモリの切換
えに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control device and a memory control method, and more particularly to switching of bank memories.

【0002】[0002]

【従来の技術】コンピュータゲーム器などにおいて、C
PUがアクセスできるメモリの容量を拡張するために、
バンクメモリが用いられる。この、バンクメモリを切換
えるためにバンクメモリの制御装置が用いられる。図8
に、従来のバンクメモリ制御装置2の構成を示す。
2. Description of the Related Art In a computer game machine or the like, C
In order to expand the memory capacity that PU can access,
Bank memory is used. A bank memory controller is used to switch the bank memories. FIG.
The configuration of the conventional bank memory control device 2 is shown in FIG.

【0003】ROM4はバンクメモリを構成しており、
プログラムが記憶されている。また、ROM4は、D0
〜D7の8ビットのデータ端子、および、A0〜A16
の17ビットのアドレス端子を有している。
The ROM 4 constitutes a bank memory,
The program is stored. In addition, ROM4 is D0
To D7 8-bit data terminals and A0 to A16
17-bit address terminal.

【0004】ROM4のデータ端子D0〜D7は信号線
LND0〜LND7により、また、アドレス端子のうち
A0〜A13は信号線LNA0〜LNA13により、そ
れぞれ、CPU(図示せず)に接続されている。また、
データ端子のうちD0〜D2(データの下位3ビットに
対応)は、ラッチ回路6の入力端6aに接続されてお
り、ラッチ回路6の出力端6bは、上位の3つのアドレ
ス端子A14〜A16に接続されている。
The data terminals D0 to D7 of the ROM 4 are connected to the CPU (not shown) by the signal lines LND0 to LND7, and the address terminals A0 to A13 are connected to the CPU (not shown) by the signal lines LNA0 to LNA13. Also,
Of the data terminals, D0 to D2 (corresponding to the lower 3 bits of data) are connected to the input end 6a of the latch circuit 6, and the output end 6b of the latch circuit 6 is connected to the upper three address terminals A14 to A16. It is connected.

【0005】ROM4の記憶域は、図9に示すように、
BKM0〜BKM7の8つのバンクメモリから構成され
ている。8つのバンクメモリBKM0〜BKM7は、ア
ドレス端子A14〜A16への入力の8つの組合せに対
応して特定されるよう構成されている。したがって、ア
ドレス端子A14〜A16への入力の組合せにより、い
ずれのバンクメモリが、CPUからアクセス可能となる
かが決定される。
The storage area of the ROM 4 is, as shown in FIG.
It is composed of eight bank memories BKM0 to BKM7. The eight bank memories BKM0 to BKM7 are configured to be specified corresponding to eight combinations of inputs to the address terminals A14 to A16. Therefore, which bank memory can be accessed by the CPU is determined by the combination of the inputs to the address terminals A14 to A16.

【0006】まず、電源投入により、ラッチ回路6の内
容が”000”となるため、アドレス端子A14〜A1
6への入力は”000”となる。このため、図9に示す
ように、バンクメモリBKM7がアクセス可能となる。
すなわち、CPUからアクセス可能な論理アドレスのう
ち、ROM4に対して与えられたウインドWDに対し、
バンクメモリBKM7が当てはめられたことになる。
First, when the power is turned on, the content of the latch circuit 6 becomes "000", so that the address terminals A14 to A1.
The input to 6 is "000". Therefore, as shown in FIG. 9, the bank memory BKM7 can be accessed.
That is, of the logical addresses accessible from the CPU, for the window WD given to the ROM 4,
This means that the bank memory BKM7 has been applied.

【0007】CPUは、バンクメモリBKM7に記憶さ
れたプログラム内容にしたがって、処理をすすめる。バ
ンクメモリBKM7の特定のアドレスには、下位3ビッ
トに、次にアクセスすべきバンクメモリを指定するコー
ドを記載したデータが記憶されている。CPUは、この
特定のアドレスに記憶されたデータが出力されると同時
に、図9に示すラッチ回路6のラッチ信号端子LOAD
にラッチ信号を送る。
The CPU proceeds with the processing according to the program contents stored in the bank memory BKM7. At a specific address of the bank memory BKM7, data having a code designating a bank memory to be accessed next is stored in the lower 3 bits. The CPU outputs the data stored at this specific address, and at the same time, outputs the latch signal terminal LOAD of the latch circuit 6 shown in FIG.
Send a latch signal to.

【0008】ラッチ回路6は、このラッチ信号を受け、
出力中のデータの下位3ビットを取り込み、ROM4の
上位の3つのアドレス端子A14〜A16に出力する。
したがって、上述の、特定のアドレスに記憶されたデー
タの下位3ビットの内容により、次にアクセス可能とな
るバンクメモリが決定される。
The latch circuit 6 receives this latch signal,
The lower 3 bits of the data being output are fetched and output to the upper 3 address terminals A14 to A16 of the ROM 4.
Therefore, the next accessible bank memory is determined by the contents of the lower 3 bits of the data stored at the specific address described above.

【0009】例えば、この特定のアドレスに記憶された
データの下位3ビットが”101”である場合には、図
9に示すように、以後、ウインドWDの内容が切換えら
れ、バンクメモリBKM2がアクセス可能となる。この
ようにして、適宜、ウインドの内容を切換えることがで
きる。このため、CPUのアクセス可能な論理アドレス
の範囲が小さい場合であっても、論理アドレスの範囲を
こえた物理アドレスを有するROMに対しても、アクセ
スすることが可能となる。
For example, when the lower 3 bits of the data stored at this specific address is "101", the contents of the window WD are subsequently switched and the bank memory BKM2 is accessed, as shown in FIG. It will be possible. In this way, the contents of the window can be switched appropriately. Therefore, even when the range of logical addresses accessible by the CPU is small, it is possible to access a ROM having a physical address exceeding the range of logical addresses.

【0010】[0010]

【発明が解決しようとする課題】しかし、従来のバンク
メモリ制御装置2には次のような問題点があった。従来
のバンクメモリの制御装置2においては、バンクメモリ
の切換えにラッチ回路6を用いている。このため、現在
アクセス可能となっているバンクメモリが何であるかを
プログラム上で知ることはできなかった。
However, the conventional bank memory control device 2 has the following problems. In the conventional bank memory control device 2, the latch circuit 6 is used for switching the bank memories. Therefore, it was not possible to know on a program what the bank memory that is currently accessible is.

【0011】このため、プログラマはプログラムを作成
する際、常に、どのバンクメモリが、現在アクセス可能
となっているかを把握していなければならなかった。し
たがって、ジャンプの多い、複雑に入組んだ構成のプロ
グラムにおいて、たとえば、現在アクセス可能なバンク
メモリによって、ジャンプ先を決定しなければならない
ような場合、プログラマは、プログラムを逆方向にトレ
ースし、現在アクセス可能となっているバンクメモリを
知る必要があった。
Therefore, the programmer must always know which bank memory is currently accessible when creating a program. Therefore, in a complicated program having many jumps, for example, when the jump destination must be determined by the currently accessible bank memory, the programmer traces the program in the backward direction and It was necessary to know which bank memory was accessible.

【0012】このため、プログラムの作成が困難とな
り、プログラムの誤りも生じやすかった。特に、プログ
ラム内容のチェック、修正、変更、追加等に際しては、
誤りが生じやすいという短所があった。
Therefore, it is difficult to create a program, and errors in the program are likely to occur. Especially when checking, modifying, changing or adding the program contents,
There was a disadvantage that it was easy to make an error.

【0013】この発明は、このような従来のバンクメモ
リの制御装置などメモリの制御装置およびメモリの制御
方法の問題点を解消し、プログラミングを容易に行なう
ことができるメモリの制御装置およびメモリの制御方法
を提供することを目的とする。
The present invention solves the problems of the conventional memory control device such as the bank memory control device and the conventional memory control method, and facilitates programming. The purpose is to provide a method.

【0014】[0014]

【課題を解決するための手段】請求項1のメモリの制御
装置は、中央処理装置からアクセス可能なメモリ空間の
論理アドレスが与えられており、内容を、書き換え可能
にかつ読取り可能に構成したバンクコントロールレジス
タ、中央処理装置からウインド部をアクセスした場合、
バンクコントロールレジスタの内容にしたがって、どの
バンクメモリにアクセスするかを切換えるバンク切換え
制御手段を設けたことを特徴とする。
According to another aspect of the present invention, there is provided a memory control device, wherein a logical address of a memory space accessible from a central processing unit is given, and the contents are rewritable and readable. When accessing the window from the control register or central processing unit,
A bank switching control means for switching which bank memory to access according to the contents of the bank control register is provided.

【0015】請求項2のメモリの制御装置は、請求項1
のメモリの制御装置において、ウインド部を複数とし、
各ウインド部に対応するバンクコントロールレジスタを
設けたことを特徴とする。
According to another aspect of the present invention, there is provided a memory control device.
In the control device of the memory of,
A feature is that a bank control register corresponding to each window portion is provided.

【0016】請求項3のメモリの制御方法は、中央処理
装置からアクセス可能なメモリ空間の論理アドレスが与
えらたバンクコントロールレジスタの内容を、書き換え
可能にかつ読取り可能に構成し、中央処理装置からウイ
ンド部をアクセスした場合、バンクコントロールレジス
タの内容にしたがって、どのバンクメモリにアクセスす
るかを切換えることを特徴とする。
According to another aspect of the memory control method of the present invention, the contents of the bank control register to which the logical address of the memory space accessible from the central processing unit is given are rewritable and readable. When the window part is accessed, which bank memory is accessed is switched according to the contents of the bank control register.

【0017】[0017]

【作用】請求項1のメモリの制御装置および請求項3の
メモリの制御方法は、中央処理装置からアクセス可能な
メモリ空間の論理アドレスが与えらたバンクコントロー
ルレジスタの内容を、書き換え可能にかつ読取り可能に
構成し、中央処理装置からウインド部をアクセスした場
合、バンクコントロールレジスタの内容にしたがって、
どのバンクメモリにアクセスするかを切換えることを特
徴とする。
According to another aspect of the present invention, there is provided a memory control device and a memory control method according to claim 3, wherein the contents of a bank control register given a logical address of a memory space accessible from the central processing unit are rewritable and readable. If it is possible to access the window from the central processing unit,
It is characterized in that which bank memory is accessed is switched.

【0018】したがって、バンクコントロールレジスタ
の内容を読み取るようプログラムすることができる。こ
のため、現在どのバンクメモリにアクセスしているか
を、容易に知ることができる。
Therefore, the contents of the bank control register can be programmed to be read. Therefore, it is possible to easily know which bank memory is currently being accessed.

【0019】請求項2のメモリの制御装置は、請求項1
のメモリの制御装置において、ウインド部を複数とし、
各ウインド部に対応するバンクコントロールレジスタを
設けたことを特徴とする。
According to another aspect of the present invention, there is provided a memory control device.
In the control device of the memory of,
A feature is that a bank control register corresponding to each window portion is provided.

【0020】したがって、各ウインドに対応するバンク
コントロールレジスタの内容を読み取るようプログラム
することができる。このため、現在どのバンクメモリに
アクセスしているかを、各ウインドごとに、容易に知る
ことができる。
Therefore, it is possible to program the contents of the bank control register corresponding to each window to be read. Therefore, it is possible to easily know which bank memory is currently being accessed for each window.

【0021】[0021]

【実施例】図1に、この発明の一実施例によるメモリの
制御装置であるバンクメモリ制御装置12の構成を示
す。このバンクメモリ制御装置12は、2つのバンクコ
ントロールレジスタCR1、CR2、および、バンク切
換え制御手段14を有している。
1 shows the structure of a bank memory controller 12 which is a memory controller according to an embodiment of the present invention. The bank memory control device 12 has two bank control registers CR1 and CR2 and a bank switching control means 14.

【0022】バンクコントロールレジスタCR1、CR
2は、中央処理装置16からアクセス可能なメモリ空間
の論理アドレスが与えられており、内容を、書き換え可
能にかつ読取り可能に構成されている。また、バンクコ
ントロールレジスタCR1、CR2は、それぞれ、ウイ
ンドWD1、WD2に対応している。
Bank control registers CR1 and CR
2 is given a logical address of a memory space accessible from the central processing unit 16, and its contents are rewritable and readable. The bank control registers CR1 and CR2 correspond to the windows WD1 and WD2, respectively.

【0023】バンク切換え制御手段14は、中央処理装
置16からウインドWD1をアクセスした場合、バンク
コントロールレジスタCR1の内容にしたがって、どの
バンクメモリBK0〜BKFにアクセスするかを切換え
るとともに、中央処理装置16からウインドWD2をア
クセスした場合、バンクコントロールレジスタCR2の
内容にしたがって、どのバンクメモリBK0〜BKFに
アクセスするかを切換える。
When the window WD1 is accessed from the central processing unit 16, the bank switching control means 14 switches which bank memory BK0 to BKF is to be accessed according to the contents of the bank control register CR1 and the central processing unit 16 controls the bank memory. When the window WD2 is accessed, which bank memory BK0 to BKF is to be accessed is switched according to the contents of the bank control register CR2.

【0024】図2に、上述のバンクメモリ制御装置12
をCPUを用いて実現した場合のハードウェア構成を示
す。主メモリ22は、書込み可能な記憶素子(RAM)
で構成されている。記憶部24は、読み取り専用の記憶
素子(ROM)で構成された16個のバンクメモリBK
0〜BKFを有している。
FIG. 2 shows the bank memory controller 12 described above.
2 shows a hardware configuration in the case where is realized by using a CPU. The main memory 22 is a writable storage element (RAM)
It is composed of The storage unit 24 includes 16 bank memories BK configured by read-only storage elements (ROM).
It has 0 to BKF.

【0025】なお、中央処理装置16は、ウインドWD
1、WD2を含むメモリ空間に対しアクセス可能となる
よう構成されている。すなわち、主メモリ22、ウイン
ドWD1およびWD2(つまり、バンクメモリBK0〜
BKFの一部)、バンクコントロールレジスタCR1お
よびCR2に対し、中央処理装置16からアクセス可能
な論理アドレスが付されている(図7参照)。
The central processing unit 16 is a window WD.
1, the memory space including WD2 is accessible. That is, the main memory 22, the windows WD1 and WD2 (that is, the bank memories BK0 to BK0).
A logical address accessible from the central processing unit 16 is attached to the bank control registers CR1 and CR2 (part of BKF) (see FIG. 7).

【0026】図3に、バンクメモリ制御装置12による
バンクメモリ処理の流れを示す。まず、CPU20は、
初期化処理の手順または実行中のプログラムの記載にし
たがい、バンクメモリの切換えが必要か否かを判断する
(図3、ステップST2参照)。
FIG. 3 shows a flow of bank memory processing by the bank memory controller 12. First, the CPU 20
According to the procedure of the initialization process or the description of the program being executed, it is determined whether the bank memory needs to be switched (see step ST2 in FIG. 3).

【0027】バンクメモリの切換えが必要と判断する
と、CPU20は、バンクコントロールレジスタCR
1、CR2に、次に用いるバンクメモリのバンク番号を
セットする(図3、ステップST4参照)。この場合、
切換えを必要とするバンクメモリに応じて、バンクコン
トロールレジスタCR1、CR2のいずれか、または双
方に、バンクメモリのバンク番号をセットする。
When it is determined that the bank memory needs to be switched, the CPU 20 determines the bank control register CR.
The bank number of the bank memory to be used next is set in 1 and CR2 (see step ST4 in FIG. 3). in this case,
The bank number of the bank memory is set in either or both of the bank control registers CR1 and CR2 according to the bank memory requiring switching.

【0028】図4に、この実施例において使用されるバ
ンクコントロールレジスタCR1、CR2の仕様を示
す。バンクコントロールレジスタCR1、CR2は、と
もに書き換え可能で、かつ、読み取り可能に構成されて
いる。
FIG. 4 shows the specifications of the bank control registers CR1 and CR2 used in this embodiment. The bank control registers CR1 and CR2 are both rewritable and readable.

【0029】バンクコントロールレジスタCR1には、
CPU20がアクセス可能な論理アドレス”2FF00
0”H(Hは、16進数を表わす)が与えられている。
バンクコントロールレジスタCR1には、ウインドWD
1について、次に用いるバンクメモリのバンク番号がセ
ットされる。同様に、バンクコントロールレジスタCR
2には、論理アドレス”2FF002”Hが与えられて
おり、ウインドWD2について、次に用いるバンクメモ
リのバンク番号がセットされる(図7参照)。
The bank control register CR1 contains
Logical address "2FF00" accessible by the CPU 20
0 "H (H represents a hexadecimal number) is given.
The window WD is stored in the bank control register CR1.
For 1, the bank number of the bank memory to be used next is set. Similarly, the bank control register CR
The logical address "2FF002" H is given to 2, and the bank number of the bank memory to be used next is set for the window WD2 (see FIG. 7).

【0030】図5にバンクメモリBK0〜BKFのバン
ク番号とROMの物理アドレスとの対応関係を示す。バ
ンクメモリBK0〜BKFには、バンク番号”00”H
〜”0F”Hが付されている。この、実施例において
は、最大16個のバンクメモリを持つことができるよう
構成されている。
FIG. 5 shows the correspondence between the bank numbers of the bank memories BK0 to BKF and the physical addresses of the ROM. Bank numbers “00” H are stored in the bank memories BK0 to BKF.
~ "0F" H is attached. In this embodiment, it is configured to have a maximum of 16 bank memories.

【0031】したがって、CPU20は、アクセス可能
な論理アドレス”2FF000”H、”2FF002”
Hに、”00”H〜”0F”Hを書込むことにより、次
に用いるバンクメモリのバンク番号をセットする。
Therefore, the CPU 20 can access accessible logical addresses "2FF000" H, "2FF002".
By writing "00" H to "0F" H in H, the bank number of the bank memory to be used next is set.

【0032】なお、バンク番号”00”H〜”07”H
には、32MビットのマスクROMの物理アドレス”0
00000”H〜”1FFFFF”Hが対応する。ま
た、バンク番号”08”H〜”0F”Hには、他の、3
2MビットのマスクROMの物理アドレス”00000
0”H〜”1FFFFF”Hが対応する。すなわち、こ
の実施例においては最大実装ROM容量は、64Mビッ
ト(32MビットX2)に設定されている。
Bank numbers "00" H to "07" H
Is the physical address "0" of the mask ROM of 32 Mbits.
0000000 "H to" 1FFFFF "H correspond to the bank numbers" 08 "H to" 0F "H.
Physical address of 2M bit mask ROM "00000
0 "H to" 1FFFFF "H correspond, that is, the maximum mounted ROM capacity is set to 64M bits (32M bits X2) in this embodiment.

【0033】また、図6に示すように、実装ROMを3
2Mビット(16MビットX2)とした場合には、バン
クレジスタBK8〜BKFは、アクセス不能となるか
ら、バンクコントロールレジスタCR1、CR2にセッ
トするバンク番号は”00”H〜”07”Hに限定され
る。
Further, as shown in FIG.
In the case of 2M bits (16M bits X2), the bank registers BK8 to BKF are inaccessible, so the bank numbers set in the bank control registers CR1 and CR2 are limited to "00" H to "07" H. It

【0034】バンクコントロールレジスタCR1、CR
2に、次に用いるバンクメモリのバンク番号をセットす
ると、CPU20はつぎに、セットされたバンクコント
ロールレジスタCR1、CR2の内容にしたがい、バン
クメモリを切換える(図3、ステップST6参照)。こ
のステップST6が、図1のバンク切換え手段14に対
応する。
Bank control registers CR1 and CR
When the bank number of the bank memory to be used next is set to 2, the CPU 20 next switches the bank memory according to the contents of the set bank control registers CR1 and CR2 (see step ST6 in FIG. 3). This step ST6 corresponds to the bank switching means 14 of FIG.

【0035】たとえば、バンクコントロールレジスタC
R1、CR2にセットされたバンク番号が、それぞれ”
00”H、”01”Hである場合、図7に示すように、
ウインドWD1、WD2には、それぞれ、バンクメモリ
BK0、BK1が当てはめられる。これにより、CPU
20から、バンクメモリBK0、BK1がアクセス可能
となる。なお、この場合、バンクコントロールレジスタ
CR1、CR2の内容を同一にすることもできる。この
場合には、ウインドWD1、WD2には同一のバンクメ
モリが当てはめられる。
For example, the bank control register C
The bank numbers set in R1 and CR2 are "
In case of “00” H and “01” H, as shown in FIG.
Bank memories BK0 and BK1 are applied to the windows WD1 and WD2, respectively. This allows the CPU
From 20, the bank memories BK0 and BK1 can be accessed. In this case, the contents of the bank control registers CR1 and CR2 may be the same. In this case, the same bank memory is applied to the windows WD1 and WD2.

【0036】また、図7に示すように、この実施例にお
いては、ウインドWD1、WD2には、それぞれ、CP
U20がアクセス可能な論理アドレス”200000”
H〜”27FFFF”H、”280000”H〜”2F
EFFF”が与えられている。したがって、ウインドW
D2は、ウインドWD1より、”1000”Hだけ小さ
い。これは、ハードウェア上の制限から、上述のバンク
コントロールレジスタCR1、CR2のために、CPU
20がアクセス可能な論理アドレスを、”1000”H
分確保しなければならないからである。なお、この実施
例においては、論理アドレス(図7参照)は、記憶素子
1バイト毎に付され、物理アドレス(図5、6参照)
は、記憶素子2バイト(1ワード)毎に付されている。
Further, as shown in FIG. 7, in this embodiment, the windows WD1 and WD2 respectively have CPs.
Logical address "200000" accessible by U20
H ~ "27FFFF" H, "2800000" H ~ "2F
EFFF ”is given. Therefore, the window W
D2 is smaller than window WD1 by "1000" H. This is because of the above-mentioned bank control registers CR1 and CR2 due to the hardware limitation.
The logical address accessible by 20 is "1000" H
This is because the amount must be secured. In this embodiment, the logical address (see FIG. 7) is assigned to each byte of the storage element, and the physical address (see FIGS. 5 and 6).
Is attached to every 2 bytes (1 word) of the storage element.

【0037】つぎにCPU20は、ステップST6で切
換えられたバンクメモリに記載されたプログラムの内容
を実行する(図3、ステップST8参照)。なお、ステ
ップST2において、バンクメモリを切換える必要がな
いと判断した場合、CPU20は、バンクメモリを切換
えることなく、現在、ウインドWD1、WD2に当ては
められているバンクメモリに記憶されているプログラム
の内容の実行を継続する。
Next, the CPU 20 executes the contents of the program written in the bank memory switched in step ST6 (see step ST8 in FIG. 3). When it is determined in step ST2 that the bank memory does not need to be switched, the CPU 20 does not switch the bank memory and the contents of the program currently stored in the bank memory currently applied to the windows WD1 and WD2 are stored. Continue execution.

【0038】プログラムの実行中、CPU20は、現在
アクセス可能となっているバンクメモリのバンク番号
(前述の例では”00”Hおよび”01”H)を参照す
る必要があるか否かを判断する(図3、ステップST1
0参照)。
During execution of the program, the CPU 20 determines whether or not it is necessary to refer to the bank numbers (“00” H and “01” H in the above example) of the bank memory that is currently accessible. (FIG. 3, step ST1
0).

【0039】参照する必要があると判断すると、CPU
20は、プログラムにしたがってバンクコントロールレ
ジスタCR1、CR2のいずれかまたは双方の内容を参
照し(図3、ステップST12参照)、参照したバンク
番号に基づいてプログラムを実行する。一方、CPU2
0は、バンク番号を参照する必要がないと判断すると、
制御をステップS2に戻し、以後、同様の処理を繰り返
す。
When it is determined that the reference is necessary, the CPU
20 refers to the contents of one or both of the bank control registers CR1 and CR2 according to the program (see step ST12 in FIG. 3) and executes the program based on the referred bank number. On the other hand, CPU2
0 determines that it is not necessary to refer to the bank number,
The control is returned to step S2, and the same processing is repeated thereafter.

【0040】このようにして、CPU20は、アクセス
可能な論理アドレス”2FF000”H、”2FF00
2”Hに記憶されている内容を読み取ることにより、プ
ログラム上で、いつでも、現在アクセス可能となってい
るバンクメモリのバンク番号を知ることができる。
In this way, the CPU 20 can access accessible logical addresses "2FF000" H, "2FF00".
By reading the contents stored in 2 "H, the bank number of the currently accessible bank memory can be known on the program at any time.

【0041】なお、この実施例においては、最大実装R
OM容量を64Mビットとしたが、最大実装ROM容量
はこれに限定されるものではない。また、バンクメモリ
は、8個、16個以外でもよい。また、ウインド部は、
2つに限らず。1または3以上でもよい。バンクコント
ロールレジスタの数も、これに対応させて設けることが
できる。
In this embodiment, the maximum mounting R
Although the OM capacity is set to 64 Mbits, the maximum mounted ROM capacity is not limited to this. Further, the number of bank memories may be other than 8, 16. In addition, the wind department,
Not limited to two. It may be 1 or 3 or more. The number of bank control registers can be provided correspondingly.

【0042】また、上述の実施例においては、CPU2
0を用いて、ハードウェア構成を実現する場合を例に説
明したが、ハードウェア構成の一部または全部を、ハー
ドウェアロジックにより実現することもできる。
Further, in the above embodiment, the CPU 2
The case where the hardware configuration is realized by using 0 has been described as an example, but a part or the whole of the hardware configuration can be realized by the hardware logic.

【0043】[0043]

【発明の効果】請求項1のメモリの制御装置および請求
項3のメモリの制御方法は、中央処理装置からアクセス
可能なメモリ空間の論理アドレスが与えらたバンクコン
トロールレジスタの内容を、書き換え可能にかつ読取り
可能に構成し、中央処理装置からウインド部をアクセス
した場合、バンクコントロールレジスタの内容にしたが
って、どのバンクメモリにアクセスするかを切換えるこ
とを特徴とする。
According to the memory control device of the first aspect and the memory control method of the third aspect, the contents of the bank control register to which the logical address of the memory space accessible from the central processing unit is given can be rewritten. In addition, when the window is accessed from the central processing unit, which bank memory is accessed is switched according to the contents of the bank control register.

【0044】したがって、バンクコントロールレジスタ
の内容を読み取るようプログラムすることができる。こ
のため、現在どのバンクメモリにアクセスしているか
を、容易に知ることができる。すなわち、複雑な構造を
有するプログラムにおいても、プログラミングを容易に
行なうことができる。
Therefore, it can be programmed to read the contents of the bank control register. Therefore, it is possible to easily know which bank memory is currently being accessed. That is, even a program having a complicated structure can be easily programmed.

【0045】請求項2のメモリの制御装置は、請求項1
のメモリの制御装置において、ウインド部を複数とし、
各ウインド部に対応するバンクコントロールレジスタを
設けたことを特徴とする。
According to a second aspect of the present invention, there is provided a memory control device according to the first aspect.
In the control device of the memory of,
A feature is that a bank control register corresponding to each window portion is provided.

【0046】したがって、各ウインドに対応するバンク
コントロールレジスタの内容を読み取るようプログラム
することができる。このため、現在どのバンクメモリに
アクセスしているかを、各ウインドごとに、容易に知る
ことができる。すなわち、さらに複雑な構造を有するプ
ログラムにおいても、プログラミングを容易に行なうこ
とができる。
Therefore, it can be programmed to read the contents of the bank control register corresponding to each window. Therefore, it is possible to easily know which bank memory is currently being accessed for each window. That is, programming can be easily performed even in a program having a more complicated structure.

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

【図1】この発明の一の実施例によるバンクメモリ制御
装置の構成を示す図面である。
FIG. 1 is a diagram showing a configuration of a bank memory control device according to an embodiment of the present invention.

【図2】この発明の一の実施例によるバンクメモリ制御
装置をCPUを用いて実現した場合のハードウェア構成
を示す図面である。
FIG. 2 is a drawing showing a hardware configuration when a bank memory control device according to an embodiment of the present invention is implemented using a CPU.

【図3】この発明の一の実施例によるバンクメモリ制御
装置によるバンクメモリ制御処理の流れを示す図面であ
る。
FIG. 3 is a drawing showing the flow of bank memory control processing by the bank memory control device according to one embodiment of the present invention.

【図4】バンクコントロールレジスタの仕様を示す図面
である。
FIG. 4 is a diagram showing specifications of a bank control register.

【図5】バンク番号と物理アドレスとの対応を示す図面
である。
FIG. 5 is a diagram showing correspondence between bank numbers and physical addresses.

【図6】バンク番号と物理アドレスとの対応を示す図面
である。
FIG. 6 is a diagram showing correspondence between bank numbers and physical addresses.

【図7】ウインドとバンクメモリとの対応を示す図面で
ある。
FIG. 7 is a diagram showing correspondence between windows and bank memories.

【図8】従来のバンクメモリ制御装置の構成を示す図面
である。
FIG. 8 is a diagram showing a configuration of a conventional bank memory control device.

【図9】従来のバンクメモリ制御装置におけるバンクと
バンク選択データとの関係を示す図面である。
FIG. 9 is a diagram showing a relationship between banks and bank selection data in a conventional bank memory control device.

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

14・・・・・・・・バンク切換え制御手段 16・・・・・・・・中央処理装置 CR1・・・・・・・バンクコントロールレジスタ CR2・・・・・・・バンクコントロールレジスタ WD1・・・・・・・ウインド WD2・・・・・・・ウインド BK0〜BKF・・・バンクメモリ 14 ... Bank switching control means 16 ... Central processing unit CR1 ... Bank control register CR2 ... Bank control register WD1 ...・ ・ ・ Window WD2 ・ ・ ・ Window BK0 to BKF ・ ・ ・ Bank memory

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】ウインド部を含むメモリ空間に対しアクセ
ス可能な中央処理装置が、ウインド部に対応する複数の
バンクメモリに対してアクセスするためのメモリの制御
装置において、 中央処理装置からアクセス可能なメモリ空間の論理アド
レスが与えられており、内容を、書き換え可能にかつ読
取り可能に構成したバンクコントロールレジスタ、 中央処理装置からウインド部をアクセスした場合、バン
クコントロールレジスタの内容にしたがって、どのバン
クメモリにアクセスするかを切換えるバンク切換え制御
手段、 を設けたことを特徴とするメモリの制御装置。
1. A central processing unit capable of accessing a memory space including a window section, wherein the central processing unit is accessible in a controller of a memory for accessing a plurality of bank memories corresponding to the window section. When the window is accessed from the central control unit, the bank control register that is configured to be rewritable and readable, and the logical address of the memory space is given, which bank memory is stored according to the content of the bank control register. A memory control device comprising: bank switching control means for switching access.
【請求項2】請求項1のメモリの制御装置において、 ウインド部を複数とし、各ウインド部に対応するバンク
コントロールレジスタを設けたことを特徴とするもの。
2. The memory control device according to claim 1, wherein a plurality of window sections are provided, and a bank control register corresponding to each window section is provided.
【請求項3】中央処理装置からアクセス可能なメモリ空
間の論理アドレスが与えらたバンクコントロールレジス
タの内容を、書き換え可能にかつ読取り可能に構成し、 中央処理装置からウインド部をアクセスした場合、バン
クコントロールレジスタの内容にしたがって、どのバン
クメモリにアクセスするかを切換えることを特徴とする
メモリの制御方法。
3. The contents of a bank control register given a logical address of a memory space accessible from the central processing unit are configured to be rewritable and readable, and when the window section is accessed from the central processing unit, the bank is A method for controlling a memory, characterized in that which bank memory is to be accessed is switched according to the contents of a control register.
JP2173495A 1995-02-09 1995-02-09 Device and method for controlling memory Pending JPH08221322A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2173495A JPH08221322A (en) 1995-02-09 1995-02-09 Device and method for controlling memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2173495A JPH08221322A (en) 1995-02-09 1995-02-09 Device and method for controlling memory

Publications (1)

Publication Number Publication Date
JPH08221322A true JPH08221322A (en) 1996-08-30

Family

ID=12063313

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2173495A Pending JPH08221322A (en) 1995-02-09 1995-02-09 Device and method for controlling memory

Country Status (1)

Country Link
JP (1) JPH08221322A (en)

Similar Documents

Publication Publication Date Title
JP4957800B2 (en) Semiconductor memory device and system
JPS6259822B2 (en)
JPS607301B2 (en) computer system
US5611042A (en) Data error detection and correction for a shared SRAM
US7162563B2 (en) Semiconductor integrated circuit having changeable bus width of external data signal
US5127096A (en) Information processor operative both in direct mapping and in bank mapping, and the method of switching the mapping schemes
JPH0916462A (en) Apparatus and method for data processing
EP0395377B1 (en) Status register for microprocessor
US4975882A (en) User programmable redundant memory
JPH08221322A (en) Device and method for controlling memory
KR100517765B1 (en) Cache memory and control method thereof
US4628450A (en) Data processing system having a local memory which does not use a directory device with distributed resident programs and a method therefor
JP2510604B2 (en) Storage device
US5793991A (en) Method of equalizing loads on a computer bus
KR20040036477A (en) Integrated circuit capable of operating data read and data writing simultaneously and method thereof
JPH0259560B2 (en)
JP2954988B2 (en) Information processing device
JP2581057B2 (en) Evaluation microcomputer
JP2616714B2 (en) Semiconductor storage device
JP2002149488A (en) Integrated circuit device and method for controlling cache memory
JPS5833765A (en) Memory controlling system
JPH03211641A (en) Address designation method for memory device
JP2002318779A (en) Device, and access method for its register
JPS6246493A (en) Semiconductor integrated circuit device
JPH05233470A (en) Address conversion device