JPH03142544A - Memory access system - Google Patents

Memory access system

Info

Publication number
JPH03142544A
JPH03142544A JP27975689A JP27975689A JPH03142544A JP H03142544 A JPH03142544 A JP H03142544A JP 27975689 A JP27975689 A JP 27975689A JP 27975689 A JP27975689 A JP 27975689A JP H03142544 A JPH03142544 A JP H03142544A
Authority
JP
Japan
Prior art keywords
cpu
memory
bank
banks
access
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
JP27975689A
Other languages
Japanese (ja)
Inventor
Masayuki Yokota
雅之 横田
Satonobu Fujita
覚伸 藤田
Shigehiro Kadota
茂宏 門田
Satoru Mamiya
悟 間宮
Osamu Ogawa
修 小川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP27975689A priority Critical patent/JPH03142544A/en
Publication of JPH03142544A publication Critical patent/JPH03142544A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To attain an access to a memory without switching the banks of a memory circuit by instructing the transfer of data covering the banks of the memory circuit to a 2nd CPU from a 1st CPU. CONSTITUTION:A CPU 101 has an access to a shared memory 104 via the switch of banks. A CPU 102 can have an access to the memory 104 as a continuous memory address space with no switch of banks. A bank switch circuit 103 inputs a command given from the CPU 101 and performs the switch of banks of the memory 104. In this case, a bank 0 is selected when '0' is written by the CPU 101 and then a bank 1 is selected with '1' written by the CPU 101 respectively. The memory 102 has a dual structure containing the memories 107 and 108 of both banks 0 and 1 and receives the accesses for each bank from the CPU 101 via the buffers 105 and 106. Then the memory 104 receives an access from the CPU 101 in a continuous space via a buffer 109.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は複数のCPUによりアクセスできるメモリのア
クセス方式に関し、特にバンク切換によりアクセスされ
るメモリのアクセス方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a memory access method that can be accessed by a plurality of CPUs, and particularly to a memory access method that is accessed by bank switching.

[従来の技術] バンク切換によりアクセスされるメモリに接続され、い
ま例えば、CPUにより実行される制御プログラムが一
方のメモリバンクに格納されている場合、その制御プロ
グラムが実行されている状態で、他のメモリバンクのデ
ータをアクセスしたい場合がある。このような場合は、
単にメモリバンクを切換えただけではCPUの動作が不
能になってしまうため、別のメモリ空間に記憶されてい
るバンク切換プログラムに制御を移行し、そのプログラ
ムによりメモリのバンク切換や他のメモリバンクよりの
データ読出しなどを行うように動作していた。
[Prior Art] When a control program that is connected to a memory that is accessed by bank switching and is currently executed by a CPU is stored in one memory bank, while the control program is being executed, the other memory bank is You may want to access data in a memory bank. In such a case,
Simply switching the memory bank will make the CPU inoperable, so control is transferred to a bank switching program stored in another memory space, and that program allows you to switch memory banks and switch from other memory banks. It was operating to read data etc.

[発明が解決しようとする課題] しかし、このような構成では、メモリバンク間でのデー
タ転送に多くの時間を要し、また、一方のメモリバンク
に制御プログラムが格納されているような場合では、制
御プログラムの退避や復帰、制御プログラムの切換など
のために多くの時間を要するため、メモリバンク間での
データ転送の効率が低下するという問題がある。
[Problems to be Solved by the Invention] However, in such a configuration, it takes a lot of time to transfer data between memory banks, and when a control program is stored in one memory bank, Since it takes a lot of time to save and restore control programs, switch control programs, etc., there is a problem that the efficiency of data transfer between memory banks decreases.

本発明は上記従来例に鑑みてなされたもので、メモリの
バンク切換処理を行わなくても、現在アクセス中のメモ
リバンクとは異なるメモリバンクのデータにアクセスで
きるメモリのアクセス方式を提供することを目的とする
The present invention has been made in view of the above conventional example, and an object of the present invention is to provide a memory access method that allows access to data in a memory bank different from the memory bank currently being accessed without performing memory bank switching processing. purpose.

