JPH11249958A - Memory control system - Google Patents

Memory control system

Info

Publication number
JPH11249958A
JPH11249958A JP5042998A JP5042998A JPH11249958A JP H11249958 A JPH11249958 A JP H11249958A JP 5042998 A JP5042998 A JP 5042998A JP 5042998 A JP5042998 A JP 5042998A JP H11249958 A JPH11249958 A JP H11249958A
Authority
JP
Japan
Prior art keywords
data
register
cpu
written
memory
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
JP5042998A
Other languages
Japanese (ja)
Inventor
Eiji Ito
英治 伊藤
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.)
Denso Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP5042998A priority Critical patent/JPH11249958A/en
Publication of JPH11249958A publication Critical patent/JPH11249958A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a memory control system which improves the processing efficiency of a CPU by reducing the number of times of access of the CPU in writing a data string larger than the bus width of the CPU in a memory. SOLUTION: A memory 22 used in a CPU 21 whose bus width is n bits includes plural n-bit registers 27, plural m-bit (m>n) registers 29 corresponding to these registers 27, respectively, a shared register 24 where a data part common to plural data strings is written, and a control circuit 23 which writes data transferred from the CPU 21 in registers 27 in response to a data write command to registers 27 from the CPU 21 and writes data in registers 29 corresponding to registers 27 together with the data part written in the shared data register 24.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、CPUのバス幅よ
りも大きいデータ列を取り扱う場合に有利なメモリ制御
システムに関し、より詳細には、例えば18ビットのR
GB画像データ列をバス幅が16ビットであるCPUが
取り扱う場合等に利用すれば便利なメモリ制御システム
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control system which is advantageous when a data string larger than the bus width of a CPU is handled.
The present invention relates to a memory control system which is convenient if it is used when a GB image data string is handled by a CPU having a bus width of 16 bits.

【0002】[0002]

【従来の技術】図7は、従来のメモリ制御システムの要
部を概略的に示したブロック図である。図中2はメモリ
を示しており、メモリ2は、複数のnビットのレジスタ
5で構成されたデータの記憶領域、すなわちレジスタ群
4と、レジスタ群4へのデータの書き込み、及びレジス
タ群4からのデータの読み出しを制御する制御回路3と
を含んで構成され、制御回路3は制御バス10を介して
レジスタ群4に接続されている。
2. Description of the Related Art FIG. 7 is a block diagram schematically showing a main part of a conventional memory control system. In the figure, reference numeral 2 denotes a memory. The memory 2 is a data storage area composed of a plurality of n-bit registers 5, that is, a register group 4, data writing to the register group 4, and data from the register group 4. And a control circuit 3 for controlling the reading of the data. The control circuit 3 is connected to a register group 4 via a control bus 10.

【0003】またバス幅がnビットであるCPU1は、
レジスタ5の番地(以下、アドレスとも記す)を指定す
るためのアドレスバス6と、WR(write )信号を送る
ための制御バス7と、RD(read)信号を送るための制
御バス8とを介して制御回路3に接続され、CPU1と
レジスタ群4とはデータバス9を介して接続されてい
る。
The CPU 1 having a bus width of n bits is:
An address bus 6 for designating an address (hereinafter also referred to as an address) of the register 5, a control bus 7 for transmitting a WR (write) signal, and a control bus 8 for transmitting an RD (read) signal. The CPU 1 and the register group 4 are connected via a data bus 9 to the control circuit 3.

【0004】次に、CPU1がメモリ2にデータを書き
込む場合について説明する。まず、CPU1から、どこ
の番地のレジスタ5にデータを書き込むかを指定する番
地がアドレスバス6に出力される共に、書き込むデータ
がデータバス9に出力される。そして、CPU1がWR
信号を出力することによって、目的のメモリ番地へデー
タが書き込むことができるようになる。
Next, a case where the CPU 1 writes data in the memory 2 will be described. First, the CPU 1 outputs to the address bus 6 an address designating which address of the register 5 to write data to, and also outputs data to be written to the data bus 9. Then, the CPU 1 sets the WR
By outputting the signal, data can be written to a target memory address.

【0005】続いて、CPU1がデータをメモリ2から
読み出す場合について説明する。まず、CPU1から、
どこの番地のレジスタ5からデータを読み出すかを指定
する番地がアドレスバス6に出力されると共に、RD信
号が出力され、目的のメモリ番地からデータを読み出す
ことができるようになる。また、メモリ2内において
は、制御回路3がCPU1からの信号に基づいて、書き
込み及び読み出しの制御を行なっている。
Next, the case where the CPU 1 reads data from the memory 2 will be described. First, from CPU1,
An address designating the address of the register 5 from which the data is to be read is output to the address bus 6 and the RD signal is output, so that the data can be read from the target memory address. In the memory 2, the control circuit 3 controls writing and reading based on a signal from the CPU 1.

【0006】[0006]

【発明が解決しようとする課題】上記従来のメモリ制御
システムを用いて、CPU1のバス幅よりも大きいデー
タ列をメモリ2に書き込む際のCPU1の処理について
説明する。但し、ここではCPU1のバス幅、及びレジ
スタ5のデータ幅が16ビットであり、CPU1のバス
幅よりも大きいデータ列として、18ビットのRGB画
像データ列をメモリ2に書き込む場合について説明す
る。前記RGB画像データ列は、R(赤)情報、G
(緑)情報、及びB(青)情報のそれぞれ6ビットずつ
から構成されている。
The processing of the CPU 1 when writing a data string larger than the bus width of the CPU 1 to the memory 2 using the above-mentioned conventional memory control system will be described. Here, a case will be described where the bus width of the CPU 1 and the data width of the register 5 are 16 bits, and an 18-bit RGB image data string is written in the memory 2 as a data string larger than the bus width of the CPU 1. The RGB image data string includes R (red) information, G
Each of the (green) information and the B (blue) information is composed of 6 bits.

