JPH04209046A - Memory access circuit - Google Patents

Memory access circuit

Info

Publication number
JPH04209046A
JPH04209046A JP40541790A JP40541790A JPH04209046A JP H04209046 A JPH04209046 A JP H04209046A JP 40541790 A JP40541790 A JP 40541790A JP 40541790 A JP40541790 A JP 40541790A JP H04209046 A JPH04209046 A JP H04209046A
Authority
JP
Japan
Prior art keywords
memory
memory access
segment
information
register
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
JP40541790A
Other languages
Japanese (ja)
Inventor
Motoo Nishihara
西原 基夫
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 JP40541790A priority Critical patent/JPH04209046A/en
Publication of JPH04209046A publication Critical patent/JPH04209046A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To protect a program from a runaway in case of stack area destruction by dividing a memory by use register segments at the time of memory access and extending a maximum memory area. CONSTITUTION:The memory access circuit has a CPU 1 which sends out address information 102 and use register segment information 101 indicating a register segment in current use at the time of the memory access. Then a selecting circuit 104 sends out addresses to memories 5a-5d according to the pieces of information 101 and 102 at the time of the memory access. Consequently, a 1024kbyte memory is made to correspond to respective code, data, stack, and extra segments of registers and the memory area can be extended up to 4096 kbytes in total.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0O01】0O01】

【技術分野】本発明は、メモリアクセス回路に関し、特
に8086系CPUを含むシステムにおけるメモリアク
セス回路に関する。 [0002]
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory access circuit, and more particularly to a memory access circuit in a system including an 8086 CPU. [0002]

【従来技術】一般に、8086系CPUにおいては、メ
モリの読出し・書込みサイクルの2サイクル目以降のタ
イミングに、使用レジスタセグメント情報がアドレスバ
スに送出される。これは、メモリアクセスにおいて、ど
のレジスタを使用しているのかを示すステータス情報で
ある。 [0003] 8086系CPUでは、セグメントアド
レッシング方式を採っており、コードセグメント(C3
)、データセグメント(DS)、スタックセグメント(
SS)、エキストラセグメント(ES)の4つのセグメ
ントが存在する。 [0004] 8086系CPUを用いたメモリアクセ
ス回路の一般的な構成について図2を用いて説明する。 図において、従来のメモリアクセス回路は、8086系
CPUIの出力するアドレス情報1O2よりアドレス信
号108を出力するアドレスラッチ2と、8086系C
PUの出力するバスコントロール情報103よりバスコ
ントロール信号207を出力するバスコントローラ3と
、メモリセレクト信号205を出力するデコーダ4とを
有しており、メモリ5a、5bに対するアクセスを制御
するものである。 [0005]かかる構成において、8086系CPUI
は、メモリアクセス時に、アドレス情報102とバスコ
ントロール情報103とを出力する。アドレスラッチ2
はアドレス情報1O2を入力してアドレス信号108を
出力し、バスコントローラ3はバスコントロール情報1
03を入力してバスコントロール信号207を出力する
。デコーダ4はアドレス信号108及びバスコントロー
ル信号207を入力し、メモリ5a、5bのうち使用す
るメモリを選別し選別信号205を出力する。各メモリ
は選別信号205とバスコントロール信号207とを入
力し、8086系cPUとの間で、データバス105を
通してデータのリード・ライトが行われる。 [0006]つまり、一般に8086系のCPUのプロ
グラムにおいては、メモリ領域は1024Kbyteエ
リアに限定し、その代わりに使用するレジスタとは無関
係にどのアドレスにもアクセスできることを想定する場
合が多く、ハードウェアもそのように作成されている。 [0007]また、アドレス情報は20ビツトであるた
め、1048 Kビット以上のアドレスを特定すること
ができないのである。 [0008]よって、上述した従来のメモリアクセス回
路では、最大使用メモリ領域が1024Kbyte以下
になるという欠点がある。また、レジスタのうちスタッ
クセグメント以外のセグメントを使用してスタックエリ
アのメモリ領域をアクセスすることが可能なために、ス
タックエリアを破壊してプログラム暴走が発生する危険
性を有するという欠点があった。 [0009]
2. Description of the Related Art In general, in an 8086-based CPU, used register segment information is sent to an address bus at timings after the second cycle of a memory read/write cycle. This is status information indicating which register is used in memory access. [0003] The 8086 series CPU uses a segment addressing method, and the code segment (C3
), data segment (DS), stack segment (
There are four segments: SS) and extra segment (ES). [0004] A general configuration of a memory access circuit using an 8086-based CPU will be described with reference to FIG. In the figure, the conventional memory access circuit includes an address latch 2 that outputs an address signal 108 based on address information 1O2 output from an 8086 CPU, and an 8086 CPU
It has a bus controller 3 that outputs a bus control signal 207 based on the bus control information 103 output from the PU, and a decoder 4 that outputs a memory select signal 205, and controls access to the memories 5a and 5b. [0005] In such a configuration, the 8086 CPU
outputs address information 102 and bus control information 103 during memory access. address latch 2
inputs the address information 1O2 and outputs the address signal 108, and the bus controller 3 inputs the bus control information 1O2 and outputs the address signal 108.
03 and outputs the bus control signal 207. The decoder 4 inputs the address signal 108 and the bus control signal 207, selects the memory to be used from among the memories 5a and 5b, and outputs a selection signal 205. Each memory receives a selection signal 205 and a bus control signal 207, and reads and writes data to and from the 8086-series cPU through the data bus 105. [0006] In other words, in general, in programs for 8086 series CPUs, the memory area is often limited to a 1024 Kbyte area, and instead it is often assumed that any address can be accessed regardless of the register used, and the hardware also It is created that way. [0007] Furthermore, since the address information is 20 bits, it is not possible to specify an address of 1048 K bits or more. [0008] Therefore, the conventional memory access circuit described above has a drawback that the maximum usable memory area is 1024 Kbytes or less. Furthermore, since it is possible to access the memory area of the stack area using a segment other than the stack segment among the registers, there is a drawback that there is a risk that the stack area may be destroyed and a program runaway may occur. [0009]

【発明の目的】本発明は上述した従来の欠点を解決する
ためになされたものであり、その目的は最大使用メモリ
領域が大きく、かつプログラムの暴走を防止できるメモ
リアクセス回路を提供することである。 [00101
OBJECTS OF THE INVENTION The present invention has been made to solve the above-mentioned conventional drawbacks, and its purpose is to provide a memory access circuit that has a large maximum usable memory area and can prevent runaway programs. . [00101

【発明の構成]本発明によるメモリアクセス回路は、メ
モリアクセスの時、アドレス情報と現在使用中のレジス
タのセグメントを示す使用レジスタセグメント情報とを
送出するCPUを含むメモリアクセス回路であって、メ
モリアクセスの時、前記アドレス情報及び前記使用レジ
スタセグメント情報に応じて該メモリへのアドレスを送
出するアクセス制御手段を有することを特徴とする。 [00111 【実施例]次に、本発明について図面を参照して説明す
る。 [0012]図1は本発明によるメモリアクセス回路の
一実施例の構成を示すブロック図であり、図2と同等部
分は同一符号により示されている。図において、本発明
のメモリアクセス回路は8086系CPUIから送出さ
れる使用レジスタセグメント情報101を利用して最大
使用メモリ領域を拡張するというものであり、選択回路
104が追加された構成となっている。 [00131つまり、読出し・書込みサイクルの1サイ
クル目にアドレスバスに出力される20ビツトのアドレ
ス情報と、2サイクル目以降に同バスに出力される2ビ
ツトの使用レジスタセグメント情報との合計22ビツト
(=4096Kbyte)によりメモリのアドレスを特
定するため、使用しつるメモリ領域を拡張できるのであ
る。 [0014]これを実現するために必要なハードウェア
構成としては、周知のD型フリップフロップ(以下、F
Fと略す)を22個設ければ良い。そして、読出し・書
込みサイクルの1サイクル目の開始タイミングで20ビ
ツトのアドレス情報を20個のD型FFでラッチし、さ
らに同2サイクル目の開始タイミングで2ビツトの使用
レジスタセグメント情報を2個のD型FFでラッチして
合計22ビツトの情報をデコーダ4に出力すれば良いの
である。 [00151次に、回路の動作について説明する。 [0016] 8086系CPUIは、メモリアクセス
時に使用レジスタセグメント情報101を出力する。こ
れが上述の2ビツトである。セグメント情報101は選
択回路104に入力され、選択回路104は使用レジス
タセグメントを判定して選択信号107を出力する。 [0017]また、8086系CPUIは、メモリアク
セス時には使用レジスタセグメント情報送出前にアドレ
ス情報1O2を出力する。これが上述の20ビツトであ
る。アドレスラッチ2はこのアドレス情報102を入力
しアドレス信号108を出力する。 [0018] 8086系CPUIは、メモリアクセス
時にバスコントロール情報103を出力する。バスコン
トローラ3はバスコントロール情報103を入力し、バ
スコントロール信号106を出力する。デコーダ4は選
択信号107、アドレス信号108及びバスコントロー
ル信号106を入力し、使用レジスタセグメント別に異
なるメモリとなるように分割して、メモリ選別信号10
9を出力する。つまり、レジスタの各セグメントとメモ
リ5a〜5dとが対応してアクセスが行われることにな
る。そして、8086系CPUIはデータバス105を
通して各メモリ5a〜5dにメモリアクセスを行うので
ある。 [0019]ようするに、本実施例では、レジスタのコ
ードセグメント、データセグメント、スタックセグメン
ト、エキストラセグメントの各々に1024Kbyte
を対応させているため、1024X 4 =4096K
byteにメモリ領域を拡張できるのである。ただし、
各セグメントにメモリを対応させているため、ある1つ
のアドレスに対しては、異なるセグメントを使用してア
クセスすることはできない。したがって、ソフトウェア
のプログラムもそれを認識した上で作成しなければなら
ない。 [00201なお、本実施例においては、8086系C
PUにおけるメモリアクセス回路について説明したが、
他のCPUについても本発明が適用できることは明らか
である。 [0021] 【発明の効果】以上説明したように本発明は、メモリア
クセス時の使用レジスタセグメント別にメモリを分割し
たので、最大使用メモリ領域を拡張できるという効果が
ある。また、スタック領域をレジスタのスタックセグメ
ント以外のセグメントを使用してアクセスすることがで
きないため、スタック領域破壊によりプログラム暴走に
対する保護が可能になるという効果がある。
[Structure of the Invention] A memory access circuit according to the present invention is a memory access circuit including a CPU that sends out address information and used register segment information indicating a segment of a register currently in use at the time of memory access. In this case, the memory device is characterized by comprising access control means for sending an address to the memory according to the address information and the used register segment information. [00111] [Example] Next, the present invention will be explained with reference to the drawings. [0012] FIG. 1 is a block diagram showing the configuration of an embodiment of a memory access circuit according to the present invention, and parts equivalent to those in FIG. 2 are designated by the same reference numerals. In the figure, the memory access circuit of the present invention expands the maximum usable memory area by using the used register segment information 101 sent from the 8086 CPU, and has a configuration in which a selection circuit 104 is added. . [00131 In other words, a total of 22 bits (20 bits of address information output to the address bus in the first cycle of the read/write cycle and 2 bits of used register segment information output to the same bus in the second and subsequent cycles) = 4096 Kbytes), the memory area that can be used can be expanded. [0014] The hardware configuration required to realize this is the well-known D-type flip-flop (hereinafter referred to as F
It is sufficient to provide 22 (abbreviated as F). Then, at the start timing of the first cycle of the read/write cycle, 20 bits of address information are latched by 20 D-type FFs, and furthermore, at the start timing of the second cycle, 2 bits of used register segment information are latched by two FFs. All that is required is to latch it with a D-type FF and output a total of 22 bits of information to the decoder 4. [00151 Next, the operation of the circuit will be explained. [0016] The 8086 series CPU outputs used register segment information 101 when accessing memory. These are the two bits mentioned above. Segment information 101 is input to selection circuit 104, which determines the register segment to be used and outputs selection signal 107. [0017] Furthermore, the 8086-based CPUI outputs address information 1O2 before sending the used register segment information during memory access. This is the 20 bits mentioned above. The address latch 2 inputs this address information 102 and outputs an address signal 108. [0018] The 8086-based CPUI outputs bus control information 103 when accessing memory. The bus controller 3 receives bus control information 103 and outputs a bus control signal 106. The decoder 4 inputs a selection signal 107, an address signal 108, and a bus control signal 106, and divides the memory into different memories depending on the register segment used.
Outputs 9. In other words, each segment of the register and the memories 5a to 5d are accessed in correspondence. The 8086 series CPUI then accesses each memory 5a to 5d through the data bus 105. [0019] In this embodiment, each of the code segment, data segment, stack segment, and extra segment of the register has 1024 Kbytes.
1024X 4 = 4096K
The memory area can be expanded to bytes. however,
Since each segment corresponds to a memory, a single address cannot be accessed using different segments. Therefore, software programs must be created with this in mind. [00201 In this example, 8086 series C
I explained the memory access circuit in the PU,
It is clear that the present invention is applicable to other CPUs as well. [0021] As described above, the present invention has the effect that the maximum usable memory area can be expanded because the memory is divided according to register segments used during memory access. Furthermore, since the stack area cannot be accessed using segments other than the register stack segment, destruction of the stack area has the effect of making it possible to protect against program runaway.

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

【図1】本発明の実施例によるメモリアクセス回路の構
成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a memory access circuit according to an embodiment of the present invention.

【図2】従来のメモリアクセス回路の構成を示すブロッ
ク図である。
FIG. 2 is a block diagram showing the configuration of a conventional memory access circuit.

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

1 8086系CPU 2 アドレスラッチ 3 バスコントローラ 4 デコーダ 5a〜5d メモリ 101  使用レジスタセグメント情報1O2アドレス
情報 104  選択回路
1 8086 series CPU 2 Address latch 3 Bus controller 4 Decoders 5a to 5d Memory 101 Used register segment information 1O2 address information 104 Selection circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】メモリアクセスの時、アドレス情報と現在
使用中のレジスタのセグメントを示す使用レジスタセグ
メント情報とを送出するCPUを含むメモリアクセス回
路であって、メモリアクセスの時、前記アドレス情報及
び前記使用レジスタセグメント情報に応じて該メモリへ
のアドレスを送出するアクセス制御手段を有することを
特徴とするメモリアクセス回路。
1. A memory access circuit including a CPU that transmits address information and used register segment information indicating a segment of a register currently in use at the time of memory access, the memory access circuit including the CPU transmitting address information and used register segment information indicating a segment of a register currently in use. A memory access circuit comprising access control means for sending an address to the memory according to used register segment information.
JP40541790A 1990-12-05 1990-12-05 Memory access circuit Pending JPH04209046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP40541790A JPH04209046A (en) 1990-12-05 1990-12-05 Memory access circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP40541790A JPH04209046A (en) 1990-12-05 1990-12-05 Memory access circuit

Publications (1)

Publication Number Publication Date
JPH04209046A true JPH04209046A (en) 1992-07-30

Family

ID=18515015

Family Applications (1)

Application Number Title Priority Date Filing Date
JP40541790A Pending JPH04209046A (en) 1990-12-05 1990-12-05 Memory access circuit

Country Status (1)

Country Link
JP (1) JPH04209046A (en)

Similar Documents

Publication Publication Date Title
US5301278A (en) Flexible dynamic memory controller
US4870562A (en) Microcomputer capable of accessing internal memory at a desired variable access time
JPH0212541A (en) Computing system and operation thereof
EP0829804B1 (en) Synchronous semiconductor memory device having macro command storage and execution method therefor
JPH05197619A (en) Memory control circuit for multi-cpu
JPH04209046A (en) Memory access circuit
JP3462245B2 (en) Central processing unit
US6651152B1 (en) Microcomputer including download circuit controlling data download to plurality of memories
JPH06274462A (en) Asynchronous writing system for shared memory
JPH07191905A (en) Information processor
JPH064398A (en) Information processor
JP3222647B2 (en) Automatic memory bank switching system
KR940011045B1 (en) Interrupt vector addressing method in micro controller unit
JP2000029508A (en) Programmable controller
JPH0232431A (en) Information processor
JP2002318779A (en) Device, and access method for its register
JPH0683986A (en) Single chip microcomputer
JPH05197612A (en) Data access circuit
JPH11176165A (en) Sequential-access semiconductor memory device
JPH05266656A (en) Dynamic memory
JPH02302855A (en) Memory control system
JPH03158923A (en) Memory controller
JPH05151076A (en) Memory address extension control system
JP2004118595A (en) Access control device and access control method
JPS6091461A (en) Expanding device for data address space of microprocessor