[課題を解決するための手段] 上記目的を達成するために本発明のメモリのアクセス方
式は以下の様な構成からなる。即ち、少なくとも2つの
CPUによりアクセス可能なメモリ回路と、前記メモリ
回路をバンク切換によりアクセス可能な第1のCPUと
、前記メモリ回路を連続したメモリ空間でアクセス可能
な第2のCPUと、前記第1のCPUより前記第2のc
pUに前記メモリ回路のバンクにまたがったデータ転送
を指示する指示手段とを備える。
[Means for Solving the Problems] In order to achieve the above object, the memory access method of the present invention has the following configuration. That is, a memory circuit that can be accessed by at least two CPUs, a first CPU that can access the memory circuit by switching banks, a second CPU that can access the memory circuit in a continuous memory space, and a first CPU that can access the memory circuit by switching banks; 1 CPU to the second c
and instruction means for instructing the pU to transfer data across banks of the memory circuit.

[作用] 以上の構成において、少なくとも2つのCPUによりア
クセス可能なメモリ回路を、第1のCPUはバンク切換
によりアクセスできる。一方、第2のCPUは連続した
メモリ空間で、このメモリ回路をアクセスできる。こう
して、第1のCPUより第2のCPUに、そのメモリ回
路のバンクにまたがったデータ転送を指示することによ
り、第2のCPUはそのメモリ回路内でメモリ回路のバ
ンクを意識することなく、通常のデータ転送を行う。こ
れにより、第1のCPUは現在アクセスできるメモリバ
ンク内に他のメモリバンクのデータを移動させ、メモリ
回路のバンク切換を行うことなくアクセスできる。
[Operation] In the above configuration, the first CPU can access the memory circuit accessible by at least two CPUs by switching banks. On the other hand, the second CPU can access this memory circuit in a continuous memory space. In this way, by instructing the second CPU from the first CPU to transfer data across the banks of the memory circuit, the second CPU can normally transfer data within the memory circuit without being aware of the banks of the memory circuit. data transfer. As a result, the first CPU can move data of other memory banks into the currently accessible memory bank and access it without switching banks of the memory circuit.

[実施例] 以下、添付図面を参照して本発明の好適な実施例を詳細
に説明する。
[Embodiments] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[メモリ回路の説明 (第1図、第2図)]第1図は実
施例のメモリ回路とその周辺回路の構成を示すブロック
図である。
[Description of Memory Circuit (FIGS. 1 and 2)] FIG. 1 is a block diagram showing the configuration of a memory circuit and its peripheral circuits in an embodiment.

図において、101は共有メモリ104をバンク切換に
よりアクセスするCPU、102は共有メモリ104を
バンク切換えを行わずに、連続したメモリアドレス空間
としてアクセスできるCPUである。103はバンク切
換回路で、CPU 101よりのコマンドを入力して共
有メモリ104のバンク切換を行っている。ここでは、
CPUl01により°“0″が書込まれるとバンク0が
選択され、CPU 101により”1”が書込まれると
バンクlが選択されるように構成されている。共有メモ
リ104はバンクOとバンク1のメモリ107と108
とを備えたデュアルポートメモリで、CPU 101に
よりバッファ105と106を介して、各バンク毎にア
クセスされ、CPUIO2によりバッファ109を介し
て連続したメモリ空間でアクセスされる。
In the figure, 101 is a CPU that accesses the shared memory 104 by switching banks, and 102 is a CPU that can access the shared memory 104 as a continuous memory address space without switching banks. A bank switching circuit 103 receives commands from the CPU 101 to switch banks of the shared memory 104. here,
Bank 0 is selected when "0" is written by CPU 101, and bank 1 is selected when "1" is written by CPU 101. Shared memory 104 includes memories 107 and 108 in bank O and bank 1.
It is a dual-port memory that is accessed by the CPU 101 via buffers 105 and 106 for each bank, and accessed by the CPU IO 2 via the buffer 109 in a continuous memory space.

