JPH08241242A - Method and circuit for memory control - Google Patents

Method and circuit for memory control

Info

Publication number
JPH08241242A
JPH08241242A JP4267795A JP4267795A JPH08241242A JP H08241242 A JPH08241242 A JP H08241242A JP 4267795 A JP4267795 A JP 4267795A JP 4267795 A JP4267795 A JP 4267795A JP H08241242 A JPH08241242 A JP H08241242A
Authority
JP
Japan
Prior art keywords
data
additional
memory
unit
address
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.)
Withdrawn
Application number
JP4267795A
Other languages
Japanese (ja)
Inventor
Hiroyuki Kawahara
弘幸 河原
Atsushi Fujihira
淳 藤平
Keiko Yuki
恵子 結城
Fumiaki Tahira
文明 田平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4267795A priority Critical patent/JPH08241242A/en
Publication of JPH08241242A publication Critical patent/JPH08241242A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To partially rewrite data at a high speed with respect to the method and circuit for memory control which rewrite a part of data stored in a memory. CONSTITUTION: One additional data is provided per data unit, and the data unit is stored divisionally in continuous addresses of a data part memory, and additional data is stored in an additional part memory. In this memory system, additional data corresponding to the data unit is read out from the additional part memory by the first address access to this data unit in the data part memory and is held, and contents of additional data are updated on the outside of the additional part memory by following continuous address accesses to the data unit, and updated additional data is written in the original address of the additional part memory at the time of the last address access to the data unit.

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 method and a memory control circuit for rewriting a part of data stored in a memory.

【0002】[0002]

【従来の技術】図6には通信カードの構成例が示され
る。この通信カード20は、バスコントローラ21、パ
リティRAM22、データRAM23、プロトコルコン
トローラ24、CPU(中央処理装置)25等を含み構
成される。通信カード20はホストコンピュータ30と
接続され、そのバスのデータ幅は32ビット(D0〜D
31)である。一方、通信カード20内のバスのデータ
幅はバスインタフェース21とデータRAM23の間は
32ビットであるが、プロトコルコントローラ24とC
PU25の間は16ビットであり、バスコントローラ2
1とデータRAM23の下位16ビットに接続してい
る。
2. Description of the Related Art FIG. 6 shows a configuration example of a communication card. The communication card 20 includes a bus controller 21, a parity RAM 22, a data RAM 23, a protocol controller 24, a CPU (central processing unit) 25, and the like. The communication card 20 is connected to the host computer 30, and the bus has a data width of 32 bits (D0 to D).
31). On the other hand, the data width of the bus in the communication card 20 is 32 bits between the bus interface 21 and the data RAM 23, but the protocol controller 24 and C
There are 16 bits between the PU 25 and the bus controller 2
1 and the lower 16 bits of the data RAM 23.

【0003】このため、ホストコンピュータ30の32
ビットデータは、データRAM23に32ビットのデー
タ単位を一度に書込み/読出しするのに対して、CPU
25のデータ幅は16ビットであるため、データRAM
23に32ビットのデータ単位を書込み/読出しするた
めには、2度のアクセスが必要である。例えばCPU2
5がデータRAM23に書込みを行う場合には、32ビ
ットデータ(D0〜D31)中の下位16ビット(D0
〜D15)をゲート26経由でRAM23のアドレスN
(D0〜D7が格納される)およびアドレスN+1(D
8〜D15が格納される)に同時に書き込み、残りの上
位16ビット(D16〜D31)をバスコントローラ2
1経由でデータRAM23のアドレスN+2(D16〜
D23が格納される)およびアドレスN+3(D24〜
D31が格納される)に書き込む。
Therefore, 32 of the host computer 30
As for bit data, 32-bit data units are written / read at a time in the data RAM 23, while the CPU
Since the data width of 25 is 16 bits, the data RAM
Two accesses are required to write / read a 32-bit data unit to / from 23. For example CPU2
5 writes to the data RAM 23, the lower 16 bits (D0) of the 32-bit data (D0 to D31).
Through D15) via the gate 26 to the address N of the RAM 23
(D0 to D7 are stored) and address N + 1 (D
8 to D15 are stored simultaneously) and the remaining upper 16 bits (D16 to D31) are written to the bus controller 2
Address N + 2 (D16-
D23 is stored) and address N + 3 (D24-
D31 is stored).

【0004】なお、16ビットおよび32ビットアクセ
スの場合、複数アドレスを同時指定する必要があるた
め、16ビットアクセスの場合にはアドレスの最下位ビ
ットLSBの代わりに二つのバイトイネーブル信号BL
E、BHEをそれぞれアドレスNおよびアドレスN+1
に割り当てて、複数アドレスの同時指定および個別指定
をする仕組みになっている。32ビットアクセスの場合
も同様の方法で、アドレスの下位2ビットの代わりに4
つのバイトイネーブル信号BE0〜BE3をそれぞれア
ドレスN〜アドレスN+3に割り当てている。以降、単
に“アドレスNの領域”という場合には、アドレスN〜
アドレスN+3の空間を指すこととする。
In the case of 16-bit and 32-bit access, it is necessary to specify a plurality of addresses at the same time. Therefore, in the case of 16-bit access, two byte enable signals BL are used instead of the least significant bit LSB of the address.
E and BHE are the address N and the address N + 1, respectively.
It is designed to be assigned to multiple addresses simultaneously and individually. In the case of 32-bit access, the same method is used, instead of the lower 2 bits of the address, 4
One byte enable signal BE0-BE3 is assigned to address N-address N + 3, respectively. Hereinafter, when simply referred to as “the area of the address N”, the addresses N to
It is assumed that it refers to the space of address N + 3.

