JPH0784873A - Storage device - Google Patents

Storage device

Info

Publication number
JPH0784873A
JPH0784873A JP5249963A JP24996393A JPH0784873A JP H0784873 A JPH0784873 A JP H0784873A JP 5249963 A JP5249963 A JP 5249963A JP 24996393 A JP24996393 A JP 24996393A JP H0784873 A JPH0784873 A JP H0784873A
Authority
JP
Japan
Prior art keywords
bank
data
address
storage device
read
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
JP5249963A
Other languages
Japanese (ja)
Inventor
Koichi Takahashi
宏一 高橋
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP5249963A priority Critical patent/JPH0784873A/en
Publication of JPH0784873A publication Critical patent/JPH0784873A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To eliminate the concentration of access on a specific bank even when the amount of data is small and to prevent only memory elements of a bank from concentrically get out of order by making respective banks uniform in use frequency as to a bank type storage device. CONSTITUTION:Counters 3a-3d provided corresponding to respective bands count the frequencies of data writing to banks 2a-2d and a bank determination part 4 selects the bank having the least number of written data by referring to the counted values of the counters 3a-3d, and writes new data in the selected bank.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は記憶装置に関し、特にバ
ンク方式でデータを記憶する記憶装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a storage device, and more particularly to a storage device for storing data in a bank system.

【0002】[0002]

【従来の技術】CPUが扱えるメモリアドレス空間はそ
のCPU毎に決まっているが、このメモリアドレス空間
より大きな容量の主記憶を利用したい場合などに、従来
からバンク方式が用いられている。このバンク方式は、
メモリアドレス空間より大きな容量の主記憶装置を用意
し、この主記憶装置の記憶領域を1つのバンクの記憶容
量がメモリアドレス空間と等しくなるように複数のバン
クに分け、アクセス時にはバンク単位でアクセスし、ア
クセスするバンクを切替えることで大きな記憶容量を利
用しようとするものである。
2. Description of the Related Art A memory address space that can be handled by a CPU is fixed for each CPU, but a bank system has been conventionally used when it is desired to use a main memory having a larger capacity than this memory address space. This bank system is
Prepare a main memory device with a capacity larger than the memory address space, divide the memory area of this main memory device into a plurality of banks so that the memory capacity of one bank is equal to the memory address space, and access in bank units at the time of access. , It intends to use a large storage capacity by switching the bank to be accessed.

【0003】従来のバンク方式の記憶装置は、データを
記憶する際、まず、あるバンクに対してデータを記憶さ
せていき、そのバンクがいっぱいになったらバンク切替
えを行い次のバンクに記憶させるというものであった。
In the conventional bank type storage device, when storing data, first, the data is stored in a certain bank, and when the bank becomes full, the bank is switched and stored in the next bank. It was a thing.

【0004】[0004]

【発明が解決しようとする課題】上述した従来のバンク
方式の記憶装置では、1つのバンクがいっぱいになった
ら次のバンクを使うというものであるため、データ量が
少ない場合には1つの特定バンクにアクセスが集中して
しまっていた。このため、アクセスが集中したバンクの
メモリ素子のみが集中的に故障してしまうという問題が
あった。
In the conventional bank type storage device described above, when one bank is full, the next bank is used. Therefore, when the data amount is small, one specific bank is used. Access was concentrated on. Therefore, there has been a problem that only the memory elements in the bank where the access is concentrated fail intensively.

【0005】本発明は上記の点にかんがみてなされたも
ので、バンク方式の記憶装置において、各バンクの使用
頻度を均等化し、データ量が少ない場合であっても特定
のバンクにアクセスが集中せずそのバンクのメモリ素子
のみが集中的に故障するのを防止することを目的とす
る。
The present invention has been made in view of the above points, and in a bank type storage device, the use frequency of each bank is equalized, and access is concentrated on a specific bank even when the amount of data is small. The purpose is to prevent intensive failure of only the memory elements in that bank.

【0006】[0006]

【課題を解決するための手段】本発明は上記の目的を達
成するために、複数のバンクに分けられた記憶部と、前
記バンクのそれぞれに対するデータ書込みの回数をカウ
ントする複数のカウンタと、前記記憶部へのデータ書込
み時に前記複数のカウンタのカウント数を参照し書込み
回数が最も少ないバンクにデータを書込むように制御す
る制御部とから記憶装置を構成した。
In order to achieve the above object, the present invention provides a storage section divided into a plurality of banks, a plurality of counters for counting the number of times data is written to each of the banks, and The memory device is configured by a control unit that refers to the count numbers of the plurality of counters at the time of writing data to the storage unit and controls so as to write the data to the bank having the smallest number of writes.