110はコマンドボートで、CPUI O1よりのコマ
ンドをラッチするとともに、そのコマンドの書込みに対
応してCPU102への割込み信号IRQ205などを
出力している。111はスティタスレジスタで、CPU
l0Iに共有メモリ104のアクセス状態などを示すス
テータス信号(BUSY)を出力している。同様に、1
12はCPU102よりCPUl0Iへのコマンドボー
ト、113はステータスレジスタで、それぞれ前述した
コマンドボート110、ステータスレジスタ111と同
じように構成されている。
A command board 110 latches commands from the CPU I O1 and outputs an interrupt signal IRQ205 to the CPU 102 in response to writing of the commands. 111 is the status register, the CPU
A status signal (BUSY) indicating the access state of the shared memory 104 is output to l0I. Similarly, 1
12 is a command boat from the CPU 102 to CPUl0I, and 113 is a status register, which are configured in the same manner as the command boat 110 and status register 111 described above, respectively.

121はCPUl0Iの基本プログラムを格納している
ROM、122はCPUl0Iのワークエリアとして使
用されるRAMである。131はCPU102の制御プ
ログラムを格納しているROM、132はCPU102
のワークエリアとして使用されるRAMである。
121 is a ROM that stores the basic program of the CPU 10I, and 122 is a RAM used as a work area for the CPU 10I. 131 is a ROM storing a control program for the CPU 102; 132 is a CPU 102;
This RAM is used as a work area.

第2図はコマンドボート110(112)とステータス
レジスタ111.(113)の概略構成を示すブロック
図で、第2図ではコマンドボート110とステータスレ
ジスタ111の概略構成を示している。
FIG. 2 shows a command board 110 (112) and a status register 111. (113), and FIG. 2 shows a schematic configuration of a command boat 110 and a status register 111.

第2図において、201はコマンドバッファで、CPU
 101よりのチップセレクト信号C31と書込み信号
WRIにより、CPUl0Iよりのコマンド(例えば後
述するバンク間データ転送コマンド等)が書込まれる。
In FIG. 2, 201 is a command buffer, and the CPU
A command from the CPU 10I (for example, an inter-bank data transfer command to be described later) is written by the chip select signal C31 from the CPU 101 and the write signal WRI.

こうしてC3IとWRlが同時に出力されると信号20
6がロウレベルになり、フリップフロップ111とフリ
ップフロップ202とが同時にセットされる。これによ
り、CPU102への割込み信号IRQ205とビジー
(BUSY)信号211とが共にセットされる。
In this way, when C3I and WRl are output simultaneously, the signal 20
6 becomes low level, and flip-flop 111 and flip-flop 202 are set at the same time. As a result, both the interrupt signal IRQ 205 and the busy signal 211 to the CPU 102 are set.

これによりCPU102に割込みが発生し、CPU10
2の割込み処理によりコマンドバッファ201に格納さ
れたコマンドが読み込まれる。このCPU102による
バッファ201のデータ読出しにより、OR回路209
の出力がロウレベルになり、割込み回路202がリセッ
トされて信号IRQ205がロウレベルになる。また、
CPU102の割込み処理ルーチンの最後で、CPUI
O2がコマンドバッファ201へのダミーの書込み処理
を行うことにより、OR回路210の出力がロウレベル
になり、ステータスレジスタ208がリセットされ、ビ
ジー信号211がオフされる。
This causes an interrupt to the CPU 102, causing the CPU 10
The command stored in the command buffer 201 is read by the interrupt processing in step 2. By reading data from the buffer 201 by the CPU 102, the OR circuit 209
The output of the interrupt circuit 202 becomes low level, the interrupt circuit 202 is reset, and the signal IRQ205 becomes low level. Also,
At the end of the CPU 102 interrupt handling routine, the CPU
As O2 performs dummy write processing to the command buffer 201, the output of the OR circuit 210 becomes low level, the status register 208 is reset, and the busy signal 211 is turned off.