【0005】この32ビットデータ(D0〜D31)に
は4ビットのパリティビット(P0〜P3)が付加され
ており、下位16ビット(D0〜D15)に対するパリ
ティビットはP0、P1の2ビット、上位16ビット
(D16〜D31)に対するパリティビットはP2、P
3の2ビットとなっている。すなわち、データの1バイ
トあたりに1ビットのパリティビットが割り当てられて
いる。このパリティビット(P0〜P3)はパリティR
AM22に格納される。このパリティRAM22に対す
る書込みはいわゆるパーシャルライト(部分書換え)で
行われる。
To the 32-bit data (D0 to D31), 4-bit parity bits (P0 to P3) are added, and the parity bits for the lower 16 bits (D0 to D15) are P0 and P1 2 bits, and the upper bit. Parity bits for 16 bits (D16 to D31) are P2, P
It is 2 bits of 3. That is, one parity bit is assigned to each byte of data. This parity bit (P0 to P3) is the parity R
It is stored in the AM 22. Writing to the parity RAM 22 is performed by so-called partial write (partial rewriting).

【0006】図7はこの部分書換えの概念を説明する図
である。ここでは、データ幅16ビットのCPU25か
ら、データ幅32ビットのデータRAM23に下位16
ビットアクセスに続いて上位16ビットをアクセスする
ことによりデータD0〜D31を書き込み、同時にその
データD0〜D31についてのパリティを演算してパリ
ティRAM22の上記アドレスN〜N+3に対応する領
域(具体的には32ビットバスはアドレスの下位2ビッ
トの代わりにBE0〜BE3で指定するので、アドレス
Nで指定される領域)に部分書換えで書き込む場合の動
作を説明する。
FIG. 7 is a diagram for explaining the concept of this partial rewriting. Here, from the CPU 25 having a data width of 16 bits to the lower 16 bits of the data RAM 23 having a data width of 32 bits.
The data D0 to D31 are written by accessing the upper 16 bits following the bit access, and at the same time, the parity for the data D0 to D31 is calculated and the area corresponding to the addresses N to N + 3 of the parity RAM 22 (specifically, Since the 32-bit bus is specified by BE0 to BE3 instead of the lower 2 bits of the address, the operation in the case of partial rewriting to the area specified by the address N) will be described.

【0007】データD0〜D31に対応するパリティ
RAM22の領域からパリティビットP0〜P3を読み
出す。
The parity bits P0 to P3 are read from the area of the parity RAM 22 corresponding to the data D0 to D31.

【0008】データD0〜D15をデータRAM23
のアドレスNに書き込むとともに、このデータD0〜D
15についてパリティビットを演算し、その演算したパ
リティビットP0、P1を、手順でパリティRAM2
2から読み出したパリティビットP0〜P3中のP0、
P1と置き換え、その置き換え後のパリティビットP0
〜P3をパリティRAM22に書き込む。
The data D0 to D15 are stored in the data RAM 23.
This data D0 to D
The parity bit is calculated for 15 and the calculated parity bits P0 and P1 are converted to the parity RAM2 in the procedure.
P0 in the parity bits P0 to P3 read from
P1 replaced with the parity bit P0 after the replacement
~ P3 is written to the parity RAM 22.

【0009】データD0〜D31に対応するパリティ
RAM22の領域からパリティビットP0〜P3を読み
出す。
The parity bits P0 to P3 are read from the area of the parity RAM 22 corresponding to the data D0 to D31.

【0010】データD16〜D31をデータRAM2
3のアドレスNに書き込むとともに、このデータD16
〜D31についてパリティビットを演算し、その演算し
たパリティビットP2、P3を、手順でパリティRA
M22から読み出したパリティビットP0〜P3中のP
2、P3と置き換え、その置き換え後のパリティビット
P0〜P3をパリティRAM22に書き込む。
The data D16 to D31 are stored in the data RAM 2
The data D16
The parity bits are calculated for D31 to D31, and the calculated parity bits P2 and P3 are used as the parity RA in the procedure.
P in the parity bits P0 to P3 read from M22
2 and P3, and the replaced parity bits P0 to P3 are written in the parity RAM 22.

【0011】図8はこの部分書換えを行うための一層具
体的な従来回路を示す図、図9はその動作タイムチャー
トである。図8において、1はデータを記憶するための
データ部メモリ、2はパリティビットを記憶するための
パリティ部メモリ、3はパリティ部メモリ2に対しての
書込み/読出し等の制御や後述のラッチ5やセレクタ6
a、6bの制御を行うパリティ制御回路、4はデータの
パリティを生成するパリティ発生器、5はパリティ部メ
モリ2から読み出したパリティビットを一時的に保持す
るラッチ、6a、6bはセレクタである。
FIG. 8 is a diagram showing a more specific conventional circuit for performing this partial rewriting, and FIG. 9 is an operation time chart thereof. In FIG. 8, 1 is a data section memory for storing data, 2 is a parity section memory for storing parity bits, 3 is control such as writing / reading with respect to the parity section memory 2, and a latch 5 described later. And selector 6
A parity control circuit that controls a and 6b, a parity generator that generates data parity, a latch 5 that temporarily holds the parity bit read from the parity unit memory 2, and selectors 6a and 6b.

【0012】この従来回路において、データ部メモリ1
のアドレスNにデータD0〜D31を書き込む場合の動
作を図9を参照しつつ以下に説明する。
In this conventional circuit, the data section memory 1
The operation in the case of writing the data D0 to D31 to the address N of will be described below with reference to FIG.

【0013】(1)まず、データ部メモリ1のアドレス
Nの領域の下位16ビットにデータD0〜D15を書き
込む。この場合、パリティ制御回路3からのリード信号
PRDによってパリティ部メモリ2からデータD0〜D
31に対応するパリティビットP0〜P3が読み出され
てラッチ5に格納される。一方、パリティ発生器4によ
りデータD0〜D15に対するパリティビットP0、P
1が生成される。パリティ制御回路3からのセレクト信
号によって、セレクタ6aはパリティ発生器4からのパ
リティビットP0、P1を選択し、セレクタ6bはラッ
チ5からのパリティビットP2、P3を選択する。これ
らセレクタ6a、6bからのパリティビットP0〜P3
は、パリティ制御回路3からのライト信号PWRによっ
てパリティ部メモリ2の元の領域に再び書き込まれる。
(1) First, the data D0 to D15 are written in the lower 16 bits of the area of the address N of the data memory 1. In this case, the read signal PRD from the parity control circuit 3 causes the data D0 to D from the parity unit memory 2 to be read.
The parity bits P0 to P3 corresponding to 31 are read out and stored in the latch 5. On the other hand, the parity generator 4 generates parity bits P0, P for the data D0-D15.
1 is generated. In response to the select signal from the parity control circuit 3, the selector 6a selects the parity bits P0 and P1 from the parity generator 4, and the selector 6b selects the parity bits P2 and P3 from the latch 5. Parity bits P0 to P3 from the selectors 6a and 6b
Is rewritten in the original area of the parity memory 2 by the write signal PWR from the parity control circuit 3.