【0007】[0007]

【作用】本発明は以上の構成によって、バンク毎のデー
タ書込み回数を各バンクに対応して設けたカウンタがカ
ウントし、制御部がカウンタのカウント数に基づいてす
でに書込んだデータ数が最も少ないバンクを選択しこの
選択されたバンクに新たなデータを書込むように制御す
る。
According to the present invention, with the above configuration, the number of times of writing data for each bank is counted by the counter provided corresponding to each bank, and the number of data already written by the control unit is the smallest based on the count number of the counter. A bank is selected and control is performed so that new data is written in the selected bank.

【0008】[0008]

【実施例】以下本発明を図面に基づいて説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings.

【0009】図1は本発明による記憶装置のブロック図
である。
FIG. 1 is a block diagram of a storage device according to the present invention.

【0010】1は記憶装置であり、バンク2aないし2
dから成る記憶部2と、カウンタ3aないし3dと、制
御部としてのバンク決定部4およびバンク管理部5とか
ら成る。記憶装置1は制御線およびデータ線でCPU6
と接続されており、CPU6から制御線を介して書込み
指示があった場合にはCPU6からデータ線を介して書
込むべきデータを受け取り記憶部2に書込み、CPU6
から制御線を介して読出し指示があった場合にはデータ
を記憶部2から読出してデータ線を介してCPU6に出
力したりする。
Reference numeral 1 denotes a storage device, which is a bank 2a to 2
A storage unit 2 including d, counters 3a to 3d, a bank determining unit 4 as a control unit, and a bank managing unit 5. The storage device 1 includes a control line and a data line for the CPU 6
When a write instruction is issued from the CPU 6 via the control line, the CPU 6 receives the data to be written via the data line from the CPU 6 and writes the data in the storage unit 2.
When there is a read instruction from the control line, the data is read from the storage unit 2 and output to the CPU 6 via the data line.

【0011】CPU6からの書込み指示としては、ライ
トイネーブル信号が「真」を意味するHIGHになり、
このライトイネーブル信号がHIGHのときに、バンク
およびそのバンク内でのアドレスを特定するアドレスで
あり、CPU6で動作するソフトウェアにおける書込む
べきデータのアドレスであるソフトアドレスと、書込む
べきデータのデータ量すなわちバイト数とが記憶装置1
のバンク管理部5に対して出力される。
As a write instruction from the CPU 6, the write enable signal becomes HIGH which means "true",
When this write enable signal is HIGH, it is an address that identifies a bank and an address in that bank, and is a software address that is the address of the data to be written in the software operating in the CPU 6, and the amount of data to be written. That is, the number of bytes is the storage device 1
Is output to the bank management unit 5.

【0012】一方、CPU6からの読出し指示として
は、リードイネーブル信号が「真」を意味するHIGH
になり、このリードイネーブル信号がHIGHのとき
に、読出すべきデータのソフトアドレスと、読出すべき
データのデータ量すなわちバイト数とが記憶装置1のバ
ンク管理部5に対して出力される。
On the other hand, as a read instruction from the CPU 6, the read enable signal is "HIGH" which means "true".
When the read enable signal is HIGH, the soft address of the data to be read and the data amount of the data to be read, that is, the number of bytes are output to the bank management unit 5 of the storage device 1.

【0013】本実施例では図1に示すように記憶部2が
バンク2aないし2dの4つのバンクに分けられてお
り、バンク2aないし2dのそれぞれに対してカウンタ
3aないし3dが設けられている。カウンタ3aないし
3dは対応したバンク2aないし2dに対するライトイ
ネーブル信号がHIGHになった回数をカウントするも
のであり、このカウント数はバンク決定部4が参照する
ことができるようになっている。また、バンク決定部4
はバンク2aないし2dの空きメモリの先頭部分のバン
ク内でのアドレスを保持している。
In this embodiment, as shown in FIG. 1, the storage unit 2 is divided into four banks 2a to 2d, and counters 3a to 3d are provided for each of the banks 2a to 2d. The counters 3a to 3d count the number of times the write enable signal for the corresponding banks 2a to 2d becomes HIGH, and the count number can be referred to by the bank determining unit 4. Also, the bank determination unit 4
Holds the address in the bank of the head portion of the empty memory of the banks 2a to 2d.

【0014】次に本発明による記憶装置1の動作を説明
する。
Next, the operation of the storage device 1 according to the present invention will be described.

【0015】まず、記憶装置1への書込み動作を説明す
る。
First, the write operation to the storage device 1 will be described.