第2図に示した、CS1.WRI、RDIはいずれもC
PUl0Iよりのロウツルーの制御信号で、CS2.W
R2,RD2はCPU 102よりのロウアクティブの
制御信号である。ここで、CS信号はコマンドボート及
びステータスレジスタを選択するためのチップセレクト
信号、WRは書込み信号、RDは読出し信号である。
CS1. shown in FIG. WRI and RDI are both C
With the law-true control signal from PUl0I, CS2. W
R2 and RD2 are row active control signals from the CPU 102. Here, the CS signal is a chip select signal for selecting a command boat and status register, WR is a write signal, and RD is a read signal.

[動作説明 (第1図〜第4図)] 第3図はCPUl0Iによるデータ転送処理指示を示す
フローチャートで、この処理を実行する制御プログラム
はROM121或は共有メモリの、例えばバンクOメモ
リ107に格納されている。
[Operation Description (Figs. 1 to 4)] Fig. 3 is a flowchart showing a data transfer processing instruction by the CPUl0I, and a control program for executing this processing is stored in the ROM 121 or the shared memory, for example, the bank O memory 107. has been done.

いま、CPUl0Iにおいてバンク1のデータをバンク
Oに転送したい場合について考えると、ステップS1で
ステータスレジスタ111よりのビジー信号211がロ
ウレベル(レディ)かどうかを調べ、レディであればス
テップS2に進み、現在選択されている共有メモリ10
4の、例えばバンクOの所定のアドレスに、転送元と転
送先のメモリアドレス、転送するデータ数(例えばバイ
ト数)などを書込む。そしてステップS3でコマンドボ
ート110にバンク間転送コマンドを書込む。
Now, considering the case where CPUl0I wants to transfer the data of bank 1 to bank O, it is checked in step S1 whether the busy signal 211 from the status register 111 is low level (ready), and if it is ready, the process advances to step S2 and the current Selected shared memory 10
4, write the transfer source and transfer destination memory addresses, the number of data to be transferred (for example, the number of bytes), etc. to a predetermined address in bank O, for example. Then, in step S3, an inter-bank transfer command is written to the command boat 110.

これにより割込み回路202がセットされ、割込み信号
IRQ205がハイレベルになってCPU102に割込
みをかける。
As a result, the interrupt circuit 202 is set, and the interrupt signal IRQ205 becomes high level to interrupt the CPU 102.

このときのCPU102による割込み処理を示したのが
第4図のフローチャートである。
The flowchart in FIG. 4 shows the interrupt processing by the CPU 102 at this time.

CPU 102に割込みが発生するとステップS11に
進み、コマンドボート110を読出してCPUl0Iよ
りのコマンドを入力する。ステップS12ではこのコマ
ンドを解釈して、バンク間データ転送コマンドかどうか
をみる。バンク間データ転送コマンドでないときはステ
ップS13に進み、そのコマンドに対応した処理を実行
する。
When an interrupt occurs in the CPU 102, the process advances to step S11, where the command board 110 is read and a command from the CPU 10I is input. In step S12, this command is interpreted to see if it is an inter-bank data transfer command. If it is not an inter-bank data transfer command, the process advances to step S13, and processing corresponding to the command is executed.

バンク間データ転送コマンドのときはステップS14に
進み、共有メモリ104の所定のアドレスより転送元、
転送先アドレス及び転送するデータ数などを読み込む。
If it is an inter-bank data transfer command, the process advances to step S14, and the transfer source,
Read the destination address and the number of data to be transferred.