【0014】(2)次に、アドレスNの領域の上位16
ビットにデータD16〜D31を書き込む。この場合、
パリティ制御回路3からのリード信号PRDによってパ
リティ部メモリ2からデータD0〜D31に対応するパ
リティビットP0〜P3が読み出されてラッチ5に格納
される。一方、パリティ発生器4によりデータD16〜
D31に対するパリティビットP2、P3が生成され
る。パリティ制御回路3からのセレクト信号によって、
セレクタ6aはラッチ5からのパリティビットP0、P
1を選択し、セレクタ6bはパリティ発生器4からのパ
リティビットP2、P3を選択する。これらセレクタ6
a、6bからのパリティビットP0〜P3は、パリティ
制御回路3からのライト信号PWRによってパリティ部
メモリ2の元の領域に再び書き込まれる。
(2) Next, the upper 16 of the area of address N
The data D16 to D31 are written in the bits. in this case,
Parity bits P0 to P3 corresponding to the data D0 to D31 are read from the parity section memory 2 by the read signal PRD from the parity control circuit 3 and stored in the latch 5. On the other hand, data D16 ...
Parity bits P2 and P3 for D31 are generated. By the select signal from the parity control circuit 3,
The selector 6a uses the parity bits P0, P from the latch 5
1, the selector 6b selects the parity bits P2 and P3 from the parity generator 4. These selectors 6
The parity bits P0 to P3 from a and 6b are rewritten in the original area of the parity memory 2 by the write signal PWR from the parity control circuit 3.

【0015】[0015]

【発明が解決しようとする課題】上記のように、記憶デ
ータとして複数ビットを持つメモリの場合、メモリ中に
記憶されているデータをビット単位で書き換えることは
できず、データの一部分を書き換える場合にも、全ビッ
ト一括の書換えを行うしかない。そのため、メモリに記
憶したデータの一部分を書き換えるには、 メモリ中の書き換えるアドレスに該当するデータの全
ビットをいったんメモリから読み出してから、そのデー
タ中の一部分をメモリの外部(例えばラッチ上)におい
て書き換え、 書き換えたデータの全ビットを一括して再びメモリに
書き込む、 という2つの手順が必要であり、そのため動作速度が遅
くなるという問題点がある。
As described above, in the case of a memory having a plurality of bits as stored data, the data stored in the memory cannot be rewritten on a bit-by-bit basis. However, there is no choice but to rewrite all bits at once. Therefore, to rewrite part of the data stored in the memory, first read all the bits of the data corresponding to the address to be rewritten in the memory from the memory, and then rewrite part of the data outside the memory (for example, on the latch). However, there is a problem that the operation speed becomes slower because of the two procedures of writing all the bits of the rewritten data in the memory again collectively.

【0016】従来、この問題を解決する手法として、例
えば前述のパリティビットの書換えなどの場合には、読
み出したパリティビットと新たに計算したパリティビッ
トが偶然一致したときに書込み手順を省略する方法が例
えば特開平2−171945号等で公知である。しか
し、この方法では、データのビット幅が大きくなると、
パリティビットが偶然一致する確率が極端に低下するた
め、近年のメモリ素子の多ビット化にともない、有効な
解決策とならなくなっている。
Conventionally, as a method for solving this problem, for example, in the case of rewriting the above-mentioned parity bit, a method of omitting the writing procedure when the read parity bit and the newly calculated parity bit happen to coincide with each other is omitted. For example, it is known from JP-A-2-171945. However, with this method, when the bit width of the data increases,
Since the probability that the parity bits coincide with each other is extremely reduced, it is no longer an effective solution with the increase in the number of bits of memory elements in recent years.

【0017】本発明はかかる問題点に鑑みてなされたも
のであり、その目的とするところは、データの部分書換
えを高速に行えるようにすることにある。
The present invention has been made in view of such problems, and an object thereof is to enable partial rewriting of data at high speed.

【0018】[0018]

【課題を解決するための手段】図1は本発明に係る原理
説明図である。上述の課題を解決するために、本発明に
おいては、一つのデータ単位あたり一つの付加データを
持ち、データ単位はデータ部メモリの連続するアドレス
に分割して格納され、付加データは付加部メモリに格納
されるメモリシステムにおいてデータ部メモリのデータ
単位へのアクセスに伴って付加部メモリの付加データを
更新する方法であって、データ部メモリのデータ単位に
対する最初のアドレス・アクセスにより付加部メモリか
らデータ単位に対応する付加データを読み出して保持
し、データ単位に対する以降の連続したアドレス・アク
セスにおいて付加部メモリ外部で付加データの内容を更
新し、データ単位に対する最終アドレス・アクセス時
に、更新した付加データを付加部メモリの元のアドレス
に書き込むようにしたメモリ制御方法が提供される。
FIG. 1 is a diagram illustrating the principle of the present invention. In order to solve the above-mentioned problems, the present invention has one additional data per one data unit, and the data unit is divided and stored in consecutive addresses of the data unit memory, and the additional data is stored in the additional unit memory. A method for updating additional data in an additional unit memory according to an access to a data unit of a data unit memory in a stored memory system, wherein data is added from the additional unit memory by first address access to the data unit of the data unit memory. The additional data corresponding to the unit is read and held, the content of the additional data is updated outside the additional unit memory in subsequent successive address accesses to the data unit, and the updated additional data is updated at the final address access to the data unit. Memory control method for writing to the original address of the additional memory It is provided.

