JPH05197615A - Rom/ram switching circuit for starting cpu - Google Patents

Rom/ram switching circuit for starting cpu

Info

Publication number
JPH05197615A
JPH05197615A JP35283791A JP35283791A JPH05197615A JP H05197615 A JPH05197615 A JP H05197615A JP 35283791 A JP35283791 A JP 35283791A JP 35283791 A JP35283791 A JP 35283791A JP H05197615 A JPH05197615 A JP H05197615A
Authority
JP
Japan
Prior art keywords
rom
ram
switching circuit
cpu
data
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
JP35283791A
Other languages
Japanese (ja)
Inventor
Yoshinobu Fukuda
吉展 福田
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.)
Ando Electric Co Ltd
Original Assignee
Ando Electric Co 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 Ando Electric Co Ltd filed Critical Ando Electric Co Ltd
Priority to JP35283791A priority Critical patent/JPH05197615A/en
Publication of JPH05197615A publication Critical patent/JPH05197615A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To unnecessitate another RAM by connecting read signals to a ROM and a RAM by switching it at a switching circuit while connecting select signals to the ROM and the RAM. CONSTITUTION:A select signal 11 is operated so as to access a ROM 4 and a RAM 5 at the same time, and a read signal 13 is connected to either the ROM 4 or the RAM 5 by a switching circuit 3A. First, the switching circuit 3A is connected to the ROM 4 and the contents of ROM areas, namely, vector data and programs are written in the ROM 4. When starting a CPU 1, data to be read are data from the ROM 4, and the programs are started by the vector data in the ROM areas. In this case, when data are written in the address spaces of the ROM areas, data are written in the RAM 5. Afterwards, the read signal 13 is switched to the RAM 5 by the switching circuit 3A so that operations can be continued only by the RAM 5 afterwards.

Description

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

【0001】[0001]

【産業上の利用分野】外部メモリを使用するCPU回路
では、CPU起動時はROMに内蔵されたプログラムで
動作し、起動後はROM領域の内容をRAMに書き換
え、RAMにより動作するので、ROMをRAMに切り
換える。この発明は、このような場合に使用するCPU
起動用ROM/RAM切換回路についてのものである。
BACKGROUND OF THE INVENTION In a CPU circuit using an external memory, a program stored in a ROM operates at the time of starting the CPU, and after starting, the contents of the ROM area are rewritten to the RAM to operate by the RAM. Switch to RAM. The present invention is a CPU used in such a case.
The present invention relates to a boot ROM / RAM switching circuit.

【0002】[0002]

【従来の技術】68000などのCPUでは、起動時に
固有のアドレス空間にプログラム開始アドレスやスタッ
クポインタ、各種割り込みのベクタテーブル情報(以
下、ベクタデータと略称する。)及び実行プログラムを
用意する。このため、これらの内容をROM等に書き込
み、固有アドレスに配置する。しかし、リアルタイム制
御などを目的としたアプリケーションでは、割り込みベ
クタの値等をダイナミックにプログラムにより書き換え
て使用する。この場合、ベクタテーブル領域を書き換え
られるようにするため、ROMのアドレス空間をRAM
に切り換える。
2. Description of the Related Art In a CPU such as 68000, a program start address, a stack pointer, vector table information (hereinafter abbreviated as vector data) of various interrupts, and an execution program are prepared in a unique address space at startup. Therefore, these contents are written in the ROM or the like and arranged at the unique address. However, in an application intended for real-time control or the like, the value of the interrupt vector is dynamically rewritten by a program and used. In this case, the address space of the ROM is changed to the RAM so that the vector table area can be rewritten.
Switch to.