そして、ステップS15でそのコマンドにより指示され
たバンク間でのデータ転送処理を実行する。なお、この
処理はCPU102にとっては、通常のメモリアドレス
間におけるデータ転送処理と全(同様である。こうして
指示されたデータ転送処理が終了するとステップS16
に進み、ステータスレジスタ113がレディかどうかを
調べ、レディであればステップS17でCPU 101
への応答コマンドを、コマンドレジスタ112に書込む
。これにより、コマンドボート112より出力されるC
PUl0Iへの割込み信号IRQがハイレベルとなる。
Then, in step S15, data transfer processing between banks instructed by the command is executed. Note that for the CPU 102, this process is the same as normal data transfer process between memory addresses. When the data transfer process instructed in this way is completed, step S16
In step S17, it is checked whether the status register 113 is ready, and if it is ready, the CPU 101
Writes a response command to the command register 112. As a result, the C output from the command boat 112
The interrupt signal IRQ to PUl0I becomes high level.

こうして次に第3図のステップS4でCPU 102よ
りの応答があったことを検知するとステップS5に進み
、ステータスレジスタ113にダミーの書込み信号を出
力して、ステータスレジスタ113よりのビジー信号(
BUSY)をクリアする。このとき、また第4図のステ
ップS18でも、CPU102がダミーの書込み信号を
出力してステータスレジスタ111のビジー信号211
をオフにしている。なお、第3図のステップS4ではコ
マンドボート112よりの割込み信号により、CPU 
101に割込みを発生しても良く、あるいはCPU 1
01がセンス命令によりこのIRQ信号を検知して、C
PU 102より応答があったことを検出してもよい。
In this way, when a response from the CPU 102 is detected in step S4 of FIG.
BUSY). At this time, also in step S18 in FIG.
is turned off. In addition, in step S4 of FIG. 3, an interrupt signal from the command boat 112 causes the CPU to
An interrupt may be generated in CPU 101, or CPU 1
01 detects this IRQ signal by a sense command and
A response from the PU 102 may also be detected.

このように本実施例によれば、CPUl0Iはメモリの
バンク切換を行わなくても、現在アクセスしているメモ
リバンク以外のメモリバンクのデータにもアクセスでき
る。これは特に、CPU101が現在メモリバンク0の
制御プログラムを実行中に、メモリバンク1のデータを
読出したい場合などに有効である。
As described above, according to this embodiment, the CPU 10I can also access data in memory banks other than the memory bank currently being accessed, without having to switch memory banks. This is particularly effective when the CPU 101 is currently executing the control program for memory bank 0 and wants to read data from memory bank 1.

[発明の効果] 以上説明したように本発明によれば、メモリ回路をバン
ク切換えしてアクセス可能なCPUにおいても、メモリ
のバンク切換処理を行なうことなく、現在アクセス中の
メモリバンクとは異なるメモリバンクのデータにもアク
セスできる効果がある。
[Effects of the Invention] As explained above, according to the present invention, even in a CPU that can be accessed by switching the memory circuit bank, a memory different from the memory bank currently being accessed can be accessed without performing memory bank switching processing. It also has the effect of allowing you to access bank data.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は実施例のメモリ回路の概略構成を示すブロック
図、 第2図は実施例のコマンドボートとステータスレジスタ
の構成を示すブロック図、 第3図はCPU 101によるバンク間データ転送コマ
ンドを出力する処理を示すフローチャート、そして 第4図はCPU 102によるコマンド受信及びバンク
間データ転送処理を示すフローチャートである。 図中、101,102・・・CPU、103・・・バン
ク切換回路、104・・・共有メモリ、105,106
.109・・・バッファ、110,112・・・コマン
ドレジスタ、111,113・・・ステータスレジスタ
、121,131・・・ROM、122,132・・・
RAM、201・・・コマンドバッファ、202・・・
割込み回路、205・・・割込み信号(IRQ)、20
7〜210・・・OR回路、211・・・ビジー信号で
ある。 l・′4 矛 3図 第4 図
FIG. 1 is a block diagram showing the schematic configuration of the memory circuit of the embodiment, FIG. 2 is a block diagram showing the configuration of the command boat and status register of the embodiment, and FIG. 3 is the output of inter-bank data transfer commands by the CPU 101. FIG. 4 is a flowchart showing command reception and inter-bank data transfer processing by the CPU 102. In the figure, 101, 102... CPU, 103... Bank switching circuit, 104... Shared memory, 105, 106
.. 109...Buffer, 110,112...Command register, 111,113...Status register, 121,131...ROM, 122,132...
RAM, 201... Command buffer, 202...
Interrupt circuit, 205... Interrupt signal (IRQ), 20
7 to 210: OR circuit, 211: busy signal. l・'4 Spear 3 Figure 4