【0007】図8は、5(=N)本の画像データ列11
a〜11eを示し、図9は、それら画像データ列11a
〜11eがレジスタ群4(レジスタ5)のアドレスA0
〜A9 に書き込まれた状態を示している。また図10
は、画像データ列11a〜11eをメモリ2に書き込む
際の処理1〜10であり、CPU1がアドレスバス6に
出力したアドレスと、データバス9に出力したデータと
を示している。
FIG. 8 shows 5 (= N) image data strings 11
a to 11e, and FIG. 9 shows these image data strings 11a.
11e are the addresses A 0 of the register group 4 (register 5)
Shows a state in which written in to A 9. FIG.
Are processes 1 to 10 when the image data strings 11a to 11e are written to the memory 2, and show the addresses output by the CPU 1 to the address bus 6 and the data output to the data bus 9.

【0008】図10から明らかなように、画像データ列
11a〜11eがCPU1のバス幅よりも大きいため、
CPU1はメモリ2に対して2回のアクセス(処理)を
必要とし、5(=N)本の画像データ列11a〜11e
全てをメモリ2に書き込むためには、画像データ列11
a〜11eの本数の2倍に相当する10(=N×2)回
のアクセスが必要となる。ここでは、説明を容易にする
ために画像データ列が5本の場合について説明している
が、実際にはその本数は非常に多く、アクセス回数がそ
の本数の2倍、3倍等となることによって、CPU1の
処理効率が著しく低下する。
As is apparent from FIG. 10, since the image data strings 11a to 11e are larger than the bus width of the CPU 1,
The CPU 1 needs to access (process) the memory 2 twice, and has 5 (= N) image data strings 11a to 11e.
To write everything in the memory 2, the image data sequence 11
10 (= N × 2) accesses corresponding to twice the number of a to 11e are required. Here, for the sake of simplicity, the case where the number of image data strings is five is described. However, in practice, the number of the image data strings is very large, and the number of accesses is twice or three times the number. As a result, the processing efficiency of the CPU 1 is significantly reduced.

【0009】また、図9から明らかなように、メモリ2
から18ビットのデータ列を読み出す際、最初に16ビ
ット分、次に2ビット分のデータというようにCPU1
は取り込まなければならず、CPU1内でデータの区切
りを意識しながらデータ操作を行なう必要があり、CP
U1の処理効率を低下させていた。後に詳しく説明する
が本発明では、例えば、最初に12ビット分のデータ
(R情報、G情報)を読み出し、次に6ビット分のデー
タ(B情報)を読み出すことを可能とすることによっ
て、CPU内での処理効率の低下を防止している。
Further, as is apparent from FIG.
When reading a data string of 18 bits from the CPU 1, the CPU 1 first reads data of 16 bits and then data of 2 bits.
Must be taken in, and data manipulation must be performed in the CPU 1 while being aware of data breaks.
The processing efficiency of U1 was reduced. As will be described later in detail, in the present invention, for example, CPU (CPU) by reading data of 12 bits (R information, G information) first, and then reading data of 6 bits (B information) To prevent the processing efficiency from being lowered.

【0010】本発明は上記課題に鑑みなされたものであ
って、CPUのバス幅よりも大きいデータ列をメモリに
書き込む際のCPUのアクセス回数を減少させ、CPU
の処理効率を向上させることのできるメモリ制御システ
ムや、さらにはメモリから区切り良くデータ列を読み出
すことのできるメモリ制御システムを提供することを目
的としている。
SUMMARY OF THE INVENTION The present invention has been made in consideration of the above problems, and reduces the number of accesses by a CPU when writing a data string larger than the bus width of the CPU to a memory.
It is an object of the present invention to provide a memory control system capable of improving the processing efficiency of the above and a memory control system capable of reading a data string from a memory with good separation.

【0011】[0011]

【課題を解決するための手段及びその効果】本発明者
は、複数のデータ列間に共通するデータがあれば、その
データ分をそれぞれの前記データ列の共通データとして
利用することによって、上記目的を達成することができ
ることを見い出した。
Means for Solving the Problems and Effects The present inventor has proposed the above-mentioned object by utilizing common data between a plurality of data strings as common data of the respective data strings. Can be achieved.

【0012】一般に画像データ列は、データ列毎にデー
タが大きく変化するということは非常に少なく、ある程
度同じようなパターンのデータが集まって形成される。
例えば、図8に示したようなRGB画像データ列11a
〜11eの場合、画像データ列11a〜11e間に共通
するデータが存在するので、例えば、共通データとして
上位2ビット分のデータを利用することができる。上位
2ビット分のデータを前記共通データとして利用するこ
とにより、残りの下位データをバス幅が16ビットのC
PUで一度に処理することができるようになる。
Generally, in an image data sequence, data rarely changes greatly for each data sequence, and data of a similar pattern is formed to some extent.
For example, an RGB image data string 11a as shown in FIG.
In the case of .about.11e, since data common to the image data strings 11a to 11e exists, for example, data of upper two bits can be used as common data. By using the upper two bits of data as the common data, the remaining lower data can be transferred to a 16-bit bus having a bus width of 16 bits.
The processing can be performed at once by the PU.