【0019】上述のメモリ制御方法において、データ単
位に対するアドレス・アクセスが途中で不連続あるいは
途絶したときに、付加部メモリ外部に保持していた付加
データを付加部メモリの元のアドレスに書き込むように
してもよい。
In the above memory control method, when address access to a data unit is discontinuous or interrupted midway, the additional data held outside the additional unit memory is written to the original address of the additional unit memory. May be.

【0020】また本発明においては、他の形態として、
データ単位を連続する複数アクセスに分割して記憶する
データ部メモリと、データ単位に対応した付加データを
記憶する付加部メモリと、データ単位を分割した分割デ
ータに対して部分付加データを生成する付加データ生成
手段と、データ単位に対する最初のアドレス・アクセス
時に付加部メモリからデータ単位に対応した付加データ
を読み出す読出し手段と、読出し手段で読み出した付加
データを一時的に保持するラッチと、ラッチに記憶され
る付加データを付加データ生成手段からの部分付加デー
タで更新する更新手段と、データ単位に対する最後のア
ドレス・アクセス時にラッチの付加データを付加部メモ
リの元のアドレスに書き込む書込み手段とを備えたメモ
リ制御回路が提供される。
In the present invention, as another form,
A data unit memory that stores the data unit by dividing it into a plurality of consecutive accesses, an additional unit memory that stores additional data corresponding to the data unit, and an additional unit that generates partial additional data for the divided data unit. Data generating means, reading means for reading additional data corresponding to the data unit from the additional unit memory at the time of first address access to the data unit, latch for temporarily holding the additional data read by the reading means, and storage in the latch Update means for updating the additional data to be generated with the partial additional data from the additional data generating means, and a writing means for writing the additional data of the latch to the original address of the additional portion memory at the time of the last address access to the data unit. A memory control circuit is provided.

【0021】上述のメモリ制御回路において、データ単
位に対する付加データを格納する付加部メモリのアドレ
スを記憶するアドレス記憶手段と、データ単位に対する
アドレス・アクセスのアドレスが連続的か否かを検出す
る第1の検出手段と、データ単位に対するアドレス・ア
クセスが途中で途絶したことを検出する第2の検出手段
とを更に備え、第1または第2の検出手段によりアドレ
ス・アクセスが不連続または途絶と判定された時に、ラ
ッチの付加データを付加部メモリのアクセス記憶手段の
記憶するアドレスに再書込みするようにしてもよい。
In the above-mentioned memory control circuit, an address storage means for storing an address of an additional memory for storing additional data for a data unit, and a first for detecting whether or not an address access address for a data unit is continuous. And second detecting means for detecting that the address access to the data unit is interrupted midway, and the first or second detecting means determines that the address access is discontinuous or interrupted. At this time, the additional data of the latch may be rewritten to the address stored in the access storage means of the additional memory.

【0022】[0022]

【作用】例えば図1に例示されるように、データ部メモ
リの連続するアドレスに対するシーケンシャルなアクセ
スである場合、付加部メモリには2回連続してアクセス
が行われる。前半のアクセス時に付加部メモリから付加
データを読み出してその内容を部分的に更新して保持
し、後半のアクセス時にさらに付加データの部分的更新
を行うとともにその更新した付加データを付加部メモリ
に纏めて書き込めば、付加部メモリへの部分書込みによ
るアクセス時間の短縮を図ることができる。
For example, as illustrated in FIG. 1, in the case of sequential access to consecutive addresses of the data section memory, the additional section memory is continuously accessed twice. During the first half access, the additional data is read from the additional memory and the contents are partially updated and held, and during the second access, the additional data is partially updated and the updated additional data is collected in the additional memory. If the data is written by writing, it is possible to shorten the access time by partial writing to the additional memory.

【0023】また、後半アクセスがアドレスが連続しな
い場合、あるいは前半アクセス後にアクセスが途絶した
場合には、外部に保持してある付加データを付加部メモ
リの元のアドレスに戻して速やかに部分書込みを完了す
る。
If the addresses in the latter half access are not continuous, or if the access is interrupted after the first half access, the externally held additional data is returned to the original address of the additional portion memory and the partial writing is promptly performed. Complete.

【0024】[0024]

【実施例】以下、本発明の実施例を図面を参照して説明
する。図2には本発明の一実施例としてのメモリ制御回
路が示される。この実施例は説明を簡単にするためにパ
リティビットが4ビットの場合で説明するが、パリティ
ビットが増えても同様の方法で実現できる。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 2 shows a memory control circuit as an embodiment of the present invention. Although this embodiment will be described in the case where the number of parity bits is 4 for simplification of description, it can be realized by a similar method even if the number of parity bits is increased.

【0025】図2において、1は1アドレス当たり32
ビットのデータを記憶するデータ部メモリ、2は4ビッ
トのパリティビットP0〜P3を記憶するパリティ部メ
モリ、3はパリティ部メモリ2の書込み/読出し制御や
セレクタ6a、6b、9はラッチ5、7等の制御を行う
パリティ制御回路、4はデータ(16ビット)からパリ
ティビット(2ビット)を生成するパリティ発生器、5
はパリティ部メモリ2から読み出したパリティビットと
パリティ発生器4で生成したパリティビットを一時的に
記憶するラッチ、6a、6bはパリティビットを部分的
に更新するセレクタである。
In FIG. 2, 1 is 32 per address.
A data unit memory that stores bit data, 2 a parity unit memory that stores 4-bit parity bits P0 to P3, 3 write / read control of the parity memory 2, and selectors 6a, 6b and 9 latches 5 and 7. A parity control circuit for controlling the parity and the like, 4 a parity generator for generating a parity bit (2 bits) from data (16 bits), 5
Is a latch for temporarily storing the parity bit read from the parity memory 2 and the parity bit generated by the parity generator 4, and 6a and 6b are selectors for partially updating the parity bit.