【0003】次に、従来技術によるROM/RAM切換
回路の構成を図2により説明する。図2の1はCPU、
2はアドレスデコード回路、3Bは切換回路、4はRO
M、5と6はRAMである。CPU1からのアドレス及
び制御情報からアドレスデコード回路2は選択信号11
と選択信号12を作成する。選択信号11はCPU1が
起動時にベクタデータを参照するために必要な固有アド
レス空間を示すデコード信号であり、切換回路3Bによ
りROM4かRAM5に送られる。選択信号12はRA
M6に送られる。選択信号11・12は接続されたRO
M4、RAM5・6がアクセスできるように作用する。
この他に、CPU1からROM4とRAM5・6にリー
ド信号13が送られる。
Next, the structure of a ROM / RAM switching circuit according to the prior art will be described with reference to FIG. 1 in FIG. 2 is a CPU,
2 is an address decoding circuit, 3B is a switching circuit, 4 is RO
M, 5 and 6 are RAMs. From the address and control information from the CPU 1, the address decode circuit 2 selects the selection signal 11
And the selection signal 12 is created. The selection signal 11 is a decode signal indicating a unique address space required for the CPU 1 to refer to the vector data at the time of activation, and is sent to the ROM 4 or the RAM 5 by the switching circuit 3B. The selection signal 12 is RA
Sent to M6. Selection signals 11 and 12 are connected to RO
It works so that M4 and RAM5, 6 can be accessed.
In addition to this, the read signal 13 is sent from the CPU 1 to the ROM 4 and the RAMs 5 and 6.

【0004】次に、図2の切換マップを図3により説明
する。切換回路3Bは、最初はROM4に接続されてお
り、ROM4には、図3の左上側のROM領域41の内
容、すなわちベクタデータ4Aとプログラム4Bが書き
込まれている。
Next, the switching map of FIG. 2 will be described with reference to FIG. The switching circuit 3B is initially connected to the ROM 4, and the contents of the ROM area 41 on the upper left side of FIG. 3, that is, the vector data 4A and the program 4B are written in the ROM 4.

【0005】CPU1を起動するときは、ベクタデータ
4Aによりプログラム4Bが起動される。このベクタデ
ータ4Aとプログラム4Bを図2のRAM5に移動させ
るため、まず図2のRAM6にコピーする。図3の左下
側のRAM領域61にはコピーされたベクタデータ6A
と、プログラム6Bが格納されたことになる。
When the CPU 1 is started up, the program 4B is started up by the vector data 4A. In order to move the vector data 4A and the program 4B to the RAM 5 of FIG. 2, they are first copied to the RAM 6 of FIG. Vector data 6A copied to the RAM area 61 on the lower left side of FIG.
Then, the program 6B is stored.

【0006】次に、図2の切換回路3BをRAM5に切
り換える。これにより図3の左上側のROM領域41は
なくなり、代わりに図3の右上側のRAM領域51が現
れる。次に、図3の左下側のRAM領域61にコピーし
たベクタテーブル6Aとプログラム6Bを図3の右上の
RAM領域51にコピーする。以上の操作によりROM
4とRAM5を切り換えることができる。
Next, the switching circuit 3B shown in FIG. 2 is switched to the RAM 5. As a result, the ROM area 41 on the upper left side in FIG. 3 disappears, and the RAM area 51 on the upper right side in FIG. 3 appears instead. Next, the vector table 6A and the program 6B copied to the lower left RAM area 61 of FIG. 3 are copied to the upper right RAM area 51 of FIG. ROM by the above operation
4 and RAM 5 can be switched.

【0007】[0007]

【発明が解決しようとする課題】図2では、ROM4と
RAM5を切り換えるために、図3の右上に示す別のメ
モリエリアが必要であり、プログラム4Aは2度コピー
されるので、プログラム制御が複雑になる。この発明
は、選択信号11によりROM4とRAM5を同時にア
クセスし、リード信号13を切換回路3Aで切り換え、
CPU1を起動するときは切換回路3Aの出力をROM
4に接続し、CPU1を起動後は切換回路3Aの出力を
RAM5に接続し、図2のRAM6を不要にするCPU
起動用ROM/RAM切換回路の提供を目的とする。
In FIG. 2, another memory area shown in the upper right of FIG. 3 is required to switch between the ROM 4 and the RAM 5, and since the program 4A is copied twice, the program control is complicated. become. According to the present invention, the ROM 4 and the RAM 5 are simultaneously accessed by the selection signal 11 and the read signal 13 is switched by the switching circuit 3A.
The output of the switching circuit 3A is stored in the ROM when the CPU 1 is started.
4, the output of the switching circuit 3A is connected to the RAM 5 after the CPU 1 is started, and the RAM 6 of FIG. 2 is unnecessary.
An object is to provide a boot ROM / RAM switching circuit.