【0016】制御線を介してCPU6からの書込み指示
を受けたバンク管理部5は、内部に有するアドレス−バ
ンク変換テーブルに基づいて、CPU6から受け取った
書込むべきデータのソフトアドレスからバンク2aない
し2dのいずれかを特定するバンク番号を求め、バンク
決定部4に対するライトイネーブル信号をHIGHにす
るとともに、求めたバンク番号と書込むべきデータのソ
フトアドレスと書込むべきデータのデータ量とをバンク
決定部4に対して出力する。アドレス−バンク変換テー
ブルは、書込むべきデータのソフトアドレスとそのデー
タを格納するバンクのバンク番号とを対応付けて保持し
たものであり、バンク決定部4からの指示で更新可能な
ものである。ここでは、バンク2aのバンク番号を1
0、バンク2bのバンク番号を20、バンク2cのバン
ク番号を30、バンク2dのバンク番号を40として説
明し、アドレス−バンク変換テーブルに基づいてバンク
2aのバンク番号10が求まったものとする。
The bank management unit 5, which has received the write instruction from the CPU 6 via the control line, uses the soft address of the data to be written received from the CPU 6 as the banks 2a to 2d based on the internal address-bank conversion table. Of the specified bank number, the write enable signal to the bank determination unit 4 is set to HIGH, and the calculated bank number, the soft address of the data to be written, and the data amount of the data to be written are set to the bank determination unit. Output to 4. The address-bank conversion table holds the soft address of the data to be written and the bank number of the bank storing the data in association with each other, and can be updated by an instruction from the bank determination unit 4. Here, the bank number of the bank 2a is 1
It is assumed that the bank number of the bank 2b is 20, the bank number of the bank 2c is 30, the bank number of the bank 2d is 40, and the bank number 10 of the bank 2a is obtained based on the address-bank conversion table.

【0017】バンク管理部5からのライトイネーブル信
号がHIGHになったことを検出したバンク決定部4
は、カウンタ3aないし3dのそれぞれのカウント数を
参照しカウント数が最も少ないカウンタを選択する。こ
こではカウンタ3cのカウント数が最も少なかったもの
として説明する。そして、選択したカウンタに対するバ
ンクのバンク番号と、バンク管理部5からのバンク番号
とが等しいか否かをチェックし、等しくなかった場合に
のみ選択したカウンタに対するバンクのバンク番号をバ
ンク管理部5に出力する。ここでは、選択したカウンタ
3cに対するバンク2cのバンク番号は30、バンク管
理部5からのバンク番号は10であるので等しくないた
め、バンク番号30をバンク管理部5に出力する。
The bank determination unit 4 which detects that the write enable signal from the bank management unit 5 has become HIGH
Refers to the respective count numbers of the counters 3a to 3d and selects the counter with the smallest count number. Here, it is assumed that the count number of the counter 3c is the smallest. Then, it is checked whether or not the bank number of the bank for the selected counter is equal to the bank number from the bank management unit 5, and only when they are not equal, the bank number of the bank for the selected counter is set in the bank management unit 5. Output. Here, since the bank number of the bank 2c for the selected counter 3c is 30, and the bank number from the bank management unit 5 is 10, they are not equal, so the bank number 30 is output to the bank management unit 5.

【0018】バンク決定部4からバンク番号30を受け
たバンク管理部5は、アドレス−バンク変換テーブルを
書き換えることにより、バンク決定部4で選択したカウ
ンタ3cに対するバンク2cのバンク番号30と前述の
ソフトアドレスとを対応付けておく。
The bank management unit 5, which has received the bank number 30 from the bank determination unit 4, rewrites the address-bank conversion table so that the bank number 30 of the bank 2c for the counter 3c selected by the bank determination unit 4 and the above-mentioned software. It is associated with the address.

【0019】一方、バンク決定部4では、予め保持して
いるバンク2aないし2dの空きメモリの先頭部分のバ
ンク内でのアドレスを参照し、選択したカウンタ3cに
対するバンク2cの空きメモリの先頭部分からデータを
書込むように、選択したカウンタ3cおよびバンク2c
に対するライトイネーブル信号をHIGHにするととも
に、バンク管理部5から受け取った書込むべきデータの
データ量をバンク2cに対して出力する。また、バンク
決定部4は、データを書込むバンク内でのアドレスとバ
ンク管理部5から受け取った書込むべきデータのソフト
アドレスとを対応付けて保持し、さらに、バンク管理部
5から受け取った書込むべきデータのデータ量の分だけ
バンク2cの空きメモリの先頭部分のバンク内でのアド
レスをずらしておく。
On the other hand, the bank determining section 4 refers to the address in the bank of the head portion of the empty memory of the banks 2a to 2d which is held in advance, and starts from the head portion of the empty memory of the bank 2c for the selected counter 3c. Counter 3c and bank 2c selected to write data
The write enable signal for is set HIGH, and the data amount of the data to be written received from the bank management unit 5 is output to the bank 2c. Further, the bank determination unit 4 holds the address in the bank in which the data is written and the soft address of the data to be written received from the bank management unit 5 in association with each other, and further, the write received from the bank management unit 5. The address in the bank of the head portion of the empty memory of the bank 2c is shifted by the amount of data to be inserted.