【0026】また、7はアドレスを一時的に保持するた
めのラッチ、8は共通バスからの現在のアドレスとラッ
チ7に保持している前回のアドレスとが一致しているか
否かを検出するための排他的論理和回路であって、両方
のアドレス中のバイトイネーブルを除く全ビットが一致
するか否かを検出し、一致信号をパリティ制御回路3に
出力する。9はパリティ部メモリ2に入力するアドレス
を共通バスからの現在のアドレスかラッチ7からの前回
のアドレスかに切り換えるセレクタである。また、ホス
トと共通バスは、共に32ビット幅であるが、通信カー
ド内のCPUおよびプロトコルプロセッサは16ビット
幅であるため、図10のバス幅変換回路を通して接続さ
れている。
Reference numeral 7 is a latch for temporarily holding an address, and 8 is for detecting whether or not the current address from the common bus and the previous address held in the latch 7 match. Of the exclusive OR circuit for detecting whether or not all bits in both addresses except byte enable match, and outputs a match signal to the parity control circuit 3. Reference numeral 9 is a selector for switching the address input to the parity unit memory 2 between the current address from the common bus and the previous address from the latch 7. Further, both the host and the common bus have a 32-bit width, but the CPU and the protocol processor in the communication card have a 16-bit width, and are therefore connected through the bus width conversion circuit of FIG.

【0027】上記セレクタ9へのアドレス入力(したが
ってパリティ部メモリ2へのアドレス入力)は、バイト
イネーブルを含んでいないので、CPUからデータ部メ
モリ1への連続する二つのアドレスN(16ビットバス
ではアドレスN+1はNと同時アクセスされる)、N+
2(同様にN+3も同時アクセス)に対してパリティ部
メモリ2に入力されるアドレスは共通の一つのアドレス
になる。パリティ部メモリ2には、データD0〜D31
に対するパリティビットP0〜P3が記憶される。すな
わち、データの1バイトあたりに1ビットのパリティビ
ットが割り当てられている。パリティ発生記4はデータ
D0〜D31の上位16ビット(D0〜D15)に対し
てパリティビットP0、P1を生成し、下位16ビット
(D16〜D31)に対してパリティビットP2、P3
を生成する。
Since the address input to the selector 9 (thus, the address input to the parity unit memory 2) does not include byte enable, two consecutive addresses N from the CPU to the data unit memory 1 (in the 16-bit bus, Address N + 1 is simultaneously accessed with N), N +
For 2 (similar access to N + 3 as well), the address input to the parity memory 2 becomes one common address. Data D0 to D31 are stored in the parity unit memory 2.
Parity bits P0 to P3 for the are stored. That is, one parity bit is assigned to each byte of data. The parity generation record 4 generates parity bits P0 and P1 for the upper 16 bits (D0 to D15) of the data D0 to D31 and parity bits P2 and P3 for the lower 16 bits (D16 to D31).
Generate

【0028】この実施例回路の動作を図3〜図5のタイ
ムチャートを参照して以下に説明する。ここで、図3は
CPUからデータ部メモリ1へアクセスするアドレスが
連続している連続アクセスの場合のタイムチャート、図
4はCPUからデータ部メモリ1へアクセスするアドレ
スが不連続である場合のタイムチャート、図5はCPU
からデータ部メモリ1へのアクセスが途絶した場合のタ
イムチャートである。
The operation of the circuit of this embodiment will be described below with reference to the time charts of FIGS. Here, FIG. 3 is a time chart in the case of continuous access in which the addresses for accessing the data section memory 1 from the CPU are continuous, and FIG. 4 is a time chart in the case where the addresses for accessing the data section memory 1 from the CPU are discontinuous. Chart, CPU in Figure 5
6 is a time chart in the case where the access to the data unit memory 1 is interrupted.

【0029】初めに、図3を参照してCPUからの連続
アクセスの場合の動作を説明する。 (1)まず、データ部メモリ1のアドレスNからN+1
にかけてデータD0〜D15を書き込む。このアドレス
Nはラッチ7に一時的に保持される。この場合、セレク
タ9はパリティ制御回路3の指示により共通バスからの
現在のアドレスNを選択している。パリティ制御回路3
からのリード信号PRDによってパリティ部メモリ2か
らデータD0〜D31に対応するパリティビットP0〜
P3が読み出される。一方、パリティ発生器4によりデ
ータD0〜D15に対するパリティビットP0、P1が
生成される。パリティ発生器4のパリティビットの生成
が終了すると、パリティ制御回路3からのセレクト信号
によって、セレクタ6aはパリティ発生器4からのパリ
ティビットP0、P1を選択し、セレクタ6bはパリテ
ィ部メモリ2からのパリティビットP2、P3を選択す
る。したがって、ラッチ5に入力されるパリティビット
P0〜P3は、そのパリティビットP0〜P3中のパリ
ティビットP0、P1がパリティ発生器4で生成された
もの、パリティビットP2、P3がパリティ部メモリ2
に記憶されていたものとなり、これがラッチ5に入力さ
れて保持される。
First, the operation in the case of continuous access from the CPU will be described with reference to FIG. (1) First, the addresses N to N + 1 of the data section memory 1
The data D0 to D15 are written over. This address N is temporarily held in the latch 7. In this case, the selector 9 selects the current address N from the common bus according to the instruction from the parity control circuit 3. Parity control circuit 3
Parity bits P0 to P0 corresponding to the data D0 to D31 from the parity memory 2 by the read signal PRD from
P3 is read. On the other hand, the parity generator 4 generates parity bits P0 and P1 for the data D0 to D15. When the parity bit generation of the parity generator 4 is completed, the selector 6a selects the parity bits P0 and P1 from the parity generator 4 by the select signal from the parity control circuit 3, and the selector 6b outputs the parity bit from the parity unit memory 2. The parity bits P2 and P3 are selected. Therefore, in the parity bits P0 to P3 input to the latch 5, the parity bits P0 and P1 in the parity bits P0 to P3 are generated by the parity generator 4, and the parity bits P2 and P3 are the parity unit memory 2.
Stored in the latch 5, and this is input to and held in the latch 5.