【0013】すなわち、本発明に係るメモリ制御システ
ム(1)は、バス幅がnビットであるCPUと、該CP
Uに使用されるメモリ手段とを備えたメモリ制御システ
ムにおいて、前記メモリ手段が、複数のnビットの第1
のレジスタと、これら複数の第1のレジスタそれぞれに
対応する複数のm(>n)ビットの第2のレジスタと、
複数のデータ列に共通するデータ分が書き込まれる共有
レジスタと、前記第1のレジスタへのデータ書き込み指
令が前記CPUよりなされると、該CPUから転送され
るデータを前記第1のレジスタに書き込み、その後、前
記データと前記共有レジスタに書き込まれているデータ
分とを併せたデータを、前記第1のレジスタに対応する
前記第2のレジスタに書き込むように制御する第1の制
御手段とを含んで構成されていることを特徴としてい
る。
That is, a memory control system (1) according to the present invention comprises a CPU having a bus width of n bits,
A memory control system comprising: a memory means used for a U-type memory;
And a plurality of m (> n) -bit second registers respectively corresponding to the plurality of first registers;
A shared register in which data common to a plurality of data strings is written; and a data write command to the first register is issued by the CPU to write data transferred from the CPU to the first register; And a first control unit that controls so that the combined data of the data and the data written in the shared register is written in the second register corresponding to the first register. It is characterized by being constituted.

【0014】上記メモリ制御システム(1)によれば、
複数のp(m≧p>n)ビットのデータ列に共通するq
(n≧q≧p−n)ビットのデータ分、すなわち共通デ
ータを前記共有レジスタに書き込んでおいて、前記デー
タ列から前記共通データを除いたr(=p−q)ビット
の残りのデータを前記第1のレジスタに書き込むことに
よって、前記共通データと前記残りのデータとを併せた
データ、すなわち前記データ列を前記第2のレジスタに
書き込むことができる。
According to the memory control system (1),
Q common to a plurality of p (m ≧ p> n) bit data strings
(N ≧ q ≧ p−n) bits of data, that is, common data is written in the common register, and the remaining data of r (= p−q) bits excluding the common data from the data string is written. By writing to the first register, data combining the common data and the remaining data, that is, the data string can be written to the second register.

【0015】例えば、前記CPUのバス幅、前記第1の
レジスタ、及び前記第2のレジスタがそれぞれ16ビッ
ト、16ビット、及び18ビットで構成され、図8に示
したような5(=N)本の画像データ列11a〜11e
を前記メモリ手段に書き込む場合、共通データとして利
用する上位2ビットのデータ分[10]を前記共有レジス
タに書き込んでおいて、残り下位16ビットのデータ
[0111010011001101]、又は[0100010100001101]等を
前記第1のレジスタに書き込むことによって、前記共通
データと前記残りのデータとを併せたデータ[10011101
0011001101]、又は[100100010100001101]等、すなわ
ち画像データ列11a、11b等を前記第2のレジスタ
に書き込むことができる。
For example, the bus width of the CPU, the first register, and the second register are 16 bits, 16 bits, and 18 bits, respectively, and are 5 (= N) as shown in FIG. Image data strings 11a to 11e of books
Is written in the memory means, the upper two bits of data [10] used as common data are written in the shared register, and the remaining lower 16 bits of data [0111010011001101] or [0100010100001101] are written in the first register. 1 by writing to the first register, the data [10011101] combining the common data and the remaining data.
[0011001101] or [100100010100001101], that is, the image data strings 11a and 11b can be written in the second register.

【0016】従って、従来では5(=N)本の画像デー
タ列11a〜11eをメモリに書き込むためには、デー
タ列の本数の2倍に相当する10(N×2)回のアクセ
スが必要であったが、上記メモリ制御システム(1)を
採用することにより、6(N+1)回にまでアクセス回
数を減少させることが可能となり、CPUの処理効率を
向上させることができる。
Therefore, conventionally, in order to write 5 (= N) image data strings 11a to 11e into the memory, 10 (N × 2) accesses corresponding to twice the number of data strings are required. However, by employing the memory control system (1), the number of accesses can be reduced to 6 (N + 1) times, and the processing efficiency of the CPU can be improved.

【0017】また、本発明に係るメモリ制御システム
(2)は、バス幅がnビットであるCPUと、該CPU
に使用されるメモリ手段とを備えたメモリ制御システム
において、前記メモリ手段が、複数のnビットの第1の
レジスタと、これら複数の第1のレジスタそれぞれに対
応する複数のm(>n)ビットの第2のレジスタと、前
記CPUによって、書き込まれている値が変更される切
替レジスタと、前記第1のレジスタからのデータ読み出
し指令が前記CPUよりなされると、前記第1のレジス
タに対応する前記第2のレジスタに書き込まれているデ
ータを前記切替レジスタの値に応じて、選択して前記第
1のレジスタに書き込むように制御する第2の制御手段
とを含んで構成されていることを特徴としている。
Further, the memory control system (2) according to the present invention comprises a CPU having a bus width of n bits,
A memory control system comprising: a plurality of n-bit first registers; and a plurality of m (> n) bits corresponding to the plurality of first registers, respectively. A second register, a switching register in which a value written by the CPU is changed, and a data read command from the first register, which corresponds to the first register. And second control means for controlling the data written in the second register to be selected and written to the first register in accordance with the value of the switching register. Features.

【0018】上記メモリ制御システム(2)によれば、
前記切替レジスタに書き込まれる値を変更させることに
よって、前記第2のレジスタに書き込まれているデータ
を選択して前記第1のレジスタに書き込むことができ
る。
According to the memory control system (2),
By changing the value written to the switching register, the data written to the second register can be selected and written to the first register.