【0009】[0009]

【課題を解決するための手段】この目的を達成すため、
この発明では、CPU1からのアドレス及び制御情報か
らCPU1が起動時にベクタデータを参照するのに必要
な固有アドレス空間を示す選択信号11を作成するアド
レスデコード回路2と、CPU1からのリード信号13
を入力とする切換回路3Aと、切換回路3Aの切換出力
と選択信号11が供給されるROM4と、切換回路3A
の切換出力と選択信号11が供給されるRAM5とを備
え、選択信号11によりROM4とRAM5が同時にア
クセスされ、CPU1を起動するときは切換回路3Aの
出力をROM4に接続し、CPU1をリードするデータ
がROM4からのデータとし、ROM4の領域のベクタ
データによりプログラムが起動され、ROM4の領域の
アドレス空間に書き込みをするとデータはRAM5に書
き込まれ、CPU1が起動後は切換回路3Aの出力をR
AM5に接続してリード信号13をRAM5に切り換
え、RAM5だけで動作を続ける。
[Means for Solving the Problems] To achieve this object,
According to the present invention, the address decoding circuit 2 for creating the selection signal 11 indicating the unique address space required for the CPU 1 to refer to the vector data at the time of activation from the address and control information from the CPU 1, and the read signal 13 from the CPU 1.
Switching circuit 3A that receives the input, ROM 4 to which the switching output of switching circuit 3A and selection signal 11 are supplied, and switching circuit 3A
And the RAM 5 to which the selection signal 11 is supplied, the ROM 4 and the RAM 5 are simultaneously accessed by the selection signal 11, and when the CPU 1 is started, the output of the switching circuit 3A is connected to the ROM 4 and the data read by the CPU 1 is read. Is the data from the ROM 4, the program is started by the vector data in the area of the ROM 4, and when the program is written in the address space of the area of the ROM 4, the data is written in the RAM 5, and after the CPU 1 is started, the output of the switching circuit 3A is R
The read signal 13 is switched to the RAM 5 by connecting to the AM 5, and the RAM 5 alone continues the operation.

【0010】[0010]

【作用】次に、この発明によるROM/RAM切換回路
の構成を図1により説明する。図1の3Aは切換回路で
あり、その他は図2と同じものである。すなわち、図2
では選択信号11・12を切換回路3Bで切り換えてR
OM4とRAM5に接続するのに対し、図1では選択信
号11をROM4とRAM5に接続したままにし、リー
ド信号13を切換回路3Aで切り換えてROM4とRA
M5に接続する。図2のRAM6は図1にはない。
Next, the structure of the ROM / RAM switching circuit according to the present invention will be described with reference to FIG. Reference numeral 3A in FIG. 1 is a switching circuit, and the others are the same as those in FIG. That is, FIG.
Then, select signals 11 and 12 are switched by the switching circuit 3B and R
In contrast to the connection to the OM4 and the RAM5, in FIG. 1, the selection signal 11 is left connected to the ROM4 and the RAM5, and the read signal 13 is switched by the switching circuit 3A so that the ROM4 and the RA5 are connected.
Connect to M5. The RAM 6 shown in FIG. 2 is not shown in FIG.

【0011】選択信号11はROM4とRAM5を同時
にアクセスするように作用し、リード信号13は切換回
路3AによりROM4またはRAM5のどちらかに接続
される。
The selection signal 11 acts to simultaneously access the ROM 4 and the RAM 5, and the read signal 13 is connected to either the ROM 4 or the RAM 5 by the switching circuit 3A.