【0030】(2)次に、アドレスN+2からN+3に
かけてデータD16〜D31を書き込む。この場合、ラ
ッチ7に保持されている前回のアドレスNと共通バスか
らの現在のアドレスN+2は、アドレス下位2ビットが
バイトイネーブルBE0〜BE3で表されているので一
致し、排他的論理和回路8の一致信号に基づいてパリテ
ィ制御回路3はCPUから連続したアドレスがアクセス
されたと判定する。一方、パリティ発生器4によりデー
タD16〜D31に対するパリティビットP2、P3を
発生し、セレクタ6bはパリティ発生器4からのパリテ
ィビットP2、P3を選択する。したがって、ラッチ5
に入力されるパリティビットP0〜P3は、そのパリテ
ィビットP0〜P3中のパリティビットP0、P1がパ
リティ発生器4で前回生成されたもの、パリティビット
P2、P3がパリティ発生記4で今回発生されたものと
なり、これがラッチ5に保持される。このラッチ5のパ
リティビットP0〜P3は、パリティ制御回路3からの
ライト信号PWRによってパリティ部メモリ2の元の領
域に再び書き込まれる。
(2) Next, data D16 to D31 are written from addresses N + 2 to N + 3. In this case, the previous address N held in the latch 7 and the current address N + 2 from the common bus match because the lower 2 bits of the address are represented by the byte enables BE0 to BE3, and the exclusive OR circuit 8 The parity control circuit 3 determines that consecutive addresses have been accessed from the CPU based on the coincidence signal. On the other hand, the parity generator 4 generates parity bits P2 and P3 for the data D16 to D31, and the selector 6b selects the parity bits P2 and P3 from the parity generator 4. Therefore, latch 5
The parity bits P0 to P3 input to the parity bit P0 to P3 are the ones generated previously by the parity generator 4 in the parity bits P0 to P3, and the parity bits P2 and P3 are generated at the parity generation record 4 this time. And the latch 5 holds it. The parity bits P0 to P3 of the latch 5 are rewritten in the original area of the parity memory 2 by the write signal PWR from the parity control circuit 3.

【0031】このように実施例回路では、直前のメモリ
アクセスの時のアドレスをラッチ7に一時的に記憶して
おき、排他的論理和回路8によりラッチ7のアドレスと
現在のメモリアクセスのアドレスとを比較して、直前の
メモリアクセスのパリティビットを一時的に記憶するラ
ッチ5の内容が、現在のメモリアクセスでパリティ部メ
モリ2から読み出すべきパリティビットと一致すること
を判定し、ラッチ5に書き込む値をセレクタ6a、6b
でセレクトすることにより、後半のデータD16〜D3
1に対するパリティ部メモリ2からラッチ5へのパリテ
ィビットP0〜P3の読出し手順を省略して、部分書換
えを高速に行う。このように従来例における二つのメモ
リアクセスを一つに纏めることにより、図9に示した従
来例と比べて2倍の速度で書換えを行うことができる。
As described above, in the embodiment circuit, the address at the time of the immediately preceding memory access is temporarily stored in the latch 7, and the exclusive OR circuit 8 stores the address of the latch 7 and the address of the current memory access. Are compared with each other, it is determined that the content of the latch 5 temporarily storing the parity bit of the immediately preceding memory access matches the parity bit to be read from the parity unit memory 2 in the current memory access, and the data is written in the latch 5. Value is selector 6a, 6b
By selecting with, the latter half data D16 to D3
By omitting the procedure of reading the parity bits P0 to P3 from the parity unit memory 2 to the latch 5 for 1, the partial rewriting is performed at high speed. By thus combining the two memory accesses in the conventional example into one, rewriting can be performed at twice the speed as compared with the conventional example shown in FIG.

【0032】次に、CPUからのアクセス時にアドレス
が連続しない場合の動作を図4を参照して以下に説明す
る。前半処理(1)のメモリアクセスのアドレスがNで
あるのに対し、後半処理(2)のメモリアクセスのアド
レスがN+αであった場合、排他的論理和回路8での比
較の結果、アドレスが一致しないと判定される。この場
合、パリティ制御回路3の指示により、セレクタ9はラ
ッチ7に記憶している前回のアドレスNを選択してパリ
ティ部メモリ2に供給する。パリティ制御回路3により
ライトサイクルを生成し、パリティ部メモリ2のこのア
ドレスNにラッチ5の内容を書き込み、部分書換えを完
結させる。その後、ラッチ7は今回のアドレスN+αを
保持し、以降のアクセスを処理する。
Next, the operation when addresses are not consecutive when accessed from the CPU will be described below with reference to FIG. When the memory access address in the first half process (1) is N, while the memory access address in the second half process (2) is N + α, the addresses match as a result of comparison in the exclusive OR circuit 8. It is determined not to. In this case, according to an instruction from the parity control circuit 3, the selector 9 selects the previous address N stored in the latch 7 and supplies it to the parity unit memory 2. A write cycle is generated by the parity control circuit 3, the content of the latch 5 is written to this address N of the parity memory 2, and the partial rewriting is completed. After that, the latch 7 holds the current address N + α and processes subsequent accesses.

【0033】次に、一定時間たってもバスマスタからの
アクセスが無い場合の動作を図5を参照して以下に説明
する。アドレスNに対するアクセスがあった後、一定時
間たってもバスマスタから次のアクセスが無い場合、部
分書換えを完結させるために、パリティ制御回路3に内
蔵されているタイマのタイムアウトにより一定時間の経
過を検出する。すると、パリティ制御回路3の指示によ
り、セレクタ9はラッチ7に記憶している前回のアドレ
スNを選択してパリティ部メモリ2に供給する。パリテ
ィ制御回路3によりライトサイクルを生成し、ラッチ5
のパリティビットをパリティ部メモリ2のアドレスNに
書き込んで、部分書換えを完結させる。
Next, the operation when there is no access from the bus master even after a fixed time has passed will be described below with reference to FIG. When there is no next access from the bus master even after a certain time elapses after the access to the address N, the elapse of the certain time is detected by the timeout of the timer built in the parity control circuit 3 in order to complete the partial rewriting. . Then, according to an instruction from the parity control circuit 3, the selector 9 selects the previous address N stored in the latch 7 and supplies it to the parity unit memory 2. The write cycle is generated by the parity control circuit 3, and the latch 5
The parity bit of is written in the address N of the parity memory 2 to complete the partial rewriting.