【0019】例えば、前記CPUのバス幅、前記第1の
レジスタ、及び前記第2のレジスタがそれぞれ16ビッ
ト、16ビット、及び18ビットで構成され、前記第2
のレジスタに図8に示したような画像データ列11a、
[100111010011001101]が書き込まれている場合、前記
切替レジスタの値が「0」であれば上位12ビット[10
0111010011](R情報[100111]、G情報[010011])
が選択されて前記第1のレジスタに書き込まれ、一方、
前記切替レジスタの値が「1」であれば下位6ビット
[001101](B情報)が選択されて前記第1のレジスタ
に書き込まれることとなる。従って、前記メモリ手段か
らR情報、G情報、及びB情報を区切り良く読み出すこ
とが可能となり、前記CPUの処理効率を向上させるこ
とができる。
For example, the bus width of the CPU, the first register, and the second register are each composed of 16 bits, 16 bits, and 18 bits, and
Of the image data string 11a as shown in FIG.
When [100111010011001101] is written, if the value of the switching register is “0”, the upper 12 bits [10
0111010011] (R information [100111], G information [010011])
Is selected and written to the first register, while
If the value of the switching register is "1", the lower 6 bits [001101] (B information) are selected and written to the first register. Therefore, it is possible to read out the R information, the G information, and the B information from the memory means with good separation, thereby improving the processing efficiency of the CPU.

【0020】また、本発明に係るメモリ制御システム
(3)は、上記メモリ制御システム(1)において、前
記メモリ手段が、前記CPUによって、書き込まれてい
る値が変更される切替レジスタと、前記第1のレジスタ
からのデータ読み出し指令が前記CPUよりなされる
と、前記第1のレジスタに対応する前記第2のレジスタ
に書き込まれているデータを前記切替レジスタの値に応
じて、選択して前記第1のレジスタに書き込むように制
御する第2の制御手段とを含んで構成されていることを
特徴としている。
Further, in the memory control system (3) according to the present invention, in the memory control system (1), the memory means may include: a switching register for changing a value written by the CPU; When a data read command from the first register is issued by the CPU, the data written in the second register corresponding to the first register is selected according to the value of the switching register to select the data. And second control means for controlling writing to one register.

【0021】上記メモリ制御システム(3)によれば、
前記CPUのバス幅よりも大きいデータ列をメモリに書
き込む際の前記CPUのアクセス回数を大幅に減少させ
ることが可能となり、さらにメモリに書き込まれた前記
データ列を区切り良く読み出すことが可能となり、前記
CPUの処理効率を大幅に向上させることができる。
According to the memory control system (3),
The number of accesses by the CPU when writing a data string larger than the bus width of the CPU to the memory can be greatly reduced, and the data string written to the memory can be read with good separation. The processing efficiency of the CPU can be greatly improved.

【0022】[0022]

【発明の実施の形態】以下、本発明に係るメモリ制御シ
ステムの実施の形態を図面に基づいて説明する。図1
は、実施の形態に係るメモリ制御システム(1)の要部
を概略的に示したブロック図である。図中22はメモリ
を示しており、メモリ22は、複数のnビットのレジス
タ27で構成されたデータの記憶領域、すなわちレジス
タ群26と、複数のm(>n)ビットのレジスタ29で
構成されたレジスタ群28と、レジスタ群26、28へ
のデータの書き込み、及びレジスタ群6、28からのデ
ータの読み出しを制御する制御回路23とを含んで構成
され、制御回路23は制御バス37を介してレジスタ群
26、28に接続されている。
Embodiments of a memory control system according to the present invention will be described below with reference to the drawings. FIG.
FIG. 1 is a block diagram schematically showing a main part of a memory control system (1) according to an embodiment. In the figure, reference numeral 22 denotes a memory. The memory 22 includes a data storage area composed of a plurality of n-bit registers 27, that is, a register group 26, and a plurality of m (> n) -bit registers 29. And a control circuit 23 that controls writing of data to the register groups 26 and 28 and reading of data from the register groups 6 and 28. The control circuit 23 is connected to a control bus 37 via a control bus 37. Connected to the register groups 26 and 28.

【0023】さらに、メモリ22には、複数のデータ列
に共通するデータ分、すなわち共通データが書き込まれ
る共有レジスタ24と、CPU21によって、書き込ま
れている値が変更される切替レジスタ25とが含まれて
いる。共有レジスタ24は、データバス35を介してレ
ジスタ群26、28に接続され、制御回路23は制御バ
ス36を介して共有レジスタ24に接続されている。ま
た、制御回路23は制御バス38を介して切替レジスタ
25に接続され、切替レジスタ25に書き込まれている
値を取り込むことができるようになっている。
Further, the memory 22 includes a shared register 24 in which data common to a plurality of data strings, that is, common data is written, and a switching register 25 in which a value written by the CPU 21 is changed. ing. The shared register 24 is connected to the register groups 26 and 28 via a data bus 35, and the control circuit 23 is connected to the shared register 24 via a control bus 36. Further, the control circuit 23 is connected to the switching register 25 via the control bus 38, and can take in the value written in the switching register 25.

【0024】またバス幅がnビットであるCPU21
は、レジスタ27の番地を指定するためのアドレスバス
30と、WR(write )信号を送るための制御バス31
と、RD(read)信号を送るための制御バス32とを介
して制御回路23に接続され、さらにCPU21は制御
バス33を介して切替レジスタ25に接続され、切替レ
ジスタ25に0、又は1を書き込むことができるように
なっている。また、CPU21とレジスタ群26、及び
共有レジスタ24とはデータバス34を介して接続され
ている。
CPU 21 having a bus width of n bits
Are an address bus 30 for designating the address of the register 27 and a control bus 31 for sending a WR (write) signal.
And a control bus 32 for transmitting an RD (read) signal to the control circuit 23. Further, the CPU 21 is connected to the switching register 25 via the control bus 33, and sets 0 or 1 to the switching register 25. You can write to it. The CPU 21, the register group 26, and the shared register 24 are connected via a data bus 34.