【0012】はじめに切換回路3AはROM4に接続さ
れる。ROM4には図3の左上側のROM領域41の内
容つまりベクタデータ4Aとプログラム4Bが書き込ま
れる。CPU1を起動するときは、リードするデータは
ROM4からのデータとなり、ROM領域41のベクタ
データ4Aによりプログラム4Bが起動される。ここで
ROM領域41のアドレス空間に書き込みをすると、デ
ータは図3の右上のRAM5に書き込まれる。
First, the switching circuit 3A is connected to the ROM 4. The contents of the ROM area 41 on the upper left side of FIG. 3, that is, the vector data 4A and the program 4B are written in the ROM 4. When the CPU 1 is activated, the data to be read becomes the data from the ROM 4, and the program 4B is activated by the vector data 4A in the ROM area 41. If data is written in the address space of the ROM area 41, the data is written in the RAM 5 at the upper right of FIG.

【0013】すなわち、同じアドレスでROM4から読
み出され、RAM5に書き込まれる。したがって、図3
の左上のROM領域41内にあるプログラム4Aは、自
身のROM領域41のデータを読み出し、同じアドレス
に書き込むことで、ROM領域41の内容を図3の右上
に示すRAM領域51にコピーする。その後、切換回路
3Aでリード信号13をRAM5に切り換えることによ
り、その後はRAW5だけで動作を続けることができ
る。
That is, the same address is read from the ROM 4 and written in the RAM 5. Therefore, FIG.
The program 4A in the upper left ROM area 41 reads the data in its own ROM area 41 and writes the data in the same address to copy the contents of the ROM area 41 to the RAM area 51 shown in the upper right of FIG. After that, by switching the read signal 13 to the RAM 5 by the switching circuit 3A, the operation can be continued only by the RAW 5 thereafter.

【0014】[0014]

【発明の効果】この発明によれば、選択信号11により
ROM4とRAM5を同時にアクセスし、リード信号1
3を切換回路3Aで切り換え、CPU1を起動するとき
は切換回路3Aの出力をROM4に接続し、CPU1を
起動後は切換回路3Aの出力をRAM5に接続するの
で、図2のRAM6を不要にすることができる。また、
プログラムの移動や二度の転送をしないので、シンプル
で高速なプログラムを作成することができる。
According to the present invention, the ROM 4 and the RAM 5 are simultaneously accessed by the selection signal 11, and the read signal 1
2 is switched by the switching circuit 3A, the output of the switching circuit 3A is connected to the ROM 4 when the CPU 1 is started, and the output of the switching circuit 3A is connected to the RAM 5 after the CPU 1 is started, so that the RAM 6 of FIG. 2 is unnecessary. be able to. Also,
Since programs are not moved or transferred twice, simple and fast programs can be created.

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

【図1】この発明によるCPU起動用ROM/RAM切
換回路の構成図である。
FIG. 1 is a configuration diagram of a CPU boot ROM / RAM switching circuit according to the present invention.

【図2】従来技術によるCPU起動用ROM/RAM切
換回路の構成図である。
FIG. 2 is a configuration diagram of a ROM / RAM switching circuit for starting a CPU according to a conventional technique.

【図3】図2のデータ領域の移動を示すアドレスマップ
である。
FIG. 3 is an address map showing movement of the data area of FIG.

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