【0020】バンク決定部4からのライトイネーブル信
号がHIGHになったことを検出したカウンタ3cは、
カウント数を1だけカウントアップする。また、バンク
決定部4からのライトイネーブル信号がHIGHになっ
たことを検出したバンク2cは、CPU6からデータ線
を介して書込むべきデータを取得し、そのデータを、バ
ンク決定部4から受け取った書込むべきデータのデータ
量だけバンク2cの空きメモリの先頭部分から書込む。
The counter 3c which has detected that the write enable signal from the bank determining section 4 has become HIGH is
Count up by one. Further, the bank 2c that has detected that the write enable signal from the bank determination unit 4 has become HIGH acquires the data to be written from the CPU 6 via the data line, and receives the data from the bank determination unit 4. Only the amount of data to be written is written from the head portion of the empty memory of the bank 2c.

【0021】次に、記憶装置1からの読出し動作を説明
する。
Next, the read operation from the storage device 1 will be described.

【0022】制御線を介してCPU6からの読出し指示
を受けたバンク管理部5は、内部に有するアドレス−バ
ンク変換テーブルに基づいて、CPU6から受け取った
読出すべきデータのソフトアドレスからバンク2aない
し2dのいずれかを特定するバンク番号を求め、バンク
決定部4に対するリードイネーブル信号をHIGHにす
るとともに、求めたバンク番号と読出すべきデータのソ
フトアドレスと読出すべきデータのデータ量とをバンク
決定部4に対して出力する。ここでは、アドレス−バン
ク変換テーブルに基づいてバンク2cのバンク番号30
が求まったものとする。
The bank management unit 5, which has received a read instruction from the CPU 6 via the control line, uses the soft addresses of the data to be read received from the CPU 6 as the banks 2a to 2d based on the internal address-bank conversion table. Of the specified bank number, the read enable signal to the bank determination unit 4 is set to HIGH, and the calculated bank number, the soft address of the data to be read, and the data amount of the data to be read are set to the bank determination unit. Output to 4. Here, the bank number 30 of the bank 2c is based on the address-bank conversion table.
Is obtained.

【0023】バンク管理部5からのリードイネーブル信
号がHIGHになったことを検出したバンク決定部4
は、データの書込み時に保持した書込んだデータのソフ
トアドレスとそのデータのバンク内でのアドレスとの対
応付けを参照してバンク管理部5から受け取った読出す
べきデータのソフトアドレスからそのデータが記憶され
ているバンク内でのアドレスを求める。さらに、バンク
管理部5から受け取ったバンク番号のバンク、すなわち
バンク2cに対するリードイネーブル信号をHIGHに
するとともに、ここで求めた読出すべきデータのバンク
内でのアドレスと、バンク管理部5から受け取った読出
すべきデータのデータ量とをバンク2cに対して出力す
る。
The bank determination unit 4 which detects that the read enable signal from the bank management unit 5 has become HIGH
Refers to the correspondence between the soft address of the written data held at the time of writing the data and the address of the data in the bank, and the data is read from the soft address of the data to be read received from the bank management unit 5. Find the address in the stored bank. Further, the read enable signal for the bank having the bank number received from the bank management unit 5, that is, the bank 2c is set to HIGH, and the address in the bank of the data to be read obtained here and the address received from the bank management unit 5 are received. The amount of data to be read and the amount of data to be read are output to the bank 2c.

【0024】バンク決定部4からのリードイネーブル信
号がHIGHになったことを検出したバンク2cは、バ
ンク決定部4から受け取った読出すべきデータのバンク
内でのアドレスから、バンク管理部5から受け取った読
出すべきデータのデータ量分だけデータを読出し、読出
したデータをデータ線を介してCPU6に対して出力す
る。
The bank 2c, which has detected that the read enable signal from the bank determination unit 4 has become HIGH, receives from the bank management unit 5 from the address in the bank of the data to be read received from the bank determination unit 4. The data is read by the amount of the data to be read, and the read data is output to the CPU 6 via the data line.