【0025】レジスタ群26はアドレスA0 (図示せ
ず)〜AM 、B0 〜BN 、C0 、C1、C2 、…で示し
たnビットのレジスタ27から構成され、レジスタ群2
8はアドレスD0 〜DN で示したmビットのレジスタ2
9から構成されている。また、アドレスD0 〜DN で示
したレジスタ29(本発明の第2のレジスタに当たる)
はアドレスB0 〜BN で示したレジスタ27(本発明の
第1のレジスタに当たる)それぞれに対応している。
The register group 26 is composed of n-bit registers 27 indicated by addresses A 0 (not shown) to A M , B 0 to B N , C 0 , C 1 , C 2 ,.
8 is an m-bit register 2 indicated by addresses D 0 to D N
9. The register 29 indicated by the addresses D 0 to D N (corresponds to the second register of the present invention)
Corresponds to each of the registers 27 (corresponding to the first register of the present invention) indicated by the addresses B 0 to B N.

【0026】次に、CPU21がメモリ22にデータを
書き込む場合について説明する。まず、CPU21か
ら、どこの番地のレジスタ27にデータを書き込むかを
指定する番地(A0〜AM、B0〜BN、C0、C1、C2、…)、あ
るいは共有レジスタ24を指定する番地(E)がアドレ
スバス30に出力される共に、書き込むデータがデータ
バス34に出力される。そして、CPU21がWR信号
を出力することによって、目的のメモリ番地へデータを
書き込むことができるようになる。
Next, a case where the CPU 21 writes data in the memory 22 will be described. First, the CPU 21, the address specifying whether writing where data to the address of the register 27 (A 0 ~A M, B 0 ~B N, C 0, C 1, C 2, ...), or the shared register 24 The designated address (E) is output to the address bus 30, and the data to be written is output to the data bus 34. Then, when the CPU 21 outputs the WR signal, data can be written to a target memory address.

【0027】このときのメモリ22内における制御回路
23の動作を図2に示したフローチャートに基づいて説
明する。但し、ここでは既に共有レジスタ24にCPU
21からの指令によって、所望の共通データDC が書き
込まれているものとする。
The operation of the control circuit 23 in the memory 22 at this time will be described with reference to the flowchart shown in FIG. However, here, the CPU is already stored in the shared register 24.
It is assumed that desired common data D C has been written in accordance with the command from 21.

【0028】まずステップ1において、CPU21から
出力されたアドレスKを取り込み、次にステップ2にお
いて、CPU21から出力されたデータDをアドレスK
で示したレジスタ27、あるいは共有レジスタ24に書
き込むように制御し、ステップ3に進む。
First, in step 1, the address K output from the CPU 21 is fetched, and then in step 2, the data D output from the CPU 21 is
Then, control is performed so that the data is written to the register 27 or the shared register 24, and the process proceeds to step 3.

【0029】ステップ3では、アドレスKがアドレスB
0 〜BN のいずれかであるか否かを判断する。アドレス
KがアドレスB0 〜BN のいずれかであれば、ステップ
4に移り、一方、アドレスKがアドレスB0 〜BN のい
ずれでもなければ、前記動作を終了する。
In step 3, address K is changed to address B
0 .about.B N determines whether either. If the address K is either the address B 0 .about.B N, it proceeds to Step 4, whereas, the address K unless any of the addresses B 0 .about.B N, terminating the operation.

【0030】ステップ4では、共有レジスタ24に書き
込まれている共通データDC とデータDとを併せたもの
をデータD’とし、次にステップ5に進み、データD’
をアドレスKで示したレジスタ27(アドレスB0 〜B
N )に対応するレジスタ29(アドレスD0 〜DN )に
書き込むように制御する。
[0030] In step 4, the data D and that of the combination of the common data D C and the data D written in the shared register 24 'and then proceeds to step 5, data D'
27 (addresses B 0 to B
N ) to control writing to the register 29 (addresses D 0 to D N ).

【0031】また、ここではステップ3の処理をステッ
プ2の処理後に行なっているが、これは説明を容易にす
るためであり、ステップ1の処理後にステップ3の処理
を行なう方がより実用的であることは言うまでもない。
Although the processing in step 3 is performed after the processing in step 2 here, this is for the sake of simplicity. It is more practical to perform the processing in step 3 after the processing in step 1. Needless to say, there is.

【0032】すなわち上記実施の形態に係るメモリ制御
システム(1)を採用すれば、複数のp(m≧p>n)
ビットのデータ列に共通するq(n≧q≧p−n)ビッ
トのデータ分(共通データDC )を共有レジスタ24に
書き込んでおいて、前記データ列から共通データDC
除いた、残りのr(=p−q)ビットのデータDをアド
レスB0 〜BN のレジスタ27へ書き込むことによっ
て、共通データDC と残りのデータDとを併せたデータ
D’、すなわち前記データ列をレジスタ29に書き込む
ことができる。
That is, if the memory control system (1) according to the above embodiment is adopted, a plurality of p (m ≧ p> n)
The q (n ≧ q ≧ pn) bits of data (common data D C ) common to the bit data string are written in the common register 24, and the remaining data obtained by removing the common data D C from the data string is written. by writing r (= p-q) data D of the bit to register 27 the address B 0 ~B N, common data D C and the remaining data of the combination of the data D D ', i.e. the data sequence register 29.

【0033】上記メモリ制御システム(1)を用いて、
CPU21のバス幅よりも大きいデータ列をメモリ22
に書き込む際のCPU21の処理について説明する。但
し、ここではCPU21のバス幅、及びレジスタ27の
データ幅が16ビットであり、CPU21のバス幅より
も大きいデータ列として18ビットのRGB画像データ
列をメモリ22に書き込む場合について説明する。ま
た、レジスタ29はRGB画像データ列と同等の18ビ
ットのデータ幅で構成されているものとする。
Using the memory control system (1),
A data string larger than the bus width of the CPU 21 is stored in the memory 22.
The processing of the CPU 21 when writing to the. Here, a case will be described in which the bus width of the CPU 21 and the data width of the register 27 are 16 bits, and an 18-bit RGB image data string is written in the memory 22 as a data string larger than the bus width of the CPU 21. It is assumed that the register 29 has a data width of 18 bits equivalent to the RGB image data string.