1 CPU 2 アドレスデコード回路 3A 切換回路 4 ROM 5 RAM 6 RAM 11 選択信号 12 選択信号 13 リード信号 1 CPU 2 Address Decode Circuit 3A Switching Circuit 4 ROM 5 RAM 6 RAM 11 Selection Signal 12 Selection Signal 13 Read Signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 CPU(1) からのアドレス及び制御情報
からCPU(1) が起動時にベクタデータを参照するのに
必要な固有アドレス空間を示す選択信号(11)を作成する
アドレスデコード回路(2) と、 CPU(1) からのリード信号(13)を入力とする切換回路
(3A)と、 切換回路(3A)の切換出力と選択信号(11)が供給されるR
OM(4) と、 切換回路(3A)の切換出力と選択信号(11)が供給されるR
AM(5) とを備え、 選択信号(11)によりROM(4) とRAM(5) が同時にア
クセスされ、 CPU(1) を起動するときは切換回路(3A)の出力をRO
M(4) に接続し、CPU(1) をリードするデータがRO
M(4) からのデータとし、ROM(4) の領域のベクタデ
ータによりプログラムが起動され、ROM(4) の領域の
アドレス空間に書き込みをするとデータはRAM(5) に
書き込まれ、 CPU(1) が起動後は切換回路(3A)の出力をRAM(5)
に接続してリード信号(13)をRAM(5) に切り換え、R
AM(5) だけで動作を続けることを特徴とするCPU起
動用ROM/RAM切換回路。
1. An address decoding circuit (2) for generating a selection signal (11) indicating a unique address space required for the CPU (1) to refer to vector data at the time of activation from the address and control information from the CPU (1). ) And the read signal (13) from the CPU (1) are input
(3A), switching circuit (3A) switching output and selection signal (11) are supplied R
The OM (4), the switching output of the switching circuit (3A) and the selection signal (11) are supplied to the R
The AM (5) is provided, and the ROM (4) and RAM (5) are simultaneously accessed by the selection signal (11), and when the CPU (1) is started, the output of the switching circuit (3A) is changed to RO.
The data that connects to M (4) and reads CPU (1) is RO
The data is written from M (4), the program is started by the vector data in the area of ROM (4), and when the program is written in the address space of the area of ROM (4), the data is written in RAM (5) and the CPU (1 ) Is activated, the output of the switching circuit (3A) is transferred to the RAM (5)
Connect to and switch the read signal (13) to RAM (5).
A ROM / RAM switching circuit for starting a CPU, which continues to operate only by AM (5).
JP35283791A 1991-12-16 1991-12-16 Rom/ram switching circuit for starting cpu Pending JPH05197615A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35283791A JPH05197615A (en) 1991-12-16 1991-12-16 Rom/ram switching circuit for starting cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35283791A JPH05197615A (en) 1991-12-16 1991-12-16 Rom/ram switching circuit for starting cpu

Publications (1)

Publication Number Publication Date
JPH05197615A true JPH05197615A (en) 1993-08-06

Family

ID=18426779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35283791A Pending JPH05197615A (en) 1991-12-16 1991-12-16 Rom/ram switching circuit for starting cpu

Country Status (1)

Country Link
JP (1) JPH05197615A (en)

Similar Documents

Publication Publication Date Title
JPH02156334A (en) Information processor
JPH05197615A (en) Rom/ram switching circuit for starting cpu
JPH04242433A (en) Microprocessor
JPS59226958A (en) Memory device
JPH1083367A (en) Peripheral device controller
JPH05173676A (en) Disk power source control system
JP2985244B2 (en) Information processing device
JP2002149410A (en) System and method for starting control program
JPS6249463A (en) Patching system of input output controller
JPH0652010A (en) Testing circuit
JPH064310A (en) System for switching plural operating system
JPS60254344A (en) Assigning method of memory address
JPH09160528A (en) Micro-controller
JPS60225934A (en) Information processor
JPH04312134A (en) Information processor
JPS63100534A (en) Picture switching system for multijob
JPH11119813A (en) Controller
JPH01200450A (en) Memory extending circuit
JPH0310344A (en) Memory extending system
JPS61133451A (en) Memory system
JPS63184833A (en) Microcomputer
JPH05108315A (en) Information processor
JPH06103471B2 (en) Program evaluation device
JPH0449456A (en) Microcomputer system
JPH02252039A (en) Memory control system for processor