JPH0697437B2 - Bus switching method - Google Patents

Bus switching method

Info

Publication number
JPH0697437B2
JPH0697437B2 JP21571988A JP21571988A JPH0697437B2 JP H0697437 B2 JPH0697437 B2 JP H0697437B2 JP 21571988 A JP21571988 A JP 21571988A JP 21571988 A JP21571988 A JP 21571988A JP H0697437 B2 JPH0697437 B2 JP H0697437B2
Authority
JP
Japan
Prior art keywords
address
bus
external memory
bit
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.)
Expired - Lifetime
Application number
JP21571988A
Other languages
Japanese (ja)
Other versions
JPH0262642A (en
Inventor
稔彦 本林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP21571988A priority Critical patent/JPH0697437B2/en
Publication of JPH0262642A publication Critical patent/JPH0262642A/en
Publication of JPH0697437B2 publication Critical patent/JPH0697437B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はフアームウエアシステムのローカルメモリと外
部メモリのアクセス方式に関し、特に幅の異なるアドレ
スを出力するバスマスタが上記両メモリにアクセスする
ときのバス切替方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an access method for a local memory and an external memory of a firmware system, and more particularly to a bus used when a bus master that outputs addresses having different widths accesses both memories. Regarding switching method.

(従来の技術) 従来、ローカルメモリと外部の共通メモリをアクセスす
るフアームウエアシステムではバスマスクのメモリ空間
をローカルメモリと外部の共通メモリの固定アドレス値
で分割する方法が広く採用されている。
(Prior Art) Conventionally, a firmware system for accessing a local memory and an external common memory has widely adopted a method of dividing a memory space of a bus mask by a fixed address value of the local memory and the external common memory.

この方法ではバスマスタのアドレス拡張はバスマスタ対
応にアドレス拡張用のレジスタを用意してシステムのア
ドレス幅に合わせる方式が一般的であるが、アドレス幅
が少ない場合には固定値が出力されるように構成される
ことがある。
In this method, for address expansion of the bus master, it is common to prepare a register for address expansion corresponding to the bus master and match it with the address width of the system, but when the address width is small, a fixed value is output. It may be done.

また、外部のメモリのアクセスを制御するためのポート
を用意して、I/Oアクセスによつて任意のアドレスの共
通メモリをアクセスすることによりシーケンシヤルフア
イルのようにアクセスする方式、さらに、バスマスタが
アクセス可能な論理空間をあるアドレス値でローカルメ
モリ、外部メモリに分割し、外部メモリアクセス用に分
割されたメモリ空間をアクセスした場合にアドレス情報
に重みを加えて出力できるようなバンク値を設定できる
回路をシステムバスとのインタフエース部に付加して外
部メモリ空間を指定する方式がある。
In addition, a port for controlling access to external memory is prepared and a common memory at an arbitrary address is accessed by I / O access to access like a sequential file. The accessible logical space is divided into a local memory and an external memory by a certain address value, and when accessing the divided memory space for external memory access, a bank value can be set so that the address information is weighted and output. There is a method of designating an external memory space by adding a circuit to the interface with the system bus.

(発明が解決しようとする課題) しかしながら従来のバス切替方式において、ローカルメ
モリと外部メモリとを固定のアドレス値で分割する場合
は、外部メモリアドレスを指定するときに内部メモリに
割り当てられたアドレス空間を持つ外部メモリは存在で
きなくなり(存在していてもフアームウエア内部のバス
マスタからはローカルメモリに割り付けられた空間であ
るのでアクセスできない)外部メモリのアドレス空間に
無駄な部分が生じてしまう。また、アドレス幅の少ない
バスマスタにアドレス拡張用のレジスタを付加してもロ
ーカルメモリと外部メモリを固定のアドレス値で分割す
る限り外部メモリの無駄な部分を除去できない。
(Problems to be Solved by the Invention) However, in the conventional bus switching method, when the local memory and the external memory are divided by a fixed address value, the address space allocated to the internal memory when the external memory address is specified. The external memory with cannot exist (even if it exists, it cannot be accessed from the bus master inside the firmware because it is the space allocated to the local memory), and there is a waste of the external memory address space. Further, even if a register for address expansion is added to a bus master having a small address width, it is not possible to remove a useless portion of the external memory as long as the local memory and the external memory are divided by a fixed address value.

外部のメモリアクセスをフアームウエア内部に用意され
たI/Oを制御することにより実現する場合はI/O制御がで
きないバスマスタがフアームウエア内にあるとき、その
バスマスタは外部メモリを直接アクセスすることができ
ない。
When external memory access is realized by controlling I / O prepared in firmware, I / O cannot be controlled. When a bus master is in firmware, the bus master cannot directly access external memory. .

さらに予じめローカルメモリと外部メモリとがあるアド
レス値で分割されていて、外部メモリ空間のアクセスを
行なうときに外部メモリのアドレス情報に重みを加える
ことができるバンク値を設定できる回路を付加して外部
メモリ空間をアクセスする場合は、外部メモリに無駄な
メモリ空間ができることはない。しかし、ローカルメモ
リと外部メモリとを分割するアドレス値よりも少ないア
ドレス値しか出力しないバスマスタが存在するときはロ
ーカルメモリまたは外部メモリのいずれしかアクセスで
きないという欠点がある。
Further, in advance, the local memory and the external memory are divided by a certain address value, and a circuit for setting a bank value that can add weight to the address information of the external memory when accessing the external memory space is added. When the external memory space is accessed by using the external memory, no unnecessary memory space is created in the external memory. However, when there is a bus master that outputs an address value smaller than the address value that divides the local memory and the external memory, there is a disadvantage that either the local memory or the external memory can be accessed.

本発明の目的は上述の各欠点を解決したバス切替方式を
提供することにある。
An object of the present invention is to provide a bus switching system which solves the above-mentioned drawbacks.

(課題を解決するための手段) 前記目的を達成するために本発明によるバス切替方式は
それぞれ幅が異なるアドレスを出力する複数のバスマス
タとから構成され、その内部にローカルメモリを有する
フアームウエアが前記ローカルメモリとバス切替部を介
してシステムバスに接続される外部メモリにアクセスす
るように構成されたフアームウエアシステムにおいて、
フアームウエア内部のバスマスタのうち最長でない幅の
アドレスを出力するバスマスタがアドレス情報を出力す
るときはアドレスバス上位側のアドレスビツト不足部分
に所定値を付加するようにし、前記バス切替回路は前記
複数のバスマスタからのアドレス情報と所定のデータと
を比較するアドレス比較手段と、前記外部メモリのアド
レスを任意に設定するためにアドレス情報上位側ビツト
を格納しているアドレス修飾レジスタと、アドレス情報
の上位ビツト部として前記アドレス修飾レジスタの内容
かバスマスタからのアドレス情報の上位ビツトのいずれ
かを選択する上位アドレス選択回路と、アドレス上位ビ
ツト格納部分は前記上位アドレス選択回路出力に接続さ
れ、アドレス下位ビツト格納部分はバスマスタからのア
ドレスバスに接続された外部メモリバスバツフアと、前
記バスマスタからのアドレスバスに接続されたローカル
メモリバスバツフアとを含み、前記アドレス比較手段の
比較の結果、アドレス上位側のビツトが指定のビツトパ
ターン1または2でないときは前記上位アドレス選択回
路は前記バスマスタからのアドレスバスを選択して前記
外部メモリバスバツフアには前記アドレスバス上のアド
レス情報を格納し、前記外部メモリをアクセスし、アド
レス上位側のビツトが指定のビツトパターン1のときは
前記上位アドレス選択回路は前記アドレス修飾レジスタ
の内容を選択して前記外部メモリバスバツフアには前記
アドレスバス上のアドレス情報に重み値を加えたアドレ
ス情報を格納し、前記外部メモリをアクセスし、アドレ
ス上位側のビツトが指定のビツトパターン2のときは前
記ローカルメモリバスバツフアに前記バスマスタからの
アドレスバス上のアドレス情報を格納し、ローカルメモ
リにアクセスするように構成してある。
(Means for Solving the Problems) In order to achieve the above object, the bus switching method according to the present invention is composed of a plurality of bus masters that output addresses having different widths, and firmware that has a local memory therein is provided. In the firmware system configured to access the external memory connected to the system bus via the local memory and the bus switching unit,
When a bus master which outputs an address not having the longest width among the bus masters in firmware, outputs address information, a predetermined value is added to the address bit lacking portion on the upper side of the address bus. Address comparing means for comparing the address information from the bus master with predetermined data, an address modification register storing an address information upper bit for arbitrarily setting the address of the external memory, and an upper bit of the address information. An upper address selection circuit for selecting either the contents of the address modification register or the upper bit of the address information from the bus master as a unit, and the address upper bit storage unit is connected to the output of the upper address selection circuit, and the address lower bit storage unit. Connects to the address bus from the bus master External memory bus buffer and a local memory bus buffer connected to the address bus from the bus master, and as a result of the comparison by the address comparing means, the bit pattern 1 or 2 with the bit on the upper side of the address designated. If not, the upper address selection circuit selects the address bus from the bus master, stores the address information on the address bus in the external memory bus buffer, accesses the external memory, and sets the upper bit of the address. Is a designated bit pattern 1, the upper address selection circuit selects the contents of the address modification register, and the external memory bus buffer stores address information obtained by adding a weight value to the address information on the address bus. Then, the external memory is accessed and the upper bit of the address is the specified bit When the over down 2 stores the address information on the address bus from the bus master to the local memory bus punishment Hua, is arranged to access the local memory.

(実 施 例) 以下、図面を参照して本発明をさらに詳しく説明する。(Example) Hereinafter, the present invention will be described in more detail with reference to the drawings.

第1図は本発明によるバス切替方式の一実施例を示すブ
ロツク図、第2図は第1図のバス切替回路4の詳細を示
した図である。
FIG. 1 is a block diagram showing an embodiment of a bus switching system according to the present invention, and FIG. 2 is a diagram showing details of the bus switching circuit 4 of FIG.

20ビツトのアドレスを出力するバスマスタ1は24ビツト
幅のアドレスバス6にビツト0からビツト19までの20ビ
ツトのアドレスを出力するが、足りない部分の4ビツト
はブルアツプされ、ビツト20からビツト23には1が出力
される。
The bus master 1 that outputs a 20-bit address outputs a 20-bit address from bits 0 to 19 to the 24-bit wide address bus 6, but the missing 4 bits are boosted up, and bits 20 to 23 are output. Is output as 1.

この時、バス切替回路内の比較回路11,12はアドレスバ
ス6のビツト19からビツト23までの値と比較データ13,1
4をそれぞれ比較する。
At this time, the comparison circuits 11 and 12 in the bus switching circuit compare the values from bits 19 to 23 of the address bus 6 with the comparison data 13 and 1.
Compare 4 respectively.

比較回路12は、本例では、“1111X"以外のときに外部選
択信号15をアクテイブにしてアドレスバス6上のアドレ
ス情報を外部メモリバスバツフア18に格納し外部メモリ
アドレスバス7に振り向ける。また比較回路11は“1111
1"のときに外部選択信号15をアクテイブにしてアドレス
バス6上のアドレス情報を外部メモリバスバツフア8に
格納し、外部メモリアドレスバス7に振り向けるが、こ
の場合は24ビツトのアドレス情報のうち上位の5ビツト
をアドレス修飾レジスタ16のデータを使用するように上
位アドレス選択回路に指示する。すなわち、上位5ビツ
ト分については、アドレス修飾レジスタ16の内容を上位
アドレス選択回路17が選択し、外部メモリバスバツフア
18の上位5ビツト部分に格納する。
In this example, the comparator circuit 12 activates the external selection signal 15 at times other than "1111X" to store the address information on the address bus 6 in the external memory bus buffer 18 and direct it to the external memory address bus 7. Further, the comparison circuit 11 is “1111
When it is "1", the external selection signal 15 is activated and the address information on the address bus 6 is stored in the external memory bus buffer 8 and is directed to the external memory address bus 7. In this case, the address information of 24 bits is stored. Of the upper 5 bits, the upper address selection circuit is instructed to use the data of the address modification register 16. That is, for the upper 5 bits, the upper address selection circuit 17 selects the contents of the address modification register 16, External memory bus buffer
Store in the upper 5 bits of 18.

この例ではアドレスビツト6のビツト19からビツト23ま
での値が“11111"のときはパターン1である。
In this example, when the values of the bits 19 to 23 of the address bit 6 are "11111", the pattern 1 is used.

24ビツトのアドレス情報を出力することができるバスマ
スタ2の場合は、アドレスデータのビツト23からビツト
20の4ビツトが“1111"でなければ比較回路12によつて
外部バス7に切り替えられ、アドレス情報は24ビツトと
もにバスマスタ2が出力した値が外部メモリ5に渡され
る。
In the case of the bus master 2 capable of outputting 24-bit address information, the address data bits 23 to
If the 4 bits of 20 are not "1111", they are switched to the external bus 7 by the comparison circuit 12, and as the address information, the value output by the bus master 2 is passed to the external memory 5 with 24 bits.

20ビツト出力のバスマスタ1も24ビツト出力のバスマス
タ2もアドレス情報のビツト23からビツト19までが“11
110"(パターン2)である場合には比較回路11,12とも
に外部にバスを切り替えないためにローカルメモリバス
バツフア19がアクテイブになりローカルメモリ3をアク
セスする。
For both the 20-bit output bus master 1 and the 24-bit output bus master 2, address information bits 23 to 19 are “11”.
In the case of 110 "(Pattern 2), the local memory bus buffer 19 becomes active and the local memory 3 is accessed because the comparators 11 and 12 do not switch the bus to the outside.

アドレス修飾レジスタ16の内容は決められたバスマスタ
によつて書き込まれる。このアドレス修飾によつて外部
バス7をアクセスするときの外部メモリ5のアドレスを
任意に設定できる。
The contents of the address modification register 16 are written by the determined bus master. By this address modification, the address of the external memory 5 when accessing the external bus 7 can be arbitrarily set.

(発明の効果) 以上、説明したように本発明は、フアームウエア内部の
バスマウタのうち最長でないバスマスタがアドレス情報
を出力するときには上位側の足りない部分のアドレスビ
ツトに所定の値を付加するようにし、アドレスバスの上
位側のビツトが指定のビツトパタン1または2でない場
合にはシステムバス(バスマスタからのアドレスバス上
のアドレス情報)によつて外部メモリをアドレスし、指
定のビツトパタン1の場合には別に値を設定可能な重み
を加えたアドレスによつて外部メモリをアクセスするよ
うにし、指定ビツトパタン2の場合はローカルメモリを
アクセスするようにバス切替回路を切替えるように構成
してある。したがつて外部メモリ空間に無駄なアドレス
空間を作ることなく、アドレスバス幅の異なるバスマス
タでもローカルメモリ、外部メモリを自由にアクセスす
ることができる。また、外部バスメモリエリアの全ビツ
ト幅を出力することができるバスマスタは修飾される外
部アドレスとは独立して外部メモリアドレスを出力する
ことができるので各バスマスタ毎にアクセスできるメモ
リエリアに対する制約が少なくなるという利点がある。
(Effect of the Invention) As described above, according to the present invention, when the non-longest bus master of the bus mounter in the firmware outputs the address information, the predetermined value is added to the address bit of the missing portion on the upper side. If the upper bit of the address bus is not the specified bit pattern 1 or 2, the external memory is addressed by the system bus (address information on the address bus from the bus master), and in the case of the specified bit pattern 1 separately. The external memory is accessed by an address to which a weight whose value can be set is added, and in the case of the designated bit pattern 2, the bus switching circuit is switched so as to access the local memory. Therefore, it is possible to freely access the local memory and the external memory even by bus masters having different address bus widths, without creating a wasteful address space in the external memory space. Also, since the bus master that can output the entire bit width of the external bus memory area can output the external memory address independently of the modified external address, there are few restrictions on the memory area that can be accessed by each bus master. Has the advantage that

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

第1図は本発明によるバス切替方式の1実施例を示すブ
ロツク図である。第2図は第1図のバス切替回路の詳細
図である。 1……バスマスタ(アドレス20ビツト出力) 2……バスマスタ(アドレス24ビツト出力) 3……ローカルメモリ、4……バス切替回路 5……外部メモリ、6……アドレスバス 7……外部メモリアドレスバス 8……ローカルメモリアドレスバス 11……アドレス比較回路1 12……アドレス比較回路2 13……アドレス比較データ1 14……アドレス比較データ2 15……外部選択信号 16……アドレス修飾レジスタ 17……上位アドレス選択回路 18……外部メモリバスバツフア 19……ローカルメモリバスバツフア 20……アドレス比較手段
FIG. 1 is a block diagram showing an embodiment of a bus switching system according to the present invention. FIG. 2 is a detailed diagram of the bus switching circuit of FIG. 1 ... Bus master (address 20 bit output) 2 ... Bus master (address 24 bit output) 3 ... Local memory, 4 ... Bus switching circuit 5 ... External memory, 6 ... Address bus 7 ... External memory Address bus 8 ... Local memory address bus 11 ... Address comparison circuit 1 12 ... Address comparison circuit 2 13 ... Address comparison data 1 14 ... Address comparison data 2 15 ... External selection signal 16 ... Address modification register 17 ... Upper address selection circuit 18 …… External memory bus buffer 19 …… Local memory bus buffer 20 …… Address comparison means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】それぞれ幅が異なるアドレスを出力する複
数のバスマスタとから構成され、その内部にローカルメ
モリを有するフアームウエアが、前記ローカルメモリと
バス切替部を介してシステムバスに接続される外部メモ
リにアクセスするように構成されたフアームウエアシス
テムにおいて、フアームウエア内部のバスマスタのうち
最長でない幅のアドレスを出力するバスマスタがアドレ
ス情報を出力するときはアドレスバス上位側のアドレス
ビツト不足部分に所定値を付加するようにし、前記バス
切替回路は前記複数のバスマスタからのアドレス情報と
所定のデータとを比較するアドレス比較手段と、前記外
部メモリのアドレスを任意に設定するためにアドレス情
報上位側ビツトを格納しているアドレス修飾レジスタ
と、アドレス情報の上位ビツト部として前記アドレス修
飾レジスタの内容がバスマスタからのアドレス情報の上
位ビツトのいずれかを選択する上位アドレス選択回路
と、アドレス上位ビツト格納部分は前記上位アドレス選
択回路出力に接続され、アドレス下位ビツト格納部分は
バスマスタからのアドレスバスに接続された外部メモリ
バスバツフアと、前記バスマスタからのアドレスバスに
接続されたローカルメモリバスバツフアとを含み、前記
アドレス比較手段の比較の結果、アドレス上位側のビツ
トが指定のビツトパターン1または2でないときは前記
上位アドレス選択回路は前記バスマスタからのアドレス
バスを選択して前記外部メモリバスバツフアには前記ア
ドレスバス上のアドレス情報を格納し、前記外部メモリ
をアクセスし、アドレス上位側のビツトが指定のビツト
パターン1のときは前記上位アドレス選択回路は前記ア
ドレス修飾レジスタの内容を選択して前記外部メモリバ
スバツフアには前記アドレスバス上のアドレス情報に重
み値を加えたアドレス情報を格納し、前記外部メモリを
アクセスし、アドレス上位側のビツトが指定のビツトパ
ターン2のときは前記ローカルメモリバスバツフアに前
記バスマスタからのアドレスバス上のアドレス情報を格
納し、ローカルメモリにアクセスするように構成したこ
とを特徴とするバス切替方式。
1. An external memory comprising a plurality of bus masters each of which outputs an address having a different width and having a local memory therein, the external memory being connected to the system bus via the local memory and a bus switching unit. In the firmware system configured to access the address, when the bus master that outputs a non-longest width address among the bus masters inside the firmware outputs the address information, a predetermined value is set in the address bit lacking portion on the upper side of the address bus. In addition, the bus switching circuit stores address comparison means for comparing address information from the plurality of bus masters with predetermined data, and an address information upper bit for arbitrarily setting the address of the external memory. Address modification register and address information A high-order address selection circuit that selects one of the high-order bits of the address information from the bus master as the contents of the address modification register as a high-order bit section, and an address high-order bit storage part is connected to the high-order address selection circuit output, and the low-order address The storage portion includes an external memory bus buffer connected to the address bus from the bus master and a local memory bus buffer connected to the address bus from the bus master. If the bit is not the designated bit pattern 1 or 2, the upper address selection circuit selects the address bus from the bus master and stores the address information on the address bus in the external memory bus buffer, Access the memory and set the upper bit of the address In the case of the designated bit pattern 1, the upper address selection circuit selects the contents of the address modification register and stores the address information obtained by adding the weight value to the address information on the address bus in the external memory bus buffer. When the external memory is accessed and the bit on the upper address side is the specified bit pattern 2, the address information on the address bus from the bus master is stored in the local memory bus buffer and the local memory is accessed. Bus switching method characterized by being configured.
JP21571988A 1988-08-30 1988-08-30 Bus switching method Expired - Lifetime JPH0697437B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21571988A JPH0697437B2 (en) 1988-08-30 1988-08-30 Bus switching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21571988A JPH0697437B2 (en) 1988-08-30 1988-08-30 Bus switching method

Publications (2)

Publication Number Publication Date
JPH0262642A JPH0262642A (en) 1990-03-02
JPH0697437B2 true JPH0697437B2 (en) 1994-11-30

Family

ID=16677045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21571988A Expired - Lifetime JPH0697437B2 (en) 1988-08-30 1988-08-30 Bus switching method

Country Status (1)

Country Link
JP (1) JPH0697437B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0789340B2 (en) * 1992-01-02 1995-09-27 インターナショナル・ビジネス・マシーンズ・コーポレイション Method and apparatus for address location determination in a bus-to-bus interface
JP5823097B2 (en) * 2010-04-28 2015-11-25 ブラザー工業株式会社 Electronic circuit, image forming apparatus, and DDR-SDRAM initialization method

Also Published As

Publication number Publication date
JPH0262642A (en) 1990-03-02

Similar Documents

Publication Publication Date Title
US4340932A (en) Dual mapping memory expansion unit
US5966727A (en) Combination flash memory and dram memory board interleave-bypass memory access method, and memory access device incorporating both the same
CA1152212A (en) Main storage configuration control system
JPH04213131A (en) System and method for performing shadowing and remapping for reserved memory of microcomputer
JPH0420492B2 (en)
US4979148A (en) Increasing options in mapping ROM in computer memory space
JPS60157646A (en) Memory bank switching device
EP0840228A2 (en) Programmable memory access
US5280599A (en) Computer system with memory expansion function and expansion memory setting method
JPH0697437B2 (en) Bus switching method
JP3190847B2 (en) Data transfer control device
JPS645341B2 (en)
JPH05313999A (en) Memory controller
JPH04324194A (en) Rom circuit
JPS6343563Y2 (en)
KR100329768B1 (en) Memory addressing device for micro-controller unit
JPS5850B2 (en) Main memory expansion unit access method
JPH0981453A (en) Method for controlling memory and enforcing device therefor
JP2003288267A (en) Address signal outputting device
JPH04268936A (en) Memory device
JP2001175535A (en) Semiconductor memory device and cache memory system using the same
JPH06243045A (en) Cache memory
JPH07262088A (en) Address extension system
JP2000047943A (en) Memory protect system
JPH05127979A (en) Memory address space extending device