【0034】図3は、図8に示したRGB画像データ列
11a〜11eをメモリ22に書き込む際の処理1〜6
であり、CPU21がアドレスバス30に出力するアド
レスと、データバス34に出力するデータとを示してい
る。また図4は、それら画像データ列11a〜11eが
レジスタ群28に書き込まれた状態を示した概略図であ
る。
FIG. 3 shows processes 1 to 6 for writing the RGB image data strings 11a to 11e shown in FIG.
And the address output from the CPU 21 to the address bus 30 and the data output from the data bus 34. FIG. 4 is a schematic diagram showing a state in which the image data strings 11a to 11e are written in the register group 28.

【0035】図3から明らかなように、共通データとし
て上位2ビット分のデータ[10]を予め共有レジスタ
24に書き込んでおくことによって、CPU21は残り
の下位16ビット分のデータだけを書き込むための処理
を行なうだけで良い。従って、5(=N)本の画像デー
タ列11a〜11e全てをメモリ22に書き込むために
は、画像データ列11a〜11eの本数に1を加えた6
(N+1)回のアクセスで良いことになる。ここでは、
説明を容易にするために画像データ列が5本の場合につ
いて説明しているが、実際にはその本数は非常に多く、
アクセス回数がその本数に1を加えただけとなることに
よって、CPU1の処理効率が大幅に向上する。
As is apparent from FIG. 3, by writing the upper two bits of data [10] as common data in the shared register 24 in advance, the CPU 21 writes only the remaining lower 16 bits of data. You just need to do the processing. Therefore, in order to write all the 5 (= N) image data strings 11a to 11e into the memory 22, one is added to the number of the image data strings 11a to 11e.
(N + 1) accesses are sufficient. here,
For ease of explanation, the case where the number of image data strings is five is described, but in actuality the number is very large,
The processing efficiency of the CPU 1 is greatly improved because the number of accesses is simply obtained by adding 1 to the number of accesses.

【0036】続いて、CPU21がデータをメモリ22
から読み出す場合について説明する。まず、CPU21
から、どこの番地のレジスタ27からデータを読み出す
かを指定する番地(A0〜AM、B0〜BN、C0、C1、C2、…)
が出力される。そして、CPU21からRD信号を出力
することによって、目的のメモリ番地からデータを読み
出すことができるようになる。
Subsequently, the CPU 21 stores the data in the memory 22.
The case where data is read from the memory will be described. First, the CPU 21
From address specified whether read data from the register 27 of anywhere address (A 0 ~A M, B 0 ~B N, C 0, C 1, C 2, ...)
Is output. Then, by outputting an RD signal from the CPU 21, data can be read from the target memory address.

【0037】このときのメモリ22内における制御回路
23の動作を図5に示したフローチャートに基づいて説
明する。まずステップ11において、CPU21から出
力されたアドレスKを取り込み、次にステップ12にお
いて、取り込んだアドレスKがアドレスB0 〜BN のい
ずれかであるか否かを判断する。アドレスKがアドレス
0 〜BN のいずれかであれば、ステップ13に移り、
一方、アドレスKがアドレスB0 〜BN のいずれでもな
ければ、ステップ17に移る。
The operation of the control circuit 23 in the memory 22 at this time will be described with reference to the flowchart shown in FIG. First, in step 11, takes in the address K output from the CPU 21, then at step 12, captured address K is equal to or either address B 0 ~B N. If the address K is either the address B 0 .about.B N, proceeds to step 13,
On the other hand, if the address K is not any of the addresses B 0 to B N , the process proceeds to step S17.

【0038】ステップ13では、切替レジスタ25に書
き込まれている値f(0、あるいは1)を取り込み、次
にステップ14において、取り込んだ値fが0、及び1
のいずれであるかを判断する。値fが0であれば、ステ
ップ15に移り、アドレスK(B0 〜BN )のレジスタ
27に対応するアドレスD0 〜DN のレジスタ29に書
き込まれているデータのうち、上位12ビット分のデー
タをアドレスKのレジスタ27に書き込むように制御
し、ステップ17に進む。一方、値fが1であれば、ス
テップ16に移り、アドレスK(B0 〜BN )のレジス
タ27に対応するアドレスD0 〜DN のレジスタ29に
書き込まれているデータのうち、下位6ビット分のデー
タをアドレスKのレジスタ27に書き込むように制御
し、ステップ17に進む。ステップ17では、アドレス
Kのレジスタ27に書き込まれているデータをCPU2
1が取り込めるように制御する。
In step 13, the value f (0 or 1) written in the switching register 25 is fetched, and in step 14, the fetched value f is set to 0 and 1
Is determined. If the value f is 0, the process proceeds to step 15 where the upper 12 bits of the data written in the registers 29 of the addresses D 0 to D N corresponding to the registers 27 of the addresses K (B 0 to B N ) are obtained. Is written to the register 27 at the address K, and the process proceeds to step 17. On the other hand, if the value f is 1, the process proceeds to step 16 where the lower 6 bits among the data written in the registers 29 of the addresses D 0 to D N corresponding to the registers 27 of the addresses K (B 0 to B N ). Control is performed so that the data for the bits is written to the register 27 at the address K, and the process proceeds to step 17. In step 17, the data written in the register 27 at the address K is
Control is performed so that 1 can be captured.

【0039】すなわち上記実施の形態に係るメモリ制御
システム(1)を採用すれば、切替レジスタ25に書き
込まれる値f(0、あるいは1)を変更させることによ
って、レジスタ29に書き込まれているデータを選択し
てレジスタ27に書き込まれることとなる。
That is, if the memory control system (1) according to the above embodiment is adopted, the data written in the register 29 is changed by changing the value f (0 or 1) written in the switching register 25. The selected data is written into the register 27.