【0034】なお、図4、図5の動作の場合、バスサイ
クルが延びるため、共通バスからのアクセスはパリティ
制御回路3から出力されるレディ信号READYでウェ
イトをかけるようになっている。
In the case of the operations shown in FIGS. 4 and 5, since the bus cycle is extended, the access from the common bus is waited by the ready signal READY output from the parity control circuit 3.

【0035】本発明の実施にあたっては種々の変形形態
が可能である。例えば、上述の実施例では、16ビット
のバスマスタから、16ビットずつデータ部メモリ1に
格納するようにし、データ部メモリ1への2回のアクセ
スに伴ってパリティビットへも2回のアクセスが行われ
る場合を示したが、もちろん本発明はこれに限られるも
のではなく、例えば共通バスが64ビットの時、16ビ
ットのバスマスタから、16ビットずつデータ部メモリ
1に格納するようにし、データ部メモリ1への4回のア
クセスに伴ってパリティビットへも4回のアクセスが行
われるようにしたものであってもよい。この場合、最初
のアドレス・アクセスによりパリティ部メモリ2からパ
リティ・ビットを読み出してラッチに保持し、2回目、
3回目のアドレス・アクセス時にはパリティ・ビットの
内容をラッチ上で更新し、最後(4回目)のアドレス・
アクセス時にラッチの内容(更新したパリティ・ビッ
ト)をパリティ部メモリ2に戻すようにする。
Various modifications are possible in implementing the present invention. For example, in the above-described embodiment, the 16-bit bus master stores the 16-bit data in the data unit memory 1, and the parity bit is also accessed twice as the data unit memory 1 is accessed twice. However, of course, the present invention is not limited to this. For example, when the common bus is 64 bits, 16 bits are stored in the data section memory 1 from the 16-bit bus master. The parity bit may be accessed four times in association with the four accesses to 1. In this case, the parity bit is read from the parity unit memory 2 by the first address access and held in the latch, and the second time,
At the time of the third address access, the contents of the parity bit are updated on the latch and the last (fourth) address
At the time of access, the contents of the latch (updated parity bit) are returned to the parity unit memory 2.

【0036】[0036]

【発明の効果】以上に説明したように、本発明によれ
ば、直前のメモリアクセスのアドレスと部分書換えを行
うデータを保持し、部分書換えに伴う読出し手順を省略
できるため、高速に部分書換えを行うことができる。
As described above, according to the present invention, the address of the immediately preceding memory access and the data for partial rewriting can be held, and the read procedure accompanying partial rewriting can be omitted, so that partial rewriting can be performed at high speed. It can be carried out.

【0037】特に、DMA転送のような、順次連続する
アドレスのアクセスには、通常の全ワード書込みと同等
の速さで書換えを行うことができる。この発明は、デー
タ部メモリのバス幅と異なるバスマスタからのアクセス
のように、部分書換えが頻繁に行われるシステムで著し
い効果が現れるものである。
In particular, in the case of sequentially accessing addresses such as DMA transfer, rewriting can be performed at the same speed as a normal all-word writing. The present invention has a remarkable effect in a system in which partial rewriting is frequently performed, such as an access from a bus master having a bus width different from that of the data memory.

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

【図1】本発明に係る原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】本発明の一実施例としてのメモリ制御回路を示
すブロック図である。
FIG. 2 is a block diagram showing a memory control circuit as one embodiment of the present invention.

【図3】実施例回路におけるデータ部メモリ1へアクセ
スするアドレスが連続している連続アクセスの場合のタ
イムチャートである。
FIG. 3 is a time chart in the case of continuous access in which addresses for accessing the data section memory 1 in the example circuit are continuous.

【図4】実施例回路におけるデータ部メモリ1へアクセ
スするアドレスが不連続である場合のタイムチャートで
ある。
FIG. 4 is a time chart when the addresses for accessing the data memory 1 in the embodiment circuit are discontinuous.

【図5】実施例回路におけるデータ部メモリ1へのアク
セスが途絶した場合のタイムチャートである。
FIG. 5 is a time chart when the access to the data unit memory 1 in the circuit of the embodiment is interrupted.

【図6】通信カードの構成例を示す図である。FIG. 6 is a diagram showing a configuration example of a communication card.

【図7】部分書換えの概念を説明するための図である。FIG. 7 is a diagram for explaining the concept of partial rewriting.

【図8】部分書換えを行う従来のメモリ制御回路を示す
ブロック図である
FIG. 8 is a block diagram showing a conventional memory control circuit that performs partial rewriting.

【図9】従来例回路のタイムチャートである。FIG. 9 is a time chart of a conventional circuit.

【図10】バス幅変換回路を示すブロック図である。FIG. 10 is a block diagram showing a bus width conversion circuit.

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

1 データ部メモリ 2 パリティ部メモリ 3 パリティ制御回路 4 パリティ発生器 5 パリティビット保持用のラッチ 6a、6b パリティビット選択用のセレクタ 7 アドレス保持用のラッチ 8 排他的論理和回路 9 アドレス選択用のセレクタ 20 通信カード 21 バスコントローラ 22 パリティRAM(ランダム・アスセス・メモリ) 23 データRAM(ランダム・アスセス・メモリ) 24 プロトコルコントローラ 25CPU(中央処理装置) 26、27 ゲート 30 ホスト・コンピュータ 1 data section memory 2 parity section memory 3 parity control circuit 4 parity generator 5 parity bit holding latch 6a, 6b parity bit selecting selector 7 address holding latch 8 exclusive OR circuit 9 address selecting selector 20 Communication Card 21 Bus Controller 22 Parity RAM (Random Access Memory) 23 Data RAM (Random Access Memory) 24 Protocol Controller 25 CPU (Central Processing Unit) 26, 27 Gate 30 Host Computer