Claims (2)

【特許請求の範囲】[Claims] (1)少なくとも2つのCPUによりアクセス可能なメ
モリ回路と、 前記メモリ回路をバンク切換によりアクセス可能な第1
のCPUと、 前記メモリ回路を連続したメモリ空間でアクセス可能な
第2のCPUと、 前記第1のCPUより前記第2のCPUに前記メモリ回
路のバンクにまたがつたデータ転送を指示する指示手段
と、 を備えることを特徴とするメモリのアクセス方式。
(1) a memory circuit accessible by at least two CPUs, and a first memory circuit accessible by bank switching;
a second CPU that can access the memory circuit in a continuous memory space; and instruction means for instructing the first CPU to transfer data across banks of the memory circuit to the second CPU. A memory access method comprising: and
(2)前記第1のCPUより前記第2のCPUへの指示
は、前記第1と第2のCPUとが共有している共有メモ
リと、前記第1と第2のCPUによるメモリアクセス状
態を示すステータスレジスタよりの信号をもとに、前記
共有メモリを介して伝達されることを特徴とする請求項
第1項に記載のメモリのアクセス方式。
(2) The instructions from the first CPU to the second CPU include the shared memory shared by the first and second CPUs and the memory access state by the first and second CPUs. 2. The memory access method according to claim 1, wherein the signal is transmitted via the shared memory based on a signal from a status register indicating the shared memory.
JP27975689A 1989-10-30 1989-10-30 Memory access system Pending JPH03142544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27975689A JPH03142544A (en) 1989-10-30 1989-10-30 Memory access system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27975689A JPH03142544A (en) 1989-10-30 1989-10-30 Memory access system

Publications (1)

Publication Number Publication Date
JPH03142544A true JPH03142544A (en) 1991-06-18

Family

ID=17615470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27975689A Pending JPH03142544A (en) 1989-10-30 1989-10-30 Memory access system

Country Status (1)

Country Link
JP (1) JPH03142544A (en)

Similar Documents

Publication Publication Date Title
JPS6113629B2 (en)
JPS6319058A (en) Memory device
JPH03142544A (en) Memory access system
JP2568017B2 (en) Microprocessor and data processing system using the same
JPS592058B2 (en) Storage device
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
US6085297A (en) Single-chip memory system including buffer
JPS5924428B2 (en) display device
JP2687679B2 (en) Program development equipment
JPH0447350A (en) Main storage read/response control
JPS6113628B2 (en)
JPS62276663A (en) Program transfer method
JPH0261749A (en) Data transfer device
JP3063501B2 (en) Memory access control method
JPS62151955A (en) Memory addressing system
JPS607825B2 (en) memory system
JPH04117697A (en) Multiport memory circuit
JPH04333950A (en) Information processing system
JPH01102664A (en) Initial program loading system
JPH04236631A (en) Information processor incorporatted with multiport random access memory
JPS61131152A (en) Dma buffer control system
JPS6210751A (en) Microcomputer circuit
JPS6239779B2 (en)
JPS60129855A (en) Signal processor
JPS63188233A (en) Central processing unit