【0040】上記メモリ制御システム(1)を用いて、
CPU21のバス幅よりも大きいデータ列をメモリ22
(レジスタ群28)から読み出す際のCPU21の処理
について説明する。但し、ここではCPU21のバス
幅、及びレジスタ27のデータ幅が16ビットであり、
CPU21のバス幅よりも大きいデータ列として18ビ
ットのRGB画像データ列をレジスタ群28から読み出
す場合について説明する。また、レジスタ29はRGB
画像データ列と同等の18ビットのデータ幅で構成され
ているものとする。
Using the memory control system (1),
A data string larger than the bus width of the CPU 21 is stored in the memory 22.
The processing of the CPU 21 when reading from the (register group 28) will be described. However, here, the bus width of the CPU 21 and the data width of the register 27 are 16 bits,
A case where an 18-bit RGB image data string is read from the register group 28 as a data string larger than the bus width of the CPU 21 will be described. The register 29 is RGB
It is assumed that it is configured with a data width of 18 bits equivalent to the image data sequence.

【0041】図6は、図4に示したレジスタ群28に書
き込まれた画像データ列11a〜11eをCPU21が
読み出す際の処理Xa 〜Xe 、及び処理Ya 〜Ye を示
しており、処理Xa 〜Xe 、処理Ya 〜Ye はそれぞれ
切替レジスタ25に書き込まれている値fが0、1の場
合である。
[0041] FIG. 6 shows a process X a to X e, and processing Y a to Y e when reading image data stream 11a~11e written in the register group 28 shown in FIG. 4 CPU 21 is, processing X a to X e, a case where the processing Y a to Y e is a value f which is respectively written into the switching register 25 is 0, 1.

【0042】図6から明らかなように、切替レジスタ2
5の値fが0であれば上位12ビット(R情報、G情
報)を選択してレジスタ27に書き込まれ、一方、切替
レジスタ25の値が1であれば下位6ビット(B情報)
を選択してレジスタ27に書き込まれることとなる。そ
して、レジスタ27に書き込まれたデータをCPU21
が読み出すことができるようになる。
As is apparent from FIG. 6, the switching register 2
If the value f of 5 is 0, the upper 12 bits (R information, G information) are selected and written into the register 27, while if the value of the switching register 25 is 1, the lower 6 bits (B information)
Is written in the register 27. The data written in the register 27 is transferred to the CPU 21.
Can be read.

【0043】従って、メモリ22からR情報、G情報、
及びB情報で構成されたRGB画像データ列を区切り良
く読み出すことができるようになり、CPU21の処理
効率を大幅に向上させることができる。
Therefore, R information, G information,
And the RGB image data string composed of the B information can be read with good separation, and the processing efficiency of the CPU 21 can be greatly improved.

【0044】また、18ビットのRGB画像データ列を
上位12ビットと下位6ビットとに分割して読み出す場
合についてのみ説明しているが、本発明が前記場合に限
定されるものではないことは言うまでもない。
Although only the case where the 18-bit RGB image data string is read after being divided into upper 12 bits and lower 6 bits has been described, it goes without saying that the present invention is not limited to the above case. No.

【0045】また、図1ではレジスタ群26と、共有レ
ジスタ24、及び切替レジスタ25を物理的に異なるよ
うにして示しているが、例えば、アドレスB0 〜BN
外のレジスタ27のうちのいずれか2ビットを共有レジ
スタ24として利用し、また同様にして1ビットを切替
レジスタ25とし利用することもできる。
In FIG. 1, the register group 26, the common register 24, and the switching register 25 are shown as physically different from each other. For example, any one of the registers 27 other than the addresses B 0 to B N is used. One or two bits can be used as the shared register 24, and similarly, one bit can be used as the switching register 25.

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

【図1】本発明の実施の形態に係るメモリ制御システム
(1)の要部を概略的に示したブロック図である。
FIG. 1 is a block diagram schematically showing a main part of a memory control system (1) according to an embodiment of the present invention.

【図2】メモリにデータを書き込む際における制御回路
の動作を示したフローチャートである。
FIG. 2 is a flowchart showing an operation of a control circuit when writing data to a memory.

【図3】RGB画像データ列をメモリに書き込む際の処
理を示したものである。
FIG. 3 shows a process for writing an RGB image data string into a memory.

【図4】RGB画像データ列がレジスタに書き込まれた
状態を示した概略図である。
FIG. 4 is a schematic diagram showing a state in which an RGB image data string is written into a register.

【図5】メモリからデータを読み出す際における制御回
路の動作を示したフローチャートである。
FIG. 5 is a flowchart showing an operation of a control circuit when reading data from a memory.

【図6】RGB画像データ列をメモリから読み出す際の
処理を示したものである。
FIG. 6 shows a process for reading an RGB image data string from a memory.

【図7】従来のメモリ制御システムの要部を概略的に示
したブロック図である。
FIG. 7 is a block diagram schematically showing a main part of a conventional memory control system.

【図8】RGB画像データ列を示した模式図である。FIG. 8 is a schematic diagram showing an RGB image data sequence.

【図9】RGB画像データ列がレジスタに書き込まれた
状態を示した模式図である。
FIG. 9 is a schematic diagram showing a state in which an RGB image data string is written in a register.

【図10】RGB画像データ列をメモリに書き込む際の
処理を示したものである。
FIG. 10 shows a process for writing an RGB image data string into a memory.

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