【0025】[0025]

【発明の効果】以上説明したように、本発明によれば、
各バンク毎にカウンタを備え、それぞれのバンクに対す
るデータの書込み回数をカウントしておき、次にデータ
を書込むときにはカウンタのカウント数を参照して書込
み回数が最も少ないバンクに書込むようにバンク管理を
行うので、データ量が少ない場合であっても特定のバン
クにアクセスが集中することがなく、各バンクのメモリ
素子の使用頻度を均等化でき、特定のバンクのメモリ素
子のみが集中的に故障するのを防ぐことができる。
As described above, according to the present invention,
Each bank has a counter, counts the number of times data is written to each bank, and refers to the count number of the counter when writing the next data, and manages the bank so that the bank with the smallest number of writes is written. Therefore, even if the amount of data is small, access does not concentrate on a specific bank, the frequency of use of memory elements in each bank can be equalized, and only the memory elements in a specific bank fail intensively. Can be prevented.

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

【図1】本発明による記憶装置のブロック図である。FIG. 1 is a block diagram of a storage device according to the present invention.

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

1 記憶装置 2 記憶部 2a、2b、2c、2d バンク 3a、3b、3c、3d カウンタ 4 バンク決定部 5 バンク管理部 6 CPU 1 Storage Device 2 Storage Units 2a, 2b, 2c, 2d Banks 3a, 3b, 3c, 3d Counter 4 Bank Determination Unit 5 Bank Management Unit 6 CPU

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数のバンクに分けられた記憶部と、前
記バンクのそれぞれに対するデータ書込みの回数をカウ
ントする複数のカウンタと、前記記憶部へのデータ書込
み時に前記複数のカウンタのカウント数を参照し書込み
回数が最も少ないバンクにデータを書込むように制御す
る制御部とを備えたことを特徴とする記憶装置。
1. A storage unit divided into a plurality of banks, a plurality of counters for counting the number of times of writing data to each of the banks, and a count number of the plurality of counters when writing data to the storage unit. And a control unit that controls so that data is written in a bank that has the least number of times of writing.
【請求項2】 前記データ書込みの回数のカウントは、
ライトイネーブル信号の立ち上がりをカウントするもの
であることを特徴とする請求項1に記載の記憶装置。
2. The count of the number of times of data writing is
The storage device according to claim 1, wherein the storage device counts rising edges of the write enable signal.
JP5249963A 1993-09-10 1993-09-10 Storage device Pending JPH0784873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5249963A JPH0784873A (en) 1993-09-10 1993-09-10 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5249963A JPH0784873A (en) 1993-09-10 1993-09-10 Storage device

Publications (1)

Publication Number Publication Date
JPH0784873A true JPH0784873A (en) 1995-03-31

Family

ID=17200799

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5249963A Pending JPH0784873A (en) 1993-09-10 1993-09-10 Storage device

Country Status (1)

Country Link
JP (1) JPH0784873A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0391852A (en) * 1989-09-05 1991-04-17 Mitsubishi Electric Corp Data write preventing circuit for eeprom
JPH04111587A (en) * 1990-08-31 1992-04-13 Olympus Optical Co Ltd Electronic still camera

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0391852A (en) * 1989-09-05 1991-04-17 Mitsubishi Electric Corp Data write preventing circuit for eeprom
JPH04111587A (en) * 1990-08-31 1992-04-13 Olympus Optical Co Ltd Electronic still camera

Similar Documents

Publication Publication Date Title
JPH04233643A (en) Control apparatus for buffer memory
JPH0784873A (en) Storage device
JP4095840B2 (en) Cache memory management method
KR100223626B1 (en) First-in and first-out memory circuit
JPH03147157A (en) Information processor
JPH0795307B2 (en) Cache memory control circuit
JPH06214837A (en) Storage area managing method for external storage device
JPH06103026A (en) Memory system
JPH05158795A (en) Cache memory system
JP3076199B2 (en) Buffer access control circuit
JPH07152649A (en) Method and device for memory caching
JPH0883213A (en) Storage device including cache memory
JPS6137655B2 (en)
JPH0844624A (en) Storage device for applying interleave system
JPH01140342A (en) Virtual computer system
JPH1064197A (en) Disk device
JPH03156653A (en) Cache memory control system
JPH0764858A (en) Cache memory
JPH0540693A (en) Virtual storage managing system
JP2000259496A (en) Storage device
JPH06318162A (en) Memory device
JPH01318127A (en) System for switching memory bank
JPH07200407A (en) Virtual storage system
JPH07121431A (en) Address controller
JPH09204356A (en) Electronic computer

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19980707