───────────────────────────────────────────────────── フロントページの続き (72)発明者 結城 恵子 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 田平 文明 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Keiko Yuki, 1015 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa, within Fujitsu Limited

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】一つのデータ単位あたり一つの付加データ
を持ち、該データ単位はデータ部メモリの連続するアド
レスに分割して格納され、該付加データは付加部メモリ
に格納されるメモリシステムにおいて該データ部メモリ
のデータ単位へのアクセスに伴って該付加部メモリの付
加データを更新する方法であって、 該データ部メモリのデータ単位に対する最初のアドレス
・アクセスにより該付加部メモリから該データ単位に対
応する付加データを読み出して保持し、 該データ単位に対する以降の連続したアドレス・アクセ
スにおいて該付加部メモリ外部で付加データの内容を更
新し、 該データ単位に対する最終アドレス・アクセス時に、更
新した付加データを付加部メモリの元のアドレスに書き
込むようにしたメモリ制御方法。
1. A memory system having one additional data per one data unit, the data unit being divided and stored in consecutive addresses of a data unit memory, and the additional data being stored in the additional unit memory. A method of updating additional data of the additional unit memory in accordance with an access to a data unit of the data unit memory, wherein the additional unit memory is changed from the additional unit memory to the data unit by first address access to the data unit of the data unit memory. The corresponding additional data is read and held, the contents of the additional data are updated outside the additional unit memory in subsequent successive address accesses to the data unit, and the updated additional data is accessed at the final address access to the data unit. A memory control method in which is written to the original address of the additional memory.
【請求項2】該データ単位に対するアドレス・アクセス
が途中で不連続あるいは途絶したときに、該付加部メモ
リ外部に保持していた付加データを該付加部メモリの元
のアドレスに書き込むようにした請求項1記載のメモリ
制御方法。
2. When the address access to the data unit is discontinuous or interrupted on the way, the additional data held outside the additional unit memory is written to the original address of the additional unit memory. Item 2. The memory control method according to Item 1.
【請求項3】データ単位を連続する複数アクセスに分割
して記憶するデータ部メモリと、 該データ単位に対応した付加データを記憶する付加部メ
モリと、 該データ単位を分割した分割データに対して部分付加デ
ータを生成する付加データ生成手段と、 該データ単位に対する最初のアドレス・アクセス時に該
付加部メモリから該データ単位に対応した付加データを
読み出す読出し手段と、 該読出し手段で読み出した付加データを一時的に保持す
るラッチと、 該ラッチに記憶される該付加データを該付加データ生成
手段からの部分付加データで更新する更新手段と、 該データ単位に対する最後のアドレス・アクセス時に該
ラッチの付加データを該付加部メモリの元のアドレスに
書き込む書込み手段とを備えたメモリ制御回路。
3. A data unit memory for storing a data unit divided into a plurality of continuous accesses, an additional unit memory for storing additional data corresponding to the data unit, and divided data obtained by dividing the data unit. Additional data generating means for generating partial additional data, reading means for reading additional data corresponding to the data unit from the additional memory at the first address access to the data unit, and additional data read by the reading means. A latch that is temporarily held, an updating unit that updates the additional data stored in the latch with the partial additional data from the additional data generation unit, and additional data of the latch at the last address access to the data unit. And a writing means for writing to the original address of the additional unit memory.
【請求項4】該データ単位に対する付加データを格納す
る該付加部メモリのアドレスを記憶するアドレス記憶手
段と、 該データ単位に対するアドレス・アクセスのアドレスが
連続的か否かを検出する第1の検出手段と、 該データ単位に対するアドレス・アクセスが途中で途絶
したことを検出する第2の検出手段とを更に備え、 該第1または第2の検出手段によりアドレス・アクセス
が不連続または途絶と判定された時に、該ラッチの付加
データを該付加部メモリの該アクセス記憶手段の記憶す
るアドレスに再書込みするようにした請求項3記載のメ
モリ制御回路。
4. An address storage means for storing an address of said additional unit memory for storing additional data for said data unit, and a first detection for detecting whether or not addresses of address access for said data unit are continuous. Means and second detecting means for detecting that the address access to the data unit is interrupted on the way, and the first or second detecting means determines that the address access is discontinuous or interrupted. 4. The memory control circuit according to claim 3, wherein the additional data of the latch is rewritten to the address stored in the access storage means of the additional unit memory when the latching is performed.
JP4267795A 1995-03-02 1995-03-02 Method and circuit for memory control Withdrawn JPH08241242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4267795A JPH08241242A (en) 1995-03-02 1995-03-02 Method and circuit for memory control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4267795A JPH08241242A (en) 1995-03-02 1995-03-02 Method and circuit for memory control

Publications (1)

Publication Number Publication Date
JPH08241242A true JPH08241242A (en) 1996-09-17

Family

ID=12642669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4267795A Withdrawn JPH08241242A (en) 1995-03-02 1995-03-02 Method and circuit for memory control

Country Status (1)

Country Link
JP (1) JPH08241242A (en)

Similar Documents

Publication Publication Date Title
EP0192202A2 (en) Memory system including simplified high-speed data cache
JP2002373115A (en) Replacement control method for shared cache memory and device therefor
JP2681398B2 (en) Storage device
JPH0529945B2 (en)
JPH08241242A (en) Method and circuit for memory control
JP3190847B2 (en) Data transfer control device
JPH11184761A (en) Read modify write control system
JPH0520195A (en) Cache memory controller
JP3351337B2 (en) DMA method and apparatus
JPH04104345A (en) Write control system for partial rewrite data of main storage device with ecc mechanism
JP2805786B2 (en) Information processing device
JP2818562B2 (en) Address translation circuit
JPH07152650A (en) Cache control unit
JP2847729B2 (en) Information processing device
JPS61214039A (en) Cache memory
JP3074897B2 (en) Memory circuit
JPH03141444A (en) Data processor
JP2845746B2 (en) Micro program controller
JPH02122344A (en) Buffer memory
JPS623360A (en) Information processor
JPH03257643A (en) Information processor
JPH06243045A (en) Cache memory
JPS6047613B2 (en) Microprogram control method
JPH03127126A (en) Information processor
JPH04102946A (en) Storage device control system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020507