1、21 CPU 2、22 メモリ 3、23 制御回路 4、26、28 レジスタ群 5、27、29 レジスタ 6、30 アドレスバス 7、8、10、31、32、33、36、37、38
制御バス 9、34、35 データバス 24 共有レジスタ 25 切替レジスタ
1,21 CPU 2,22 memory 3,23 control circuit 4,26,28 register group 5,27,29 register 6,30 address bus 7,8,10,31,32,33,36,37,38
Control bus 9, 34, 35 Data bus 24 Shared register 25 Switching register

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 バス幅がnビットであるCPUと、該C
PUに使用されるメモリ手段とを備えたメモリ制御シス
テムにおいて、 前記メモリ手段が、 複数のnビットの第1のレジスタと、 これら複数の第1のレジスタそれぞれに対応する複数の
m(>n)ビットの第2のレジスタと、 複数のデータ列に共通するデータ分が書き込まれる共有
レジスタと、 前記第1のレジスタへのデータ書き込み指令が前記CP
Uよりなされると、該CPUから転送されるデータを前
記第1のレジスタに書き込み、その後、前記データと前
記共有レジスタに書き込まれているデータ分とを併せた
データを、前記第1のレジスタに対応する前記第2のレ
ジスタに書き込むように制御する第1の制御手段とを含
んで構成されていることを特徴とするメモリ制御システ
ム。
A CPU having a bus width of n bits;
A memory control system comprising a memory means used for a PU, wherein the memory means comprises: a plurality of n-bit first registers; and a plurality of m (> n) corresponding to each of the plurality of first registers. A second register of bits, a shared register in which data common to a plurality of data strings is written, and a command to write data to the first register is transmitted by the CP.
U, the data transferred from the CPU is written into the first register, and then the data obtained by combining the data and the data written in the shared register is written into the first register. A first control means for controlling writing to the corresponding second register.
【請求項2】 バス幅がnビットであるCPUと、該C
PUに使用されるメモリ手段とを備えたメモリ制御シス
テムにおいて、 前記メモリ手段が、 複数のnビットの第1のレジスタと、 これら複数の第1のレジスタそれぞれに対応する複数の
m(>n)ビットの第2のレジスタと、 前記CPUによって、書き込まれている値が変更される
切替レジスタと、 前記第1のレジスタからのデータ読み出し指令が前記C
PUよりなされると、前記第1のレジスタに対応する前
記第2のレジスタに書き込まれているデータを前記切替
レジスタの値に応じて、選択して前記第1のレジスタに
書き込むように制御する第2の制御手段とを含んで構成
されていることを特徴とするメモリ制御システム。
2. A CPU having a bus width of n bits;
A memory control system comprising a memory means used for a PU, wherein the memory means comprises: a plurality of n-bit first registers; and a plurality of m (> n) corresponding to each of the plurality of first registers. A second register of bits, a switching register for changing a value written by the CPU, and a command to read data from the first register.
When the PU performs the control, data written in the second register corresponding to the first register is controlled in accordance with the value of the switching register to select and write the data to the first register. 2. A memory control system, comprising: a second control unit.
【請求項3】 前記メモリ手段が、 前記CPUによって、書き込まれている値が変更される
切替レジスタと、 前記第1のレジスタからのデータ読み出し指令が前記C
PUよりなされると、前記第1のレジスタに対応する前
記第2のレジスタに書き込まれているデータを前記切替
レジスタの値に応じて、選択して前記第1のレジスタに
書き込むように制御する第2の制御手段とを含んで構成
されていることを特徴とする請求項1記載のメモリ制御
システム。
3. The memory device according to claim 2, wherein: a switching register for changing a value written by the CPU; and a command to read data from the first register.
When the PU performs the control, data written in the second register corresponding to the first register is controlled in accordance with the value of the switching register to select and write the data to the first register. 2. The memory control system according to claim 1, wherein said memory control system includes two control means.
JP5042998A 1998-03-03 1998-03-03 Memory control system Withdrawn JPH11249958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5042998A JPH11249958A (en) 1998-03-03 1998-03-03 Memory control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5042998A JPH11249958A (en) 1998-03-03 1998-03-03 Memory control system

Publications (1)

Publication Number Publication Date
JPH11249958A true JPH11249958A (en) 1999-09-17

Family

ID=12858634

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5042998A Withdrawn JPH11249958A (en) 1998-03-03 1998-03-03 Memory control system

Country Status (1)

Country Link
JP (1) JPH11249958A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100450680B1 (en) * 2002-07-29 2004-10-01 삼성전자주식회사 Memory controller for increasing bus bandwidth, data transmitting method and computer system having the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100450680B1 (en) * 2002-07-29 2004-10-01 삼성전자주식회사 Memory controller for increasing bus bandwidth, data transmitting method and computer system having the same

Similar Documents

Publication Publication Date Title
JP3940435B2 (en) Method and apparatus for performing direct memory access (DMA) byte swapping
JPH07168752A (en) Display memory structure
JPS6061790A (en) Display control system
JPH11249958A (en) Memory control system
JPH05197619A (en) Memory control circuit for multi-cpu
JPH09204243A (en) Data transfer method
JPH0651751A (en) Image display device
JPS59132479A (en) Data processing circuit
JP3256442B2 (en) Data transfer control circuit
JPS6155755A (en) Memory control device
JPH09231347A (en) Image processor
JPH05204830A (en) Input/output controller
JPH0754544B2 (en) Image memory access circuit
JP3031581B2 (en) Random access memory and information processing device
JPH0520173A (en) Cache memory circuit
JPH06208539A (en) High-speed data transfer system
JPH0758431B2 (en) Address line and data line connection system
JPS60254477A (en) Memory system
JPH04333953A (en) Bank memory control system
JPS61184655A (en) Data transmission system
JPH10207825A (en) Data transfer device
JPH05158786A (en) Block transfer device
JPH06131519A (en) Ic card
JPH06301629A (en) Main storage device
JP2000076127A (en) Byte read access method for controller

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: 20050510