JPH05334192A - Cpu address translation system - Google Patents

Cpu address translation system

Info

Publication number
JPH05334192A
JPH05334192A JP4164364A JP16436492A JPH05334192A JP H05334192 A JPH05334192 A JP H05334192A JP 4164364 A JP4164364 A JP 4164364A JP 16436492 A JP16436492 A JP 16436492A JP H05334192 A JPH05334192 A JP H05334192A
Authority
JP
Japan
Prior art keywords
address
segment
register
linear
offset
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
JP4164364A
Other languages
Japanese (ja)
Inventor
Hidekazu Saikaichi
秀和 西開地
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 JP4164364A priority Critical patent/JPH05334192A/en
Publication of JPH05334192A publication Critical patent/JPH05334192A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To make an effective use of a program resource prepared corresponding to a plurarity of memory management systems by translating one part of values in advance so as to make an accurate logic address translation in the other system. CONSTITUTION:A CPU 1 reads a base address by referring to a segment information block 2 indicated by a segment register 11 when a segment and an offset are specified, makes a linear address by adding the valid offset to translate it into a physical address by referring to a page table 3. In the case of shifting a system from a segmentation paging system to the other system, the CPU 1 saves information in the segment register 11, rewriting it to a base address value in the segment information block 2. In the other system, the segment register 11 can use the offset as a based modification register, normally performing the address translation.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータなどに利
用し、複数の方式を切り替えてメモリ管理を実行する際
のCPUアドレス変換方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a CPU address conversion system for use in a computer or the like and switching a plurality of systems to execute memory management.

【0002】[0002]

【従来の技術】従来のCPUアドレス変換方式では、セ
グメンテーションやページング中の一方式のみを実現し
ている。又はいくつかの方式の切り替えを出来るように
している。このような従来のCPUアドレス変換方式
は、ページング機構とセグメンテーション機構とを有し
ており、さらにセグメント指示値がアドレス空間に線形
対応するメモリ管理方式を実現する実アドレス仮想化機
構を備える場合がある。これらの機構を有することによ
り、動的なメモリ管理方式の切り替えが出来る。
2. Description of the Related Art In the conventional CPU address conversion method, only one method during segmentation or paging is realized. Or, some of the methods can be switched. Such a conventional CPU address conversion method has a paging mechanism and a segmentation mechanism, and may further include a real address virtualization mechanism for realizing a memory management method in which a segment indication value linearly corresponds to an address space. .. By having these mechanisms, it is possible to dynamically switch the memory management system.

【0003】セグメンテーション・ページング方式を動
作させる場合、セグメンテーション機構とページング機
構とを同時に選択する。そして、CPU内のセグメント
指示レジスタを有効にしてメモリ上のセグメント情報ブ
ロックへのポインタが格納され、ブロック内情報に応じ
て管理アドレスをリニアアドレスに変換し、さらにペー
ジテーブルにより物理アドレスに変換する。
When operating the segmentation / paging method, the segmentation mechanism and the paging mechanism are simultaneously selected. Then, the segment instruction register in the CPU is validated to store a pointer to the segment information block in the memory, the management address is converted into a linear address according to the in-block information, and further converted into a physical address by the page table.

【0004】また、ページング方式のみの動作をさせる
場合、セグメンテーション機構及びセグメントレジスタ
を無効にする。又はセグメンテーション機構を選択し、
全セグメントがリニアアドレス空間全体を指すようにし
て論理アドレスとリニアアドレスを一致させ、ページン
グ機構によりページテーブを参照してリニアアドレスを
物理アドレスに変換している。
In the case of operating only the paging method, the segmentation mechanism and the segment register are invalidated. Or select a segmentation mechanism,
All segments point to the entire linear address space so that the logical address and the linear address match, and the paging mechanism refers to the page table to convert the linear address into a physical address.

【0005】また、実アドレス仮想化機構では、セグメ
ント指示レジスタの内容はそのままリニアアドレス又は
物理アドレスに線形変換している。
Further, in the real address virtualization mechanism, the contents of the segment designation register are linearly converted into a linear address or a physical address.

【0006】[0006]

【発明が解決しようとする課題】このように従来例のC
PUアドレス変換方式では、動的なメモリ管理方式の切
り替えに際して論理アドレスの意味が変化し、特にセグ
メント指示レジスタに格納される値の変換方式が変化す
る。したがって、異なるメモリ管理方式のプログラム間
で実メモリ上のデータを論理アドレスを用いて受渡しす
る場合、同一のリニアアドレス空間を共有していても、
プログラム側での論理アドレス変換処理が必要となる。
さらに、場合によってはセグメント情報ブロックの生成
処理まで必要となり、自プログラムでないメモリ管理方
式への依存度が大きく、また、処理自体がオーバヘッド
になるという問題があった。
As described above, the conventional C
In the PU address conversion method, the meaning of the logical address changes when the memory management method is dynamically changed, and especially the conversion method of the value stored in the segment instruction register changes. Therefore, when passing data on the real memory between programs of different memory management methods by using a logical address, even if the same linear address space is shared,
Logical address translation processing on the program side is required.
In addition, in some cases, even segment information block generation processing is required, and there is a problem that the degree of dependence on a memory management method other than the self program is large and the processing itself becomes an overhead.

【0007】本発明は、このような従来の技術における
問題を解決するものであり、複数のメモリ管理方式に対
応して作成されたプログラム資産の有効活用が出来るC
PUアドレス変換方式の提供を目的とする。
The present invention solves the problems in the prior art as described above, and makes it possible to effectively utilize the program resources created corresponding to a plurality of memory management methods.
It is intended to provide a PU address conversion method.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明のCPUアドレス変換方式は、セグメンテー
ション機構が選択されている場合にセグメント情報ブロ
ックへのポインタを表わし、選択されない状態へ遷移し
た場合には対応するブロック内のベースアドレスを表わ
してベースド修飾に利用するセグメントレジスタと、セ
グメンテーション機構が選択されている場合にプログラ
ムがリニアアドレスをオフセットとして利用するリニア
アドレス全空間対応の専用セグメント指示子と、実アド
レス仮想化機構が選択されている場合にそのモードでの
セグメント指示レジスタとして利用され、リニアアドレ
スと線形対応する値を含み、選択されない状態へ遷移し
た場合には線形変換した後の値を表わしてベースド修飾
に利用する仮想モード・セグメントレジスタとを備えて
いる。
In order to achieve the above object, the CPU address conversion method of the present invention represents a pointer to a segment information block when a segmentation mechanism is selected and transits to a non-selected state. In this case, the segment register that represents the base address in the corresponding block and is used for the base modification, and the linear address that the program uses as the offset when the segmentation mechanism is selected. When the real address virtualization mechanism is selected, it is used as a segment indication register in that mode and contains the value linearly corresponding to the linear address, and the value after linear conversion when transitioning to the unselected state. Represents the virtual model And a de-segment register.

【0009】[0009]

【作用】このような上記本発明のCPUアドレス変換方
式にあって、従来からのセグメント指示はセグメントレ
ジスタの指定により、セグメンテーション機構を通じて
セグメント情報ブロックの中のベースアドレスが利用さ
れる。
In the CPU address conversion system of the present invention as described above, the conventional segment designation uses the base address in the segment information block through the segmentation mechanism by designating the segment register.

【0010】また、ページング方式のリニアアドレスを
利用する場合は、専用セグメント指示子を指定すること
により、リニアアドレスをオフセットに仮想化すること
ができる。実アドレス仮想化状態の論理アドレスは、セ
グメント値としての仮想セグメントレジスタをオフセッ
トのベースド修飾にし、セグメントは、リニアアドレス
用専用セグメント指示子を指定することにより仮想化す
る。
When a paging linear address is used, the linear address can be virtualized into an offset by designating a dedicated segment indicator. The logical address in the real address virtualized state uses the virtual segment register as the segment value with offset-based modification, and the segment is virtualized by specifying the dedicated segment indicator for the linear address.

【0011】ページング方式では、他の方式でのセグメ
ント値のセグメントレジスタ又は仮想セグメントレジス
タをベースド修飾レジスタとして指定することにより、
オフセットとともにリニアアドレスに仮想化する。
In the paging system, the segment register of the segment value in another system or the virtual segment register is designated as the base modification register,
Virtualize to linear address with offset.

【0012】実アドレス仮想化状態にあって、セグメン
テーション・ページング方式でのセグメントレジスタ指
定はベースド修飾用レジスタにし、セグメント指定はリ
ニアアドレス専用セグメント指示子を利用して仮想化さ
れ、ページング方式のリニアアドレスは、セグメント指
定にリニアアドレス専用セグメント指示子を用いた上で
オフセットとして仮想化する。
In the real address virtualized state, the segment register designation in the segmentation / paging method is a base modification register, and the segment designation is virtualized by using a segment specifier dedicated to the linear address. Uses a linear address dedicated segment indicator to specify the segment and virtualizes it as an offset.

【0013】[0013]

【実施例】次に、本発明のCPUアドレス変換方式の実
施例を図面に基づいて説明する。図1、図2、図3は実
施例における各処理内容を示している。図1、図2、図
3において、この例は、CPU1と、セグメント情報ブ
ロック2と、ページテーブル3とを有している。CPU
1は、セグメントレジスタ11とリニアアドレス専用セ
グメント指示子が論理アドレスとして指定されたときに
参照されるリニアアドレス対応セグメント情報12と、
仮想セグメントレジスタ13を備えている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an embodiment of the CPU address conversion system of the present invention will be described with reference to the drawings. 1, 2, and 3 show the contents of each process in the embodiment. 1, 2, and 3, this example includes a CPU 1, a segment information block 2, and a page table 3. CPU
1 is the segment register 11 and the linear address-corresponding segment information 12 which is referred to when the linear address dedicated segment indicator is designated as a logical address,
A virtual segment register 13 is provided.

【0014】次に、この実施例の構成における処理につ
いて説明する。図1に示すセグメンテーション・ページ
ング方式の実行時において、プログラムは通常セグメン
ト指定にセグメントレジスタ11を利用している。CP
U1はセグメントとオフセットが指定されるとセグメン
トレジスタ11が指すセグメント情報ブロック2を参照
してベースアドレスを読み出し、有効オフセットを加え
てリニアアドレスとし、ページテーブル3を参照して物
理アドレスへと変換する。そして、セグメンテーション
・ページング方式から他の方式へ移行する場合、CPU
1はセグメントレジスタ11内の情報を退避し、セグメ
ント情報ブロック2内部のベースアドレス値に書き換え
を行う。他の方式では、グメントレジスタ11はオフセ
ットをベースド修飾レジスタとして利用できるようにな
り、正常にアドレスが変換される。
Next, the processing in the configuration of this embodiment will be described. During execution of the segmentation / paging method shown in FIG. 1, the program normally uses the segment register 11 to specify a segment. CP
When the segment and offset are designated, U1 reads the base address by referring to the segment information block 2 pointed to by the segment register 11, adds the effective offset to make it a linear address, and refers to the page table 3 to convert it to a physical address. .. Then, when shifting from the segmentation / paging method to another method, the CPU
1 saves the information in the segment register 11 and rewrites it to the base address value in the segment information block 2. In another method, the segment register 11 can use the offset as a base modification register, and the address is normally converted.

【0015】次に、図2に示すページング方式の実行時
において、論理アドレスはリニアアドレスと等しく、C
PU1は有効リニアアドレスをそのままページテーブル
3に対応させて物理アドレスに変換する。他の方式へ移
行した場合、リニアアドレスはリニアアドレス空間全体
を表わすセグメント内オフセットと見ることが出来るた
めセグメントのベースアドレスがリニアアドレス空間の
先頭を示すようなリニアアドレス対応セグメント情報1
2をリニアアドレス専用セグメント指示子を利用してセ
グメントとして指定する。この指定によりリニアアドレ
スをオフセットとして利用して正常にアドレスが変換さ
れる。
Next, when the paging method shown in FIG. 2 is executed, the logical address is equal to the linear address, and C
The PU 1 directly translates the effective linear address into the physical address in association with the page table 3. In the case of shifting to another system, the linear address can be regarded as an offset within the segment that represents the entire linear address space, so the linear address corresponding segment information 1 in which the base address of the segment indicates the beginning of the linear address space
2 is designated as a segment by using the segment indicator dedicated to the linear address. By this specification, the address is normally converted by using the linear address as the offset.

【0016】図3に示す実アドレス仮想化状態では、通
常の論理アドレスのセグメント値を線形変換してセグメ
ントベースアドレスにし、オフセットを加えてリニアア
ドレスとしてページテーブル3で物理アドレスに変換す
る。このセグメント値を格納する仮想セグメントレジス
タ13は、他のメモリ管理方式へ移行した場合にCPU
1により内容が退避されて線形変換後の値に置き換えら
れる。他の方式では仮想セグメントレジスタ13がリニ
アアドレスと同意の値を持ち、上記アドレス指定方式に
より正しくアドレスが変換される。
In the real address virtualized state shown in FIG. 3, a segment value of a normal logical address is linearly converted into a segment base address, and an offset is added to the page table 3 as a linear address to be converted into a physical address. The virtual segment register 13 for storing the segment value is used by the CPU when the memory management method is changed to another memory management method.
The content is saved by 1 and replaced with the value after linear conversion. In other methods, the virtual segment register 13 has a value that is synonymous with the linear address, and the address is correctly converted by the above addressing method.

【0017】[0017]

【発明の効果】以上のように、本発明のCPUアドレス
変換方式は、異なるメモリ管理方式へ移行した場合、そ
の方式内で他の方式における論理アドレスが正しく変換
されるように一部の値を予め変換するようにしているた
め、複数のメモリ管理方式に対応して作成されたプログ
ラム資産の有効活用が出来るという効果を有する。すな
わち、異なるメモリ管理方式のプログラムが実メモリ上
のデータを論理アドレスを用いて受渡しする際にアドレ
ス指定を変えるだけでプログラムによる処理を実行する
ことなく参照できるようになる。したがって、自プログ
ラムでないメモリ管理方式への依存度が低く、処理のオ
ーバヘッドをプログラム側で消去できる。
As described above, according to the CPU address conversion method of the present invention, when a different memory management method is adopted, some values are set so that logical addresses in other methods are correctly converted in the method. Since the conversion is performed in advance, there is an effect that the program resources created corresponding to a plurality of memory management methods can be effectively used. That is, a program of a different memory management method can refer to the data on the real memory without changing the address specification when the data is transferred by using the logical address without executing the process by the program. Therefore, the dependence on the memory management method other than the self program is low, and the processing overhead can be erased on the program side.

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

【図1】本発明のCPUアドレス変換方式の実施例にお
けるセグメンテーション・ページング方式実行時におけ
る処理内容を示すブロック図である。
FIG. 1 is a block diagram showing processing contents when executing a segmentation / paging method in an embodiment of a CPU address conversion method of the present invention.

【図2】実施例におけるページング方式実行時の処理内
容を示すブロック図である。
FIG. 2 is a block diagram showing the processing contents when the paging method is executed in the embodiment.

【図3】実施例における実アドレス仮想化状態の処理内
容を示すブロック図である。
FIG. 3 is a block diagram illustrating processing contents in a real address virtualization state according to the embodiment.

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

1 CPU 2 セグメント情報ブロック 3 ページテーブル 11 セグメントレジスタ 12 リニアアドレス対応セグメント情報 13 仮想セグメントレジスタ 1 CPU 2 Segment information block 3 Page table 11 Segment register 12 Linear address corresponding segment information 13 Virtual segment register

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 セグメンテーション機構が選択されてい
る場合にセグメント情報ブロックへのポインタを表わ
し、選択されない状態へ遷移した場合には対応するブロ
ック内のベースアドレスを表わしてベースド修飾に利用
するセグメントレジスタと、 セグメンテーション機構が選択されている場合にプログ
ラムがリニアアドレスをオフセットとして利用するリニ
アアドレス全空間対応の専用セグメント指示子と、 実アドレス仮想化機構が選択されている場合にそのモー
ドでのセグメント指示レジスタとして利用され、リニア
アドレスと線形対応する値を含み、選択されない状態へ
遷移した場合には線形変換した後の値を表わしてベース
ド修飾に利用する仮想モード・セグメントレジスタと、 を備えることを特徴とするCPUアドレス変換方式。
1. A segment register used for the base modification by representing a pointer to a segment information block when the segmentation mechanism is selected, and representing a base address in the corresponding block when a transition to a non-selected state is made. , If the segmentation mechanism is selected, the program uses the linear address as an offset for the dedicated segment indicator for the linear address full space, and if the real address virtualization mechanism is selected, the segment indicator register in that mode And a virtual mode segment register that includes a value linearly corresponding to a linear address and that represents a value after linear conversion when a transition is made to a non-selected state and is used for the base modification. CPU address conversion method ..
JP4164364A 1992-05-29 1992-05-29 Cpu address translation system Pending JPH05334192A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4164364A JPH05334192A (en) 1992-05-29 1992-05-29 Cpu address translation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4164364A JPH05334192A (en) 1992-05-29 1992-05-29 Cpu address translation system

Publications (1)

Publication Number Publication Date
JPH05334192A true JPH05334192A (en) 1993-12-17

Family

ID=15791744

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4164364A Pending JPH05334192A (en) 1992-05-29 1992-05-29 Cpu address translation system

Country Status (1)

Country Link
JP (1) JPH05334192A (en)

Similar Documents

Publication Publication Date Title
US4951195A (en) Condition code graph analysis for simulating a CPU processor
US10318407B2 (en) Allocating a debug instruction set based on the current operating state in a multi-instruction-set data processing apparatus
US5301302A (en) Memory mapping and special write detection in a system and method for simulating a CPU processor
US5167023A (en) Translating a dynamic transfer control instruction address in a simulated CPU processor
US4347565A (en) Address control system for software simulation
US5815686A (en) Method and apparatus for address space translation using a TLB
US7725677B1 (en) Method and apparatus for improving segmented memory addressing
JPH05257803A (en) Virtual storage space control method and address calculation device
JP2011181095A (en) Maintaining processor resource during architectural event
US6606697B1 (en) Information processing apparatus and memory control method
US20070156386A1 (en) Linearization of page based memory for increased performance in a software emulated central processing unit
EP0327198B1 (en) Processor simulation
JPH07120318B2 (en) Apparatus and method for protecting main memory unit with access and defective logic signals
JPH05334192A (en) Cpu address translation system
KR880011663A (en) Memory management unit, methods for use with this system, and systems with this unit
JP2798275B2 (en) Virtual memory address space access control method
JPH05250263A (en) Virtual processor system and nonvolatile storage system
JPS6336012B2 (en)
KR19990037395A (en) System and method for executing two word instructions in a single cycle
JPS6273346A (en) Address converter
JPH0447853B2 (en)
JPH07141252A (en) Data processor
JPH10133872A (en) Processor equipment having command buffer
JPS589452B2 (en) Firmware broom
JPH04340143A (en) Digital computer