[go: up one dir, main page]

JP2011180969A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2011180969A
JP2011180969A JP2010046557A JP2010046557A JP2011180969A JP 2011180969 A JP2011180969 A JP 2011180969A JP 2010046557 A JP2010046557 A JP 2010046557A JP 2010046557 A JP2010046557 A JP 2010046557A JP 2011180969 A JP2011180969 A JP 2011180969A
Authority
JP
Japan
Prior art keywords
data
information
address
register
processing unit
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.)
Withdrawn
Application number
JP2010046557A
Other languages
Japanese (ja)
Inventor
Makoto Ishikawa
誠 石川
Fumio Arakawa
文男 荒川
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2010046557A priority Critical patent/JP2011180969A/en
Publication of JP2011180969A publication Critical patent/JP2011180969A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

【課題】必要とするリソースを最小限にしながら共有リソースへのアクセス管理及び共有リソースの物理アドレス空間の増大にも対応できるデータプロセッサを提供する。
【解決手段】データプロセッサ(1、2、3)は、プログラムを実行する中央処理装置(101)と当該中央処理装置のアドレス空間をアクセスするためのアドレス情報を出力する内部モジュール(105、102)とを有し、前記内部モジュールはメモリ保護に利用される識別子を前記アドレス情報に付加しない第1の動作モードと、前記識別子を前記アドレス情報に付加する第2の動作モードを有する。
【選択図】図1
Provided is a data processor capable of managing access to a shared resource and increasing the physical address space of the shared resource while minimizing required resources.
A data processor (1, 2, 3) includes a central processing unit (101) for executing a program and an internal module (105, 102) for outputting address information for accessing an address space of the central processing unit. The internal module has a first operation mode in which an identifier used for memory protection is not added to the address information, and a second operation mode in which the identifier is added to the address information.
[Selection] Figure 1

Description

本発明は、データプロセッサに関し、特に、中央処理装置のアドレス空間をアクセスするためのアドレス情報を出力する機能を備えるデータプロセッサに適用して、有効な技術に関する。   The present invention relates to a data processor, and more particularly to a technique effective when applied to a data processor having a function of outputting address information for accessing an address space of a central processing unit.

近年、半導体デバイスの高集積化により、単一の中央演算処理装置を搭載したマイクロプロセッサを、複数搭載したマイクロプロセッサシステムが集積化されている。   In recent years, due to the high integration of semiconductor devices, a microprocessor system in which a plurality of microprocessors equipped with a single central processing unit is integrated.

前記マイクロプロセッサシステムにおいては、主にLSIの面積に対する端子数の制約によって、各中央演算処理装置が利用する主記憶装置や入出力装置などのリソースについては、システム内で共有化されることが一般的である。このようにリソースを複数の中央演算処理装置が供用する場合、例えば、制御ソフトウェアのバグ等による不正アクセスが発生し、リソースである主記憶装置のメモリ部の衝突が起こることによりデータが正しく処理されない等の問題が発生する可能性がある。そこで、リソースを供用する場合には、不正アクセスを回避するためのリソースのアクセス管理が重要になる。   In the microprocessor system, resources such as a main storage device and an input / output device used by each central processing unit are commonly shared in the system mainly due to restrictions on the number of terminals with respect to the LSI area. Is. When resources are used by a plurality of central processing units in this way, for example, illegal access due to bugs in the control software occurs, and data is not processed correctly due to a collision of the memory unit of the main storage device that is a resource. Such a problem may occur. Therefore, when using resources, it is important to manage access to resources to avoid unauthorized access.

複数の中央演算処理装置を搭載したマイクロプロセッサシステム上でプログラムを動作させる場合には、それに対応したオペレーティングシステムが必要となる。複数の中央演算処理装置を搭載したマイクロプロセッサシステムに対応するオペレーティングシステムの方式は、大きく2つに分類される。   When a program is operated on a microprocessor system equipped with a plurality of central processing units, an operating system corresponding to the program is required. There are roughly two types of operating system systems corresponding to a microprocessor system equipped with a plurality of central processing units.

一つは、単一のオペレーティングシステムが複数の中央演算処理装置、単一の主記憶装置、及び入出力装置の全てを管理する対称型マルチプロセッサ方式であり、もう一つは、複数の中央演算処理装置にそれぞれオペレーティングシステムを搭載する非対称型マルチプロセッサ方式である。特に組み込み機器向けのマイクロプロセッサにおいては、非対称型マルチプロセッサ方式が用いられることが多い。その理由としては、ソフトウェア資産の移行が容易であることと、近年の組み込みシステムにおいて非対称のマルチプロセッサによれば特性の異なるサブシステムを容易に取り扱うことが可能となることが挙げられる。非対称型マルチプロセッサ方式を適用したマイクロプロセッサシステムの一例として、自動車用のマイクロプロセッサシステムがある。当該マイクロプロセッサシステムでは、カーナビゲーションシステムのように比較的大規模なデータを演算する情報系の処理と、ブレーキ制御のようにデータ規模は小さいがより信頼性の高い処理が要求される制御系の処理とを連携させ、1つのシステムとして共存・融合させている。近年、このようなマルチプロセッサの需要は急速に拡大している。   One is a symmetric multiprocessor system in which a single operating system manages all of a plurality of central processing units, a single main storage device, and input / output devices, and the other is a plurality of central processing units. This is an asymmetric multiprocessor system in which an operating system is installed in each processing device. In particular, in a microprocessor for an embedded device, an asymmetric multiprocessor system is often used. The reason for this is that software assets can be easily migrated, and a subsystem with different characteristics can be easily handled by an asymmetric multiprocessor in a recent embedded system. An example of a microprocessor system to which an asymmetric multiprocessor system is applied is an automotive microprocessor system. In the microprocessor system, an information system process for calculating a relatively large amount of data such as a car navigation system, and a control system that requires a more reliable process such as a brake control, although the data scale is small. By coordinating with processing, they coexist and fuse as one system. In recent years, the demand for such multiprocessors is rapidly expanding.

非対称型マルチプロセッサ方式における共有リソース管理の従来の方法として、例えば、特許文献1に記載がある。特許文献1では、オペレーティングシステムとその制御下で動作するユーザプログラムを仮想マシンとして扱い、仮想マシンを識別するための仮想マシンID(VMID)を設定する。そして、物理的に実装されたメモリマネージメントユニット(MMU)やキャッシュメモリのエントリ毎にVMIDを記憶し、それらがどの保護ドメインに属するかを物理アドレス管理モジュール(PAM)で判定することにより、共有リソースへのアクセスを管理する方法が示されている。   For example, Patent Document 1 discloses a conventional method of shared resource management in an asymmetric multiprocessor system. In Patent Document 1, an operating system and a user program operating under the control of the operating system are handled as a virtual machine, and a virtual machine ID (VMID) for identifying the virtual machine is set. Then, the VMID is stored for each entry of the memory management unit (MMU) and the cache memory that are physically mounted, and the physical address management module (PAM) determines which protection domain they belong to. How to manage access to is shown.

一方、近年のマイクロプロセッサシステムによる応用システムにおいて、動画像データ、又は音声データ等を用いた認識システム等で用いるデータベース等、より大規模なデータを扱うようになってきている。また、半導体デバイスの微細化とメモリ技術の向上により、安価なメモリデバイスが普及したことから、システムに搭載する主記憶容量は急速に増加してきている。特に、前述した非対称型のマルチプロセッサでは、供用される代表的なリソースである主記憶装置に、全てのオペレーティングシステムとユーザプログラムのコード、及び処理結果等のデータを記憶することが必要となるから、必然的に要求される主記憶容量の大幅な増加が求められる。これにより、マイクロプロセッサシステムにおける中央演算処理装置が取り扱うことが可能な物理アドレス空間の増加が必要となる。そこで、一般的に、主記憶を配置する物理アドレス空間を増大させるために、アドレス幅のより広い物理アドレスバスを設け、付随する物理アドレスを記憶するキャッシュのタグアレイや、MMUに格納するページ番号の幅を増加させる解決方法が採られている。   On the other hand, in recent application systems using a microprocessor system, larger-scale data such as a database used in a recognition system using moving image data or audio data has come to be handled. In addition, as memory devices have been miniaturized and memory technology has been improved, inexpensive memory devices have become widespread, and the main storage capacity installed in the system has been rapidly increasing. In particular, in the asymmetric multiprocessor described above, it is necessary to store all operating system and user program codes and data such as processing results in the main storage device which is a representative resource to be used. Therefore, a substantial increase in the required main storage capacity is required. This requires an increase in the physical address space that can be handled by the central processing unit in the microprocessor system. Therefore, in general, in order to increase the physical address space in which the main memory is arranged, a physical address bus having a wider address width is provided, and a cache tag array for storing an accompanying physical address and a page number stored in the MMU are provided. Solutions to increase the width are taken.

特開2008−97173号公報JP 2008-97173 A

前述した異なるオペレーティングシステムの管理下で共有リソースを用いたプログラムの実行が可能な複数の中央演算処理装置を搭載したマイクロプロセッサシステムでは、以下に示す問題がある。   The above-described microprocessor system equipped with a plurality of central processing units capable of executing programs using shared resources under the management of different operating systems has the following problems.

第1の問題は、マイクロプロセッサシステムにおける共有リソース管理に伴うハードウェア規模の増大の問題である。例えば、特許文献1の方法により共有リソースの管理を行う場合、複数のオペレーティングシステムを区別するために前述のようにVMIDを用いる。そして、VMIDを記憶するためのメモリ部を、キャッシュメモリ等の連想メモリに設ける必要がある。例えばマイクロプロセッサシステム上に200個の保護ドメインが存在した場合には8ビットのVMIDが必要となるが、この8ビットの付加情報を記憶するためのメモリ部をマイクロプロセッサの連想メモリの全エントリに持たなければならない。汎用的に用いられるマイクロプロセッサシステムの場合には応用システムが異なるため、マイクロプロセッサのハードウェアが予め備えておくリソースを予め決めることは困難である。そこで非対称な構成で利用されるマルチプロセッサシステムでは、夫々のマイクロプロセッサの連想メモリが前記VMIDを記憶するためのメモリ部は必然的に余裕を持って大きめに設計されることになる。例えば2つのマイクロプロセッサを搭載したマルチプロセッサシステムにおいて、1個の保護ドメインを扱う第1のプロセッサと16個の保護ドメインを扱う第2のプロセッサが存在する場合、第1のプロセッサには前記VMIDは1ビットあれば良いが、第2のプロセッサは4ビットの前記VMIDが必要である。このような非対称な構成で利用されるマルチプロセッサシステムの場合、夫々のマイクロプロセッサが最大の保護ドメイン(4ビット)が扱えるように連想メモリが設計され、結果的に過大な仕様を定義することになる。このことは、特に低コストであることを重視する組込みプロセッサにとっては問題となる。   The first problem is an increase in hardware scale associated with shared resource management in a microprocessor system. For example, when shared resources are managed by the method of Patent Literature 1, VMID is used as described above to distinguish a plurality of operating systems. Then, it is necessary to provide a memory unit for storing VMID in an associative memory such as a cache memory. For example, if 200 protection domains exist on a microprocessor system, an 8-bit VMID is required. A memory unit for storing this 8-bit additional information is included in all entries in the associative memory of the microprocessor. Must have. In the case of a microprocessor system used for general purposes, the application system is different, so it is difficult to predetermine resources that the microprocessor hardware has in advance. Therefore, in a multiprocessor system used in an asymmetric configuration, the memory unit for storing the VMID in the associative memory of each microprocessor is inevitably designed with a large margin. For example, in a multiprocessor system equipped with two microprocessors, when there is a first processor that handles one protection domain and a second processor that handles 16 protection domains, the VMID is stored in the first processor. One bit is sufficient, but the second processor needs the 4-bit VMID. In the case of a multiprocessor system used in such an asymmetric configuration, an associative memory is designed so that each microprocessor can handle the maximum protection domain (4 bits), and as a result, an excessive specification is defined. Become. This is a problem for an embedded processor that places particular emphasis on low cost.

第2の問題は、主記憶装置の物理アドレス空間の増大に伴うハードウェア規模の増大の問題である。前述のように主記憶の物理アドレス空間が増大すればそれに比例してMMUやキャッシュ等の連想メモリに記憶する物理アドレスのビット数を増やす必要があり、システム全体としてハードウェア規模が増大する。しかしながら、大規模な物理アドレス空間が要求される非対称型のマルチプロセッサシステムであっても、単一のオペレーティングシステムとその制御下にあるアプリケーションで見た場合には、それぞれが要求するメモリ容量は比較的小規模であり、またオペレーティングシステム毎にばらつきがある。例えば、一つのオペレーティングシステム及びその制御下で動作するサブシステムは4ギガバイトもの大きなメモリ空間を要求するが、別のサブシステムは小さなメモリ空間しか要求しない場合がある。このような場合、マルチプロセッサシステム全体としては4ギガバイトを超えるメモリ空間が必要となるが、個々の保護ドメインに属するサブシステムは4ギガバイト以下のメモリ空間で足りることが多い。しかし、複数のオペレーティングシステムを用いるマイクロプロセッサシステムにおいては、第1の問題と同様に、応用システムが異なる場合にマイクロプロセッサのハードウェアが備えるべきリソースを予め決めることは困難であるため、必然的に余裕を持って大きめに設計されることになる。このため、マイクロプロセッサは本来必要としない過大な仕様を備えることになり、第1の問題と同様に、特に組込みプロセッサの分野においてはコストの問題となり得る。   The second problem is an increase in hardware scale accompanying an increase in the physical address space of the main storage device. As described above, if the physical address space of the main memory increases, it is necessary to increase the number of bits of the physical address stored in the associative memory such as the MMU and the cache in proportion thereto, and the hardware scale increases as a whole system. However, even in an asymmetric multiprocessor system that requires a large physical address space, the memory capacity required by each operating system and the application under its control is comparable. Are small and vary from operating system to operating system. For example, one operating system and a subsystem operating under its control may require as much as 4 gigabytes of memory space, while another subsystem may require only a small memory space. In such a case, the multiprocessor system as a whole requires a memory space exceeding 4 gigabytes, but the subsystem belonging to each protection domain often requires a memory space of 4 gigabytes or less. However, in a microprocessor system using a plurality of operating systems, as in the first problem, it is difficult to predetermine resources to be provided in the microprocessor hardware when the application system is different. It is designed to be large with a margin. For this reason, the microprocessor has an excessive specification that is not originally required, and can be a problem of cost, particularly in the field of the embedded processor, as in the first problem.

本発明の目的は、必要とするリソースを最小限にしながら、共有リソースへのアクセス管理及び共有リソースの物理アドレス空間の増大にも対応できる、データプロセッサを提供することにある。   An object of the present invention is to provide a data processor capable of managing access to a shared resource and increasing the physical address space of the shared resource while minimizing required resources.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

すなわち、プログラムを実行する中央処理装置と当該中央処理装置のアドレス空間をアクセスするためのアドレス情報を出力する内部モジュールとを有するデータプロセッサにおいて、前記内部モジュールはメモリ保護に利用される識別子を前記アドレス情報に付加しない第1の動作モードと、前記識別子を前記アドレス情報に付加する第2の動作モードを有する。   That is, in a data processor having a central processing unit that executes a program and an internal module that outputs address information for accessing an address space of the central processing unit, the internal module assigns an identifier used for memory protection to the address There is a first operation mode that is not added to the information, and a second operation mode that adds the identifier to the address information.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記のとおりである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、データプロセッサは、必要とするリソースを最小限にしながら、共有リソースへのアクセス管理及び共有リソースの物理アドレス空間の増大にも対応できる。   That is, the data processor can cope with the increase in the physical address space of the shared resource and the access management to the shared resource while minimizing the required resource.

図1は、実施の形態1に係るデータプロセッサのブロック図である。FIG. 1 is a block diagram of a data processor according to the first embodiment. 図2は、CPU101が実行するプログラムの動作モードの説明図である。FIG. 2 is an explanatory diagram of an operation mode of a program executed by the CPU 101. 図3は、実施の形態1に係るデータプロセッサの詳細なブロック図である。FIG. 3 is a detailed block diagram of the data processor according to the first embodiment. 図4は、DMCR104の設定値と拡張データの対応関係の一例である。FIG. 4 is an example of the correspondence between the setting value of the DMCR 104 and the extended data. 図5は、比較部1025のブロック図の一例である。FIG. 5 is an example of a block diagram of the comparison unit 1025. 図6は、DMCR104の設定値と拡張アレイ1022に格納されるデータとの対応関係の一例である。FIG. 6 is an example of a correspondence relationship between the setting value of the DMCR 104 and the data stored in the expansion array 1022. 図7は、実施の形態2に係るデータプロセッサのブロック図である。FIG. 7 is a block diagram of a data processor according to the second embodiment. 図8は、プロセッサコア20_A〜20_Cに係るDMIDとアドレス空間の設定例である。FIG. 8 is a setting example of DMID and address space related to the processor cores 20_A to 20_C. 図9は、実施の形態2に係るデータプロセッサ2の詳細なブロック図である。FIG. 9 is a detailed block diagram of the data processor 2 according to the second embodiment. 図10は、バスインターフェース206が補完する情報の一例である。FIG. 10 is an example of information supplemented by the bus interface 206. 図11は、実施の形態3に係るデータプロセッサ3のブロック図である。FIG. 11 is a block diagram of the data processor 3 according to the third embodiment. 図12は、DMCR304の設定値と拡張データの対応関係の一例である。FIG. 12 is an example of the correspondence between the setting value of DMCR 304 and the extended data. 図13は、比較部3025のブロック図の一例である。FIG. 13 is an example of a block diagram of the comparison unit 3025. 図14は、エラー訂正論理部3027のブロック図の一例である。FIG. 14 is an example of a block diagram of the error correction logic unit 3027. 図15は、拡張データ生成部3030のブロック図の一例である。FIG. 15 is an example of a block diagram of the extension data generation unit 3030.

1.実施の形態の概要
先ず、本願において開示される発明の代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面中の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
1. First, an outline of a typical embodiment of the invention disclosed in the present application will be described. Reference numerals in the drawings referred to in parentheses in the outline description of the representative embodiments merely exemplify what are included in the concept of the components to which the reference numerals are attached.

〔1〕(2つの動作モード)
本発明の代表的な実施の形態に係るデータプロセッサ(1、2)は、プログラムを実行する中央処理装置(101)と、前記中央処理装置のアドレス空間上のデータの一部を保持する連想メモリ(102)と、メモリ保護に利用される識別子を保持する第1レジスタ(103)と、を有する。前記連想メモリは、タグを格納するタグ部(1022、1023)と、データを格納するデータ部(1024)とから構成される複数の連想エントリと、前記中央処理装置のアクセスに際し、前記中央処理装置から供給される情報とインデックスされたタグとを比較する比較部(1025)とを有する。また前記連想メモリは、前記供給される情報をアドレス情報とする第1の動作モードと、前記供給される情報をアドレス情報及び前記識別子とする第2の動作モードとを有する。これによれば、前記データプロセッサは、前記識別子を用いたメモリ保護と前記連想メモリに記憶する物理アドレスのビット数拡張とに対応することが可能となる。
[1] (2 operation modes)
A data processor (1, 2) according to a representative embodiment of the present invention includes a central processing unit (101) that executes a program and an associative memory that holds a part of data in the address space of the central processing unit (102) and a first register (103) that holds an identifier used for memory protection. The associative memory includes a plurality of associative entries including a tag unit (1022, 1023) for storing tags and a data unit (1024) for storing data, and the central processing unit when accessing the central processing unit. A comparison unit (1025) for comparing the information supplied from the information and the indexed tag. The associative memory has a first operation mode in which the supplied information is address information, and a second operation mode in which the supplied information is address information and the identifier. According to this, the data processor can cope with memory protection using the identifier and expansion of the number of bits of the physical address stored in the associative memory.

〔2〕(拡張部の切り換え)
項1のデータプロセッサは、前記連想メモリの前記動作モードを決定するための情報が保持される第2レジスタ(104)を更に有し、前記タグ部はアドレス情報を格納するアドレス部(1023)と拡張部(1022)とを有する。また、前記連想メモリは、前記第2レジスタの値に基づいて前記動作モードを決定し、前記拡張部は、前記第1の動作モードではアドレス情報が格納され、前記第2の動作モードでは前記識別子が格納される。これによれば、前記拡張部を供用するから2つの動作モードに対応することが容易となる。
[2] (Switching of expansion part)
The data processor according to item 1 further includes a second register (104) for holding information for determining the operation mode of the associative memory, and the tag unit includes an address unit (1023) for storing address information; And an extension (1022). The associative memory determines the operation mode based on a value of the second register, and the extension unit stores address information in the first operation mode, and the identifier in the second operation mode. Is stored. According to this, since the extension part is used, it becomes easy to cope with two operation modes.

〔3〕(第1の動作モードにおける詳細動作)
項1又は項2のデータプロセッサにおいて、前記第1の動作モードでは、前記比較部は、前記供給されたアドレス情報と当該アドレス情報に対応する前記連想エントリにおける前記アドレス部及び前記拡張部に保持されたアドレス情報とを比較する。その結果、一致する場合には、前記連想メモリは当該連想エントリにおける前記データ部のデータを出力し、一致しない場合には、前記供給されたアドレス情報とそれに対応するデータとを、前記対応する前記連想エントリに格納する。
[3] (Detailed operation in the first operation mode)
In the data processor according to item 1 or 2, in the first operation mode, the comparison unit is held in the address unit and the extension unit in the supplied address information and the associative entry corresponding to the address information. Compare the address information. As a result, if they match, the associative memory outputs the data of the data portion in the associative entry, and if they do not match, the supplied address information and the corresponding data are converted to the corresponding Store in associative entry.

〔4〕(第2の動作モードにおける詳細動作)
項1乃至3の何れかのデータプロセッサにおいて、前記第2の動作モードでは、前記比較部は、前記供給されたアドレス情報と当該アドレス情報に対応する前記連想エントリにおける前記アドレス部に保持された情報とを比較するとともに、前記供給された前記識別子と当該連想エントリにおける前記拡張部に保持された情報とを比較する。その結果、共に一致する場合には、前記連想メモリは、当該連想エントリにおける前記データ部のデータを出力し、一方又は双方が一致しない場合には、前記供給されたアドレス情報とそれに対応するデータとを、前記対応する前記連想エントリに格納する。
[4] (Detailed operation in the second operation mode)
In the data processor according to any one of Items 1 to 3, in the second operation mode, the comparison unit is configured to provide the address information in the address section in the associative entry corresponding to the supplied address information and the address information. And the supplied identifier and the information held in the extension in the associative entry are compared. As a result, if both match, the associative memory outputs the data of the data part in the associative entry. If one or both do not match, the supplied address information and the corresponding data are output. Are stored in the corresponding associative entry.

〔5〕(ドメイン識別子)
項1乃至4の何れかのデータプロセッサにおいて、前記メモリ保護に利用される識別子は、前記プログラムの実行を管理する上位ソフトウェアを識別するためのドメイン識別子である。これによれば、前記上位ソフトウェア毎のメモリ保護が可能となる。
[5] (Domain identifier)
In the data processor according to any one of Items 1 to 4, the identifier used for protecting the memory is a domain identifier for identifying upper software that manages execution of the program. According to this, it is possible to protect the memory for each upper software.

〔6〕(複数のデータ処理部)
項1乃至5の何れかのデータプロセッサは、前記中央処理装置と、前記連想メモリと、前記第1レジスタと、前記第2レジスタと、を一組とするデータ処理部(20_A〜20_C)を複数組有し、前記第2レジスタは、前記データ処理部毎に設定可能とされる。
[6] (Multiple data processing units)
The data processor according to any one of Items 1 to 5, wherein the data processor includes a plurality of data processing units (20_A to 20_C) including the central processing unit, the associative memory, the first register, and the second register. The second register can be set for each data processing unit.

〔7〕(アドレス空間のビット数補完)
項6のデータプロセッサは、夫々の前記データ処理部によって共通利用されるバス(20、21)を更に有し、前記データ処理部は、前記中央処理装置のアクセス要求に応じて、前記中央処理装置が供給するアドレス情報を出力するための制御を行うアクセス制御部(206)と、アドレス情報を補完するための情報が格納される第3レジスタ(107、107A〜107C)とを有する。また、前記バスは、複数の前記データ処理部のうち、最大となるアドレス空間に応じたバス幅以上のバス幅を有する。さらに、前記アクセス制御部は、前記中央処理装置がアクセス要求を行う際、前記中央処理装置が供給するアドレス情報に基づくアドレス幅が前記バス幅に対して小さいと判断した場合には、前記第3レジスタの値に基づいて、当該アドレス情報に所定の情報を補完した新たなアドレス情報を前記バスに出力する。これによれば、前記データ処理部のアドレス空間のビット数と前記バスのビット数が一致しない場合であっても、前記データ処理部を適用することができる。
[7] (The number of bits in the address space is complemented)
The data processor according to Item 6 further includes buses (20, 21) commonly used by the data processing units, and the data processing unit is configured to respond to an access request from the central processing unit. Has an access control unit (206) that performs control for outputting the address information supplied by the first and third registers (107, 107A to 107C) in which information for complementing the address information is stored. The bus has a bus width equal to or larger than a bus width corresponding to a maximum address space among the plurality of data processing units. Further, when the access control unit determines that the address width based on the address information supplied by the central processing unit is smaller than the bus width when the central processing unit makes an access request, Based on the value of the register, new address information obtained by supplementing the address information with predetermined information is output to the bus. According to this, even if the number of bits in the address space of the data processing unit does not match the number of bits in the bus, the data processing unit can be applied.

〔8〕(識別子のビット数補完)
項7のデータプロセッサにおいて、前記アクセス制御部は更に、前記中央処理装置のアクセス要求に応じて、前記第1レジスタの値を出力する制御を行う。
[8] (Bit number complementation of identifier)
In the data processor according to item 7, the access control unit further performs control to output the value of the first register in response to an access request from the central processing unit.

〔9〕項8のデータプロセッサにおいて、前記第3レジスタは更に、前記第1レジスタの値を補完するための情報が格納され、前記バスは更に、複数の前記データ処理部のうち、前記メモリ保護に利用される識別子の最大となるデータ量に応じたバス幅以上のバス幅を有する。また、前記アクセス制御部は、前記中央処理装置がアクセス要求を行う際、前記第1レジスタの値が前記バス幅に対して小さいと判断した場合には、前記第3レジスタの値に基づいて、当該第1レジスタの値に所定の情報を補完した新たな情報を前記バスに出力する。これによれば、前記データ処理部の識別子のビット数と前記バスのビット数が一致しない場合であっても、前記データ処理部を適用することができる。   [9] In the data processor according to item 8, the third register further stores information for complementing the value of the first register, and the bus further includes the memory protection among a plurality of the data processing units. The bus width is equal to or larger than the bus width corresponding to the maximum amount of data used for the identifier. In addition, when the central processing unit makes an access request, the access control unit determines that the value of the first register is smaller than the bus width, based on the value of the third register, New information obtained by complementing predetermined information to the value of the first register is output to the bus. According to this, even when the number of bits of the identifier of the data processing unit does not match the number of bits of the bus, the data processing unit can be applied.

〔10〕(補完の具体的方法)
項7乃至9の何れかのデータプロセッサにおいて、前記アクセス制御部は、前記第2レジスタの値を参照して補完すべきビット数を決定する。これによれば、前記第2レジスタの値を参照することで前記データ処理部の前記動作モードがわかるから、補完すべきビット数を決定することが容易となる。
[10] (Specific method of complementation)
In the data processor according to any one of Items 7 to 9, the access control unit determines the number of bits to be complemented with reference to the value of the second register. According to this, since the operation mode of the data processing unit is known by referring to the value of the second register, it is easy to determine the number of bits to be complemented.

〔11〕(2つの動作モード(ECC))
本発明の代表的な別の実施の形態に係るデータプロセッサ(1、2、3)は、プログラムを実行する中央処理装置(101)と、前記中央処理装置のアドレス空間上のデータの一部を保持する連想メモリ(302)と、を有する。前記連想メモリは、タグを格納するタグ部(1022、1023、3022)と、データを格納するデータ部(1024)とから構成される複数の連想エントリと、前記中央処理装置のアクセスに際し、前記中央処理装置から供給される情報とインデックスされたタグとを比較する比較部(1025、3025)とを有する。また、前記連想メモリは、前記供給される情報をアドレス情報とする第1の動作モードと、前記供給される情報をアドレス情報及び誤り訂正のための情報とする第2の動作モードとを有する。これによれば、前記データプロセッサは、ソフトエラー対策と前記連想メモリに記憶する物理アドレスのビット数拡張とに対応することが可能となる。
[11] (Two operation modes (ECC))
A data processor (1, 2, 3) according to another exemplary embodiment of the present invention includes a central processing unit (101) that executes a program and a part of data in the address space of the central processing unit. And an associative memory (302) for holding. The associative memory includes a plurality of associative entries including a tag unit (1022, 1023, 3022) for storing a tag and a data unit (1024) for storing data, and the central processing unit accesses the central processing unit. Comparing units (1025, 3025) for comparing information supplied from the processing device with the indexed tags. The associative memory has a first operation mode in which the supplied information is address information, and a second operation mode in which the supplied information is address information and information for error correction. According to this, the data processor can cope with soft error countermeasures and expansion of the number of bits of the physical address stored in the associative memory.

〔12〕(拡張部の切り換え)
項11のデータプロセッサは、前記連想メモリの前記動作モードを決定するための情報が保持される第1レジスタ(103)を更に有し、前記タグ部は、アドレス情報を格納するアドレス部(1023)と、拡張部(1022、3022)とを有する。前記連想メモリは、前記第1レジスタの値に基づいて前記動作モードを決定し、前記拡張部は、前記第1の動作モードではアドレス情報が格納され、前記第2の動作モードでは前記誤り訂正のための情報が格納される。これによれば、前記拡張部を供用するから、2つの動作モードに対応することが容易となる。
[12] (Switching of expansion part)
The data processor according to item 11 further includes a first register (103) that holds information for determining the operation mode of the associative memory, and the tag unit includes an address unit (1023) that stores address information. And expansion portions (1022, 3022). The associative memory determines the operation mode based on the value of the first register, and the extension unit stores address information in the first operation mode, and the error correction in the second operation mode. Information for storing is stored. According to this, since the extension unit is used, it becomes easy to cope with two operation modes.

〔13〕(キャッシュメモリ)
項2乃至12の何れかのデータプロセッサにおいて、前記連想メモリは、キャッシュメモリである。
[13] (Cache memory)
In the data processor according to any one of Items 2 to 12, the associative memory is a cache memory.

〔14〕(アドレス変換バッファ)
項2乃至12の何れかのデータプロセッサにおいて、前記連想メモリは、前記中央処理装置の仮想アドレス空間における仮想アドレスを物理アドレスへアドレス変換するためのアドレス変換対を記憶するアドレス変換バッファである。
[14] (Address translation buffer)
In the data processor according to any one of Items 2 to 12, the associative memory is an address conversion buffer that stores an address conversion pair for converting a virtual address in a virtual address space of the central processing unit into a physical address.

〔15〕(内部モジュール)
本発明の代表的な別の実施の形態に係るデータプロセッサ(1、2、3)は、プログラムを実行する中央処理装置(101)と、前記中央処理装置によるデータ処理に基づいて、前記中央処理装置のアドレス空間をアクセスするためのアドレス情報を出力する内部モジュール(105、102、302)と、メモリ保護に利用される識別子を保持する第1レジスタ(103)と、を有する。前記内部モジュールは、前記アドレス情報に前記識別子を付加しない第1の動作モードと、前記アドレス情報に前記識別子を付加する第2の動作モードとを有する。これによれば、前記データプロセッサは、前記内部モジュールのアクセスに対するメモリ保護と物理アドレスのビット数の拡張とに対応することが可能となる。
[15] (Internal module)
The data processor (1, 2, 3) according to another exemplary embodiment of the present invention includes a central processing unit (101) that executes a program and the central processing based on data processing by the central processing unit. It has an internal module (105, 102, 302) that outputs address information for accessing the address space of the device, and a first register (103) that holds an identifier used for memory protection. The internal module has a first operation mode in which the identifier is not added to the address information, and a second operation mode in which the identifier is added to the address information. According to this, the data processor can cope with the memory protection against the access of the internal module and the expansion of the number of bits of the physical address.

〔16〕(動作モードの切り換え)
項15のデータプロセッサは、前記動作モードを決定するための情報が保持される第2レジスタ(104、304)を更に有し、前記内部モジュールは、前記第2レジスタの値に基づいて前記動作モードを決定する。また、前記メモリ保護に利用される識別子は、前記プログラムの実行を管理する上位ソフトウェアを識別するためのドメイン識別子である。これによれば、2つの動作モードの切り換えが容易となり、また、前記上位ソフトウェア毎のメモリ保護が可能となる。
[16] (Switching operation mode)
The data processor according to item 15, further includes a second register (104, 304) that holds information for determining the operation mode, and the internal module is configured to select the operation mode based on a value of the second register. To decide. The identifier used for memory protection is a domain identifier for identifying higher-order software that manages execution of the program. According to this, switching between the two operation modes is facilitated, and memory protection for each upper software is possible.

2.実施の形態の詳細
実施の形態について更に詳述する。
2. Details of Embodiments Embodiments will be further described in detail.

≪実施の形態1≫
図1は、実施の形態1に係るデータプロセッサの一例である。
<< Embodiment 1 >>
FIG. 1 is an example of a data processor according to the first embodiment.

図1に示されるデータプロセッサ1は、データ処理を行うプロセッサコア(PRO_CORE)10と主記憶装置(MEM)40のアクセスを管理する物理アドレス管理モジュール(PAM)30とを有し、それらはバス50に共通接続される。また、前記PAM30には前記プロセッサコア10等の共有リソースである前記主記憶装置40が接続される。なお、前記バス50には、図示を省略するI/O回路、及びその他の周辺回路も接続される。   A data processor 1 shown in FIG. 1 includes a processor core (PRO_CORE) 10 that performs data processing and a physical address management module (PAM) 30 that manages access to a main storage device (MEM) 40, and includes a bus 50. Commonly connected to The PAM 30 is connected to the main storage device 40 which is a shared resource such as the processor core 10. The bus 50 is also connected to an I / O circuit (not shown) and other peripheral circuits.

前記プロセッサコア10は、中央処理装置(以下、「CPU」という。)101、メモリ管理ユニット(MMU)105、キャッシュメモリ(CACHE)102、ドメインIDレジスタ(DMID)103、ドメイン制御レジスタ(DMCR)104、及びバスインターフェース(BIF)106を有する。なお、図1には本実施の形態の説明に必要な構成要素のみ示している。   The processor core 10 includes a central processing unit (hereinafter referred to as “CPU”) 101, a memory management unit (MMU) 105, a cache memory (CACHE) 102, a domain ID register (DMID) 103, and a domain control register (DMCR) 104. And a bus interface (BIF) 106. FIG. 1 shows only the components necessary for the description of the present embodiment.

前記CPU101は、前記主記憶装置40に格納された命令をフェッチし、フェッチした命令をデコードし、デコードされた命令に従ってデータ処理を行う。また、前記CPU101における前記主記憶装置40に対するアクセスは、32ビットの論理アドレスと、後述する8ビットの保護ドメインID(ドメインID)によって指定される。論理アドレスは前記MMU105によって物理アドレスに変換され、前記バスインターフェース106を介して前記バス50上に物理アドレスと前記ドメインIDを出力することによりアクセスが実行される。   The CPU 101 fetches an instruction stored in the main storage device 40, decodes the fetched instruction, and performs data processing according to the decoded instruction. Access to the main storage device 40 by the CPU 101 is specified by a 32-bit logical address and an 8-bit protection domain ID (domain ID) described later. The logical address is converted into a physical address by the MMU 105, and access is executed by outputting the physical address and the domain ID on the bus 50 via the bus interface 106.

前記キャッシュメモリ102は、特に制限されないが、物理キャッシュである。前記キャッシュメモリ102の詳細については、後述する。   The cache memory 102 is a physical cache, although not particularly limited. Details of the cache memory 102 will be described later.

前記ドメイン制御レジスタ(DMCR)104は、詳細は後述するが、前記キャッシュメモリ102の拡張アレイ1022に記憶される情報の種類を決定するための値が格納される。   Although the details will be described later, the domain control register (DMCR) 104 stores a value for determining the type of information stored in the extended array 1022 of the cache memory 102.

前記ドメインIDレジスタ103には、ドメインID(DMID)が格納される。   The domain ID register 103 stores a domain ID (DMID).

前記ドメインIDについて、詳細に説明する。   The domain ID will be described in detail.

前記CPU101は複数のプログラムを実行する。それらのプログラムはアクセス可能なアドレス範囲が異なり、複数の動作モードで動作する。   The CPU 101 executes a plurality of programs. These programs have different accessible address ranges and operate in a plurality of operation modes.

図2は、前記CPU101が実行するプログラムの動作モードの説明図である。   FIG. 2 is an explanatory diagram of an operation mode of a program executed by the CPU 101.

図2に示すように、上位ソフトウェアであるオペレーティングシステムのプログラムは特権モード(PRIV mode)で表され、ユーザアプリケーションを実行するためのプログラムはユーザモード(USER mode)で表される。本実施の形態に係るデータプロセッサ1では、さらに上位の複数のオペレーティングシステムを管理統括する動作モード(以下、「XVSモード(XVS mode)」という。)を有する。前記XVSモードは最も権限が高い動作モードであり、オペレーティングシステム間の干渉防止や通信を実現するドメイン管理ソフトウェア(DMGR)が実行される。前記XVSモードでは、前記ドメインIDレジスタ103、及び前記ドメイン制御レジスタ104や前記PAM30の設定の書き換えを行うことが可能である。一方、前記XVSモード以外の動作モード(特権モード及びユーザモード)では上記設定の書き換えがモードレジスタ等のハードウェアで禁止され、ソフトウェアの不具合や悪意のあるプログラムからの保護が保障される。   As shown in FIG. 2, an operating system program that is higher-level software is represented in a privilege mode (PRIV mode), and a program for executing a user application is represented in a user mode (USER mode). The data processor 1 according to the present embodiment has an operation mode (hereinafter referred to as “XVS mode”) that manages and supervises a plurality of higher-level operating systems. The XVS mode is an operation mode with the highest authority, and executes domain management software (DMGR) that realizes interference prevention and communication between operating systems. In the XVS mode, the settings of the domain ID register 103, the domain control register 104, and the PAM 30 can be rewritten. On the other hand, in operation modes other than the XVS mode (privileged mode and user mode), rewriting of the above settings is prohibited by hardware such as a mode register, so that protection from software defects and malicious programs is ensured.

前記ドメインIDは、前記プログラムの実行を管理する上位ソフトウェアを識別するものであり、オペレーティングシステム毎に番号が割り振られている。前記ドメインIDは、複数のオペレーティングシステムが動作する場合に夫々のオペレーティングシステムを区別するために用いられる。前記CPU101は、前記XVSモードにおいて、実行されるオペレーティングシステムのドメインIDを前記ドメインIDレジスタに記憶する。本実施の形態では、前記ドメインIDをメモリ保護に用いる。例えば、オペレーティングシステムの管理下で動作するアプリケーションプログラムの前記主記憶装置40に対するアクセスが前記PAM30により管理される。   The domain ID identifies higher-order software that manages execution of the program, and a number is assigned to each operating system. The domain ID is used to distinguish each operating system when a plurality of operating systems operate. The CPU 101 stores the domain ID of the operating system to be executed in the domain ID register in the XVS mode. In this embodiment, the domain ID is used for memory protection. For example, the PAM 30 manages access to the main storage device 40 by an application program operating under the management of the operating system.

前記PAM30による前記主記憶装置40のアクセス管理の具体的な方法は以下である。   A specific method of access management of the main storage device 40 by the PAM 30 is as follows.

前記PAM30は、前記主記憶装置40のアドレスと当該アドレスにアクセス可能な保護ドメインID(DMID)とのデータ対を、エントリテーブルに複数記憶する。そして、前記プロセッサコア10が前記主記憶装置40に対してアクセスを要求するとき、前記PAM30は前記バス50に出力された物理アドレス(PADR)及び前記ドメインIDを受け取って、当該前記エントリテーブルのデータ対と比較することで、アクセス権限の確認を行う。なお、前記エントリテーブルは前記XVSモードで設定可能であり、例えば、システム起動時に、前記ドメイン管理ソフトウェアがオペレーティングシステムの起動に先立って設定を行う。   The PAM 30 stores a plurality of data pairs of an address of the main storage device 40 and a protection domain ID (DMID) accessible to the address in an entry table. When the processor core 10 requests access to the main storage device 40, the PAM 30 receives the physical address (PADR) and the domain ID output to the bus 50, and the data of the entry table Access authority is confirmed by comparing with a pair. The entry table can be set in the XVS mode. For example, when the system is started, the domain management software is set prior to starting the operating system.

図3は、実施の形態1に係るデータプロセッサの詳細なブロック図である。   FIG. 3 is a detailed block diagram of the data processor according to the first embodiment.

前記CPU101の論理アドレス空間は、特に制限されないが、32ビットのアドレス信号で管理される空間である。前記MMU105で生成される物理アドレス空間は最大で40ビット、最低32ビットのアドレス信号で管理される空間である。前述のように、ここでは理解を容易化するために、前記MMU105は32ビットの論理アドレスを上位物理アドレス(UPADR)[39:32]と下位物理アドレス(LPADR)[31:0]併せて一律40ビットの物理アドレスに変換し、32ビットの論理アドレスは32ビットのLPADRに等しくされる。   The logical address space of the CPU 101 is not particularly limited, but is a space managed by a 32-bit address signal. The physical address space generated by the MMU 105 is a space managed by an address signal having a maximum of 40 bits and a minimum of 32 bits. As described above, for the sake of easy understanding, the MMU 105 uses a 32-bit logical address as a combination of the upper physical address (UPADR) [39:32] and the lower physical address (LPADR) [31: 0]. Converting to a 40-bit physical address, the 32-bit logical address is made equal to the 32-bit LPADR.

上述のように前記CPU101の物理アドレス空間は最低32ビットのアドレス空間を更に8ビット拡張でき、また、前記PAM30による前記主記憶装置40のメモリ保護には最大8ビットのDMIDを用いることができる。前記キャッシュメモリ102は、最大8ビットのアドレス拡張と最大8ビットのDMIDを用いたメモリ保護に整合する連想記憶を行うことができるように考慮されている。以下その内容について詳述する。   As described above, the physical address space of the CPU 101 can further expand the address space of at least 32 bits by 8 bits, and DMID of a maximum of 8 bits can be used for protecting the memory of the main storage device 40 by the PAM 30. The cache memory 102 is considered to be able to perform associative storage consistent with memory protection using up to 8-bit address expansion and up to 8-bit DMID. The contents will be described in detail below.

前記キャッシュメモリ102は、SRAMで構成されたメモリ部1022〜1024と、タグアドレスの比較などを行ってキャッシュヒットかキャッシュミスかの判定等を行う比較部1025と、判定結果に基づいてデータを選択して出力する選択部1029と、前記メモリ部1022〜1024と前記比較部1025を制御する制御ロジック部1021とを有する。   The cache memory 102 includes memory units 1022 to 1024 configured by SRAM, a comparison unit 1025 that compares a tag address to determine whether a cache hit or a cache miss, and selects data based on the determination result And a control logic unit 1021 that controls the memory units 1022 to 1024 and the comparison unit 1025.

前記メモリ部1022〜1024は、特に制限されないが、4ウェイセットアソシアティブ構成を備え、セット毎に、拡張アレイ1022、タグアレイ1023及び、データアレイ1024を有する。夫々のアレイはインデックスアドレスによってインデックス可能にされるデータ行を有し、各アレイの対応するデータ行を併せてキャッシュラインと称し、キャッシュラインは、前記拡張アレイ1022における拡張データ、前記タグアレイ1023におけるタグ情報、前記データアレイ1024における複数アクセス単位分のデータ情報、及び有効ビットをキャッシュエントリとして保持する。   Although not particularly limited, the memory units 1022 to 1024 have a 4-way set associative configuration, and each set includes an expansion array 1022, a tag array 1023, and a data array 1024. Each array has a data line that can be indexed by an index address, and the corresponding data line of each array is collectively referred to as a cache line. The cache line is an extension data in the extension array 1022 and a tag in the tag array 1023. Information, data information for a plurality of access units in the data array 1024, and valid bits are held as cache entries.

前記拡張データは、例えば最大8ビットの拡張アドレス情報又は最大8ビットのDMIDであり、前記CPU101がメモリアクセスに際して出力する論理アドレスは便宜上、タグアドレスTAG、インデックスアドレスINDEX、及びオフセットアドレスOFSTとして図示する。ここでは32ビットの下位物理アドレス(LPADR)もこれと同じであると理解された。   The extension data is, for example, extension address information of up to 8 bits or DMID of up to 8 bits, and logical addresses output by the CPU 101 when accessing the memory are illustrated as a tag address TAG, an index address INDEX, and an offset address OFST for convenience. . Here, it is understood that the 32-bit lower physical address (LPADR) is the same.

前記CPU101のアクセスに際して前記メモリ部1022〜1024はインデックスアドレスINDEXで指定されるキャッシュラインの情報を前記比較部1025に与え、前記比較部1025はそのときの物理アドレス情報と前記DMCR104及び前記ドメインIDレジスタ103の値を参照してキャッシュヒット又はミスを判別する。前記CPU101のリードアクセスにおいてキャッシュヒットであればヒットに係るウェイのキャッシュラインの前記データアレイ1024のデータが前記選択部1029で選択され、オフセットアドレスOFSTで指定される必要なデータだけが前記CPU101に返される。リードアクセスにおいてキャッシュミスであれば前記制御ロジック部1021はそのときにアクセスアドレスを利用してバスサイクルを起動し、キャッシュミスに係るデータを読込んで前記CPU101に返すと共に読込んだデータなどに基づいてキャッシュエントリを生成する。ライトアクセスにおいてキャッシュヒットであればヒットに係るウェイのキャッシュラインの前記データアレイ1024に前記制御ロジック部1021が書込みデータを書込む。ライトアクセスにおいてキャッシュミスであれば前記制御ロジック部1021はそのときにアクセスアドレスを利用してバスサイクルを起動し、キャッシュミスに係るデータを読込んでキャッシュエントリを生成し、生成したキャッシュエントリの該当する前記データアレイ1024にキャッシュミスに係る書込みデータを格納する。   When accessing the CPU 101, the memory units 1022 to 1024 give the cache line information designated by the index address INDEX to the comparison unit 1025, and the comparison unit 1025 receives the physical address information at that time, the DMCR 104, and the domain ID register. A cache hit or miss is discriminated by referring to the value 103. In the case of a cache hit in the read access of the CPU 101, the data in the data array 1024 of the cache line of the way related to the hit is selected by the selection unit 1029, and only the necessary data specified by the offset address OFST is returned to the CPU 101. It is. If there is a cache miss in the read access, the control logic unit 1021 starts a bus cycle using the access address at that time, reads the data related to the cache miss, returns it to the CPU 101, and based on the read data, etc. Create a cache entry. If it is a cache hit in a write access, the control logic unit 1021 writes the write data to the data array 1024 of the cache line of the way related to the hit. If there is a cache miss in the write access, the control logic unit 1021 starts a bus cycle using the access address at that time, reads the data related to the cache miss, generates a cache entry, and corresponds to the generated cache entry. Write data relating to a cache miss is stored in the data array 1024.

前記拡張アレイ1022における拡張データは、前記DMCR104の設定によって決定される。   Expansion data in the expansion array 1022 is determined by the setting of the DMCR 104.

図4は、前記DMCR104の設定値と前記拡張データの一例である。   FIG. 4 is an example of the setting value of the DMCR 104 and the extension data.

前記DMCR104の設定は当該データプロセッサ1の応用システムにおいて必要な保護ドメインの数と、保護ドメイン内で利用する最大の主記憶容量値から決定される。例えば、オペレーティングシステムの数が10種類あり、その中で要求される最大の主記憶容量値が64GBである場合には、保護ドメインとして4ビットが必要となり、物理アドレスとして32ビットの下位物理アドレスに4ビットの上位物理アドレスを加えた36ビットが必要となる。そこで、前記拡張アレイ1022の8ビットの記憶容量を4ビットずつに分割し、一方の4ビットにDMIDを記憶し、他方の4ビットに上位物理アドレスを記憶できるようにする。この場合、図4に示すように、前記DMCR104の設定値を“01”とすることで、前記拡張アレイ1022[7:4]に上位物理アドレス[35:32]が記憶され、前記拡張アレイ1022[3:0]にDMID[3:0]が記憶される。一方、物理アドレスを拡張せず保護ドメインとして8ビットが必要な場合には前記DMCRの値を“00”に設定することで前記拡張アレイ1022[7:0]にDMID[7:0]が記憶され、物理アドレスを8ビット拡張する場合には前記DMCRの値を“10”に設定することで前記拡張アレイ1022[7:0]にUPADR[39:32]が記憶される。なお、前記DMCR104の設定値と前記拡張データの対応は上記の例に限定されず、前記拡張アレイ1022の用途に応じて変更可能である。   The setting of the DMCR 104 is determined from the number of protection domains required in the application system of the data processor 1 and the maximum main storage capacity value used in the protection domain. For example, if there are 10 types of operating systems and the maximum main storage capacity value required is 64 GB, 4 bits are required as a protection domain, and a 32-bit lower physical address is used as a physical address. 36 bits including the upper physical address of 4 bits are required. Therefore, the 8-bit storage capacity of the expansion array 1022 is divided into 4 bits, DMID is stored in one 4 bits, and higher physical address can be stored in the other 4 bits. In this case, as shown in FIG. 4, by setting the setting value of the DMCR 104 to “01”, the upper physical address [35:32] is stored in the extended array 1022 [7: 4], and the extended array 1022 DMID [3: 0] is stored in [3: 0]. On the other hand, if the physical address is not expanded and 8 bits are required as a protection domain, the DMCR value is set to “00” to store DMID [7: 0] in the expanded array 1022 [7: 0]. When the physical address is expanded by 8 bits, UPADR [39:32] is stored in the expanded array 1022 [7: 0] by setting the DMCR value to “10”. The correspondence between the setting value of the DMCR 104 and the extension data is not limited to the above example, and can be changed according to the use of the extension array 1022.

次にリードアクセスにおける前記キャッシュメモリ102の動作について詳細に説明する。   Next, the operation of the cache memory 102 in read access will be described in detail.

前記CPU101のリードアクセスに際して前記メモリ部1022〜1024はインデックスアドレスINDEXで指定されるキャッシュラインの情報を前記比較部1025及び前記選択部1029に与える。すなわち、ウェイ毎の前記タグ情報、前記有効ビット、及び前記拡張データが前記比較部1025に与えられ、夫々のウェイの前記データ情報が前記選択部1029に与えられる。更に、前記比較部1025は、UPADRとLPADRを入力する。前記比較部1025の動作について、図5を用いて詳細に説明する。   When the CPU 101 performs a read access, the memory units 1022 to 1024 provide the cache unit information specified by the index address INDEX to the comparison unit 1025 and the selection unit 1029. That is, the tag information for each way, the valid bit, and the extension data are provided to the comparison unit 1025, and the data information of each way is provided to the selection unit 1029. Further, the comparison unit 1025 inputs UPADR and LPADR. The operation of the comparison unit 1025 will be described in detail with reference to FIG.

図5は前記比較部1025のブロック図の一例である。   FIG. 5 is an example of a block diagram of the comparison unit 1025.

前記比較部1025は、拡張機能セレクタ1027、及び比較器1030、1031を有する。   The comparison unit 1025 includes an extended function selector 1027 and comparators 1030 and 1031.

前記拡張機能セレクタ1027は、前記DMCR104の値と、前記ドメインIDレジスタ103の値(DMID)とUPADRとを入力し、前記DMCR104の値に基づいてUPADR若しくはDMID、又はそれらの双方を選択して出力する。例えば図4の場合において、前記DMCRの値が“00”の場合にはDMID[7:0]を選択して出力する。また、前記DMCRの値が“11”の場合には上位物理アドレス[39:32]を選択して出力し、前記DMCRの値が“01”の場合にはDMID[3:0]と上位物理アドレス[35:32]を選択して夫々出力する。   The extended function selector 1027 inputs the value of the DMCR 104, the value (DMID) of the domain ID register 103, and UPADR, and selects and outputs UPADR or DMID or both based on the value of the DMCR 104 To do. For example, in the case of FIG. 4, when the DMCR value is “00”, DMID [7: 0] is selected and output. When the DMCR value is “11”, the upper physical address [39:32] is selected and output. When the DMCR value is “01”, DMID [3: 0] and the upper physical address are selected. The address [35:32] is selected and output.

前記比較器1031は、前記拡張機能セレクタ1027によって選択されたデータと前記拡張アレイ1022の情報とをウェイ毎に比較し、比較結果が一致している場合に比較結果一致を、そうでない場合には比較結果不一致を、ウェイ毎に出力する。例えば前記DMCR104の値が“00”の場合には、前記拡張データはDMID[7:0]であるので、前記比較器1031はDMIDの比較を行う。前記比較器1030は前記タグ情報[31:0]とLPADR[31:0]とをウェイ毎に比較し、比較結果が一致で且つ有効ビットが有効を示している場合に比較結果一致を、そうでない場合には比較結果不一致を、ウェイ毎に出力する。そして、前記比較器1030と前記比較器1031が共に比較結果一致となったウェイがあった場合は、前記比較部1025はキャッシュヒットをウェイ毎の信号HITにて出力する。一方、何れのウェイにおいても比較結果不一致であった場合は、キャッシュミスを前記信号HITにて出力する。前記HIT信号は前記制御ロジック部1021と前記選択部1029に与えられる。   The comparator 1031 compares the data selected by the extended function selector 1027 with the information in the extended array 1022 for each way, and if the comparison result is the same, the comparison result is the same. A comparison result mismatch is output for each way. For example, when the value of the DMCR 104 is “00”, since the extension data is DMID [7: 0], the comparator 1031 compares DMIDs. The comparator 1030 compares the tag information [31: 0] and LPADR [31: 0] for each way, and if the comparison result is coincident and the valid bit indicates valid, the comparison result coincides. Otherwise, a comparison result mismatch is output for each way. If there is a way in which both the comparator 1030 and the comparator 1031 match the comparison result, the comparison unit 1025 outputs a cache hit as a signal HIT for each way. On the other hand, if the comparison result does not match in any way, a cache miss is output by the signal HIT. The HIT signal is given to the control logic unit 1021 and the selection unit 1029.

前記比較部1025による比較によりキャッシュヒットとなった場合には、前記選択部1029が前記信号HITに基づいて、4つのウェイのうちヒットした1つのウェイのデータを選択して出力する。一方、キャッシュミスとなった場合には、前記制御ロジック部1021がそのときの物理アドレスを利用してバスサイクルを起動し、キャッシュミスに係るデータを読込むための指令を前記バスインターフェース106に与える。前記バスインターフェース106は、前記PAM30に物理アドレスともにDMIDを与えることで前記主記憶装置40からのデータの転送を指示する。このとき、前記バスインターフェース106は前記DMCR104の値を参照し、管理されるアドレス空間のビット数に応じた物理アドレスを前記PAM30に与える。例えば図4の場合において、前記DMCR103の値が“00”のとき、管理されるアドレス空間は32ビットであるから、LPADR[31:0]を出力する。一方、前記DMCR103の値が“11”のとき、管理されるアドレス空間は40ビットであるから、UPADR[39:32]とLPADR[31:0]を出力する。   When the comparison unit 1025 makes a cache hit by the comparison, the selection unit 1029 selects and outputs data of one way hit among the four ways based on the signal HIT. On the other hand, when a cache miss occurs, the control logic unit 1021 starts a bus cycle using the physical address at that time, and gives a command to the bus interface 106 to read data related to the cache miss. The bus interface 106 instructs the PAM 30 to transfer data from the main storage device 40 by giving a DMID together with a physical address. At this time, the bus interface 106 refers to the value of the DMCR 104 and gives a physical address corresponding to the number of bits of the managed address space to the PAM 30. For example, in the case of FIG. 4, when the value of the DMCR 103 is “00”, LPADR [31: 0] is output because the managed address space is 32 bits. On the other hand, when the value of the DMCR 103 is “11”, the address space to be managed is 40 bits, so UPADR [39:32] and LPADR [31: 0] are output.

上記指示により前記主記憶装置40から得られたデータは、前記バスインターフェース106を介して前記制御ロジック部1021に与えられる。そして、前記制御ロジック部1021は、読み込んだデータのうち前記オフセットアドレスOFSTで指定される必要なデータだけを前記CPU101に返すとともに、読み込んだデータに基づいてキャッシュエントリを生成する。キャッシュエントリの生成方法を以下に記す。   Data obtained from the main storage device 40 in accordance with the instruction is given to the control logic unit 1021 via the bus interface 106. The control logic unit 1021 returns only the necessary data specified by the offset address OFST among the read data to the CPU 101 and generates a cache entry based on the read data. The cache entry generation method is described below.

前記制御ロジック部1021は、読み込んだデータをインデックスされたキャッシュラインに対応する前記データアレイ1024に格納する。また、前記制御ロジック部1021の内部に備えられた書込み制御部1026が、インデックスされたキャッシュラインに対応する前記タグアレイ1023にアクセスアドレスのLPADRのタグ情報を記憶するとともに有効ビットを有効にする。更に前記書込み制御部1026は、前記DMCR104の値に基づいて、当該キャッシュラインに対応する前記拡張アレイ1022に前記拡張データを記憶する。   The control logic unit 1021 stores the read data in the data array 1024 corresponding to the indexed cache line. Further, the write control unit 1026 provided in the control logic unit 1021 stores the LPADR tag information of the access address in the tag array 1023 corresponding to the indexed cache line and enables the valid bit. Further, the write control unit 1026 stores the extension data in the extension array 1022 corresponding to the cache line based on the value of the DMCR 104.

図6に、前記DMCR104の設定値と前記拡張アレイ1022に格納されるデータとの対応関係の一例を示す。   FIG. 6 shows an example of a correspondence relationship between the setting value of the DMCR 104 and the data stored in the expansion array 1022.

前記書込み制御部1026は、例えば図6に示すように、前記DMCR104の値が“00”の場合にはDMID[7:0]を前記拡張データとして前記拡張アレイ1022に格納し、前記DMCR104の値が“11”の場合にはUPADR[39:32]を前記拡張データとして格納する。さらに、前記DMCRの値が“01”の場合には、DMID[3:0]とUPADR[35:32]を併せた8ビットを前記拡張データとして格納する。   For example, as shown in FIG. 6, when the value of the DMCR 104 is “00”, the write control unit 1026 stores DMID [7: 0] as the extension data in the extension array 1022, and the value of the DMCR 104 When “11” is “11”, UPADR [39:32] is stored as the extension data. Further, when the value of the DMCR is “01”, 8 bits including DMID [3: 0] and UPADR [35:32] are stored as the extension data.

以上の方法によりインデックスされたキャッシュラインに対応する前記メモリ部1022〜1024に前記タグ情報、前記拡張データ、及びデータ情報が格納される。   The tag information, the extension data, and the data information are stored in the memory units 1022 to 1024 corresponding to the cache lines indexed by the above method.

次にライトアクセスにおける前記キャッシュメモリ102の動作について説明する。   Next, the operation of the cache memory 102 in write access will be described.

前記CPU101のライトアクセスに際して、前述のリードアクセス時と同様に、前記比較部1025に対しインデックスアドレスINDEXで指定されるキャッシュラインのウェイ毎の前記タグ情報及び前記有効ビットが与えられる。そして、リードアクセス時と同様の方法により前記拡張機能セレクタ1027が選択したデータと前記拡張データとの比較を前記比較器1031が行うとともに、前記比較器1030が前記タグ情報とLPADRとの比較を行うことによりキャッシュヒット又はミスを判別する。比較した結果、キャッシュヒットであればヒットに係るウェイのキャッシュラインに対応する前記データアレイ1024のオフセットアドレスOFSTによってインデックスされるデータアレイに対し、前記制御ロジック部1021がデータを書込む。一方キャッシュミスであれば、リードアクセス時と同様の方法で前記制御ロジック部1021はそのときにアクセスアドレスを利用してバスサイクルを起動し、キャッシュミスに係るデータを読込んでキャッシュエントリを生成する。そして、当該エントリに係る前記データアレイ1024のオフセットアドレスOFSTによってインデックスされるデータアレイに対し、キャッシュミスに係る書込みデータを格納する。   When the CPU 101 performs a write access, the tag information and the valid bit for each way of the cache line specified by the index address INDEX are given to the comparison unit 1025 as in the case of the read access described above. Then, the comparator 1031 compares the data selected by the extended function selector 1027 with the extended data in the same manner as in read access, and the comparator 1030 compares the tag information with LPADR. Thus, a cache hit or miss is determined. If the result of the comparison is a cache hit, the control logic unit 1021 writes data to the data array indexed by the offset address OFST of the data array 1024 corresponding to the cache line of the way related to the hit. On the other hand, if it is a cache miss, the control logic unit 1021 activates a bus cycle using the access address at that time in the same manner as at the time of read access, reads the data related to the cache miss, and generates a cache entry. Then, write data relating to a cache miss is stored in the data array indexed by the offset address OFST of the data array 1024 relating to the entry.

以上実施の形態1に係るデータプロセッサによれば、前記キャッシュメモリ102は、前記拡張アレイ1022と前記DMCR104を備えることで、応用システムに応じて保護ドメイン数と物理アドレス空間の大きさを段階的に選択することが可能となる。これにより、8ビットの保護ドメインと8ビットの上位物理アドレスを別個に記憶する従来方式と比較して、前記プロセッサコア10の面積を大きく占めるキャッシュメモリアレイの規模を小さく抑えることができる。   According to the data processor according to the first embodiment, the cache memory 102 includes the expansion array 1022 and the DMCR 104, so that the number of protection domains and the size of the physical address space can be increased stepwise according to the application system. It becomes possible to select. As a result, the size of the cache memory array that occupies a large area of the processor core 10 can be reduced as compared with the conventional method in which the 8-bit protection domain and the 8-bit upper physical address are separately stored.

≪実施の形態2≫
図7は、実施の形態2に係るデータプロセッサのブロック図である。
<< Embodiment 2 >>
FIG. 7 is a block diagram of a data processor according to the second embodiment.

図7に示されるデータプロセッサ2は、プロセッサコアを複数有し、夫々のプロセッサコア20_A〜20_Cはバス51に共通接続され、物理アドレス管理モジュール(PAM)31を介して主記憶装置41を供用する。前記PAM31は、前記PAM30と同様の方法により前記主記憶装置41のアクセスを管理する。また、前記プロセッサコア20_A〜20_Cは、実施の形態1に係るプロセッサコア10と同様の機能を有し、夫々独立したDMIDとアドレス空間を設定することが可能である。   The data processor 2 shown in FIG. 7 has a plurality of processor cores, and the processor cores 20_A to 20_C are commonly connected to the bus 51 and use the main storage device 41 via the physical address management module (PAM) 31. . The PAM 31 manages access to the main storage device 41 by the same method as the PAM 30. The processor cores 20_A to 20_C have the same function as the processor core 10 according to the first embodiment, and can set independent DMIDs and address spaces.

図8に前記プロセッサコア20_A〜20_Cに係るDMIDとアドレス空間の設定例を示す。   FIG. 8 shows a setting example of DMID and address space related to the processor cores 20_A to 20_C.

図8において、前記プロセッサコア20_Aは1つの保護ドメインと40ビット(1TB)の物理アドレス空間が設定される。また、前記プロセッサコア20_Bは16個(4ビット)の保護ドメインと36ビット(64GB)の物理アドレス空間が設定され、そして前記プロセッサコア20_Cは256個(8ビット)の保護ドメインと32ビット(4GB)の物理アドレス空間が設定される。このとき、前記バス51は前記プロセッサコア20_A〜20_Cにおける最大のアドレス空間40ビットと最大の保護ドメイン数8ビット(256個)のバス幅を含み、前記PAM31及び前記主記憶装置41は、とり得る最大の物理アドレス空間40ビットで特定される空間に対し、256個の保護ドメインに分割して対応できるようになっている。このように異なる保護ドメイン数と物理アドレス空間が設定された複数のプロセッサコアがバスアクセスする場合に以下のような問題が生じる。   In FIG. 8, the processor core 20_A is set with one protection domain and a 40-bit (1 TB) physical address space. The processor core 20_B has a protection domain of 16 (4 bits) and a physical address space of 36 bits (64 GB), and the processor core 20_C has a protection domain of 256 (8 bits) and 32 bits (4 GB). ) Physical address space is set. At this time, the bus 51 includes a maximum address space of 40 bits and a maximum protection domain number of 8 bits (256) in the processor cores 20_A to 20_C, and the PAM 31 and the main storage device 41 can take. The space specified by the maximum physical address space of 40 bits can be handled by dividing it into 256 protection domains. When a plurality of processor cores having different protection domain numbers and physical address spaces set as described above perform bus access, the following problems occur.

例えば、図8に示すように設定された前記プロセッサコア20_Bに係るキャッシュメモリ102_Bがキャッシュミスに係るデータを読込むための指令をバスインターフェースに与える場合において、前記バスインターフェースは前記PAM31に物理アドレスと共に保護ドメイン(DMID)を与えることで前記主記憶装置41からのデータの転送を指示する。このとき、前記プロセッサコア20_Bにおいて管理される物理アドレス空間は36ビット、保護ドメインは4ビットであるから、8ビットの保護ドメインと40ビットのアドレス空間が設定されたアクセス対象にバスアクセスを行うためには情報が不足するという問題が生じる。そこで、実施の形態2に係る前記プロセッサコア20_A〜20_Cは、実施の形態1に係るプロセッサコア10の前記バスインターフェース106に代えて、バスアクセスのためのアドレスビット数と保護ドメインに情報を補完する機能を有するバスインターフェース206を有し、更に前記補完のための情報が格納される補完レジスタ(EXTID)107を有する。   For example, when the cache memory 102_B related to the processor core 20_B set as shown in FIG. 8 gives a command for reading data related to a cache miss to the bus interface, the bus interface sends a protection domain to the PAM 31 along with a physical address. By giving (DMID), the transfer of data from the main storage device 41 is instructed. At this time, since the physical address space managed in the processor core 20_B is 36 bits and the protection domain is 4 bits, in order to perform bus access to an access target in which an 8-bit protection domain and a 40-bit address space are set. Has the problem of lack of information. Therefore, the processor cores 20_A to 20_C according to the second embodiment supplement the information in the number of address bits and the protection domain for bus access instead of the bus interface 106 of the processor core 10 according to the first embodiment. The bus interface 206 has a function, and further includes a complement register (EXTID) 107 in which information for the complement is stored.

図9に前記データプロセッサ2の詳細なブロック図を示す。ここでは説明を容易にするため、前記プロセッサコア20_A〜20_Cのうち一つのプロセッサコアと前記バス51との接続関係のみ示す。   FIG. 9 shows a detailed block diagram of the data processor 2. Here, for ease of explanation, only the connection relationship between one of the processor cores 20_A to 20_C and the bus 51 is shown.

図9において、前記バスインターフェース206と前記EXTID107以外の構成要素は前記プロセッサコア10と同様である。前記バスインターフェース206は、上位物理アドレス(UPADR)、下位物理アドレス(LPADR)、前記ドメインIDレジスタ103及び前記DMCR104の値を入力すると共に前記EXTID107の値を入力する。   In FIG. 9, the components other than the bus interface 206 and the EXTID 107 are the same as those of the processor core 10. The bus interface 206 inputs the upper physical address (UPADR), the lower physical address (LPADR), the values of the domain ID register 103 and the DMCR 104 and the value of the EXTID 107.

前記EXTID107には、前記DMCR104の値に応じた補完ビットの情報が格納される。特に限定されないが、ここでは前記拡張アレイ1022と同一に8ビットの記憶容量を備える。例えば前述した図4の場合において、前記DMCR104の値が“00”のとき、物理アドレスは32ビット、DMIDは8ビットであるから、バスアクセスを行うためには物理アドレスが8ビット不足する。そこで、前記EXTID107には8ビット分の物理アドレスの補完ビットが格納される。また、前記DMCR104の値が“01”であるとき、物理アドレスは36ビット、DMIDは4ビットであるから、前記EXTID107には物理アドレスとDMIDの夫々につき4ビット分の補完ビットが格納される。更に、前記DMCR104の値が“10”であるとき、物理アドレスは40ビット、DMIDは0ビットであるから、前記EXTID107には8ビット分のDMIDの補完ビットが格納される。   In the EXTID 107, information on complementary bits corresponding to the value of the DMCR 104 is stored. Although not particularly limited, the storage capacity of 8 bits is provided in the same manner as the expansion array 1022 here. For example, in the case of FIG. 4 described above, when the value of the DMCR 104 is “00”, the physical address is 32 bits and the DMID is 8 bits. Therefore, the EXTID 107 stores 8 bits of complementary bits of the physical address. When the value of the DMCR 104 is “01”, since the physical address is 36 bits and the DMID is 4 bits, the EXTID 107 stores 4 complementary bits for each of the physical address and DMID. Further, when the value of the DMCR 104 is “10”, since the physical address is 40 bits and the DMID is 0 bits, the EXTID 107 stores DMID complementary bits for 8 bits.

前記バスインターフェース206によるビットの補完に係る具体的な処理内容は以下である。   Specific processing contents related to bit complementation by the bus interface 206 are as follows.

例えば前記キャッシュメモリ102がキャッシュミスに係るデータを読込む場合において、前記バスインターフェース206がデータを読み込むための指令を前記キャッシュメモリ102から受け取ると、前記バスインターフェース206は前記DMCR104の値を参照する。そして、前記バスインターフェース206は前記DMCR104の値に基づいて、入力された物理アドレスとDMIDの情報に前記補完ビットを補完して、新たな物理アドレスPADR2とDMID2を前記PAM31に与えることで前記主記憶装置41からのデータの転送を指示する。   For example, when the cache memory 102 reads data related to a cache miss, when the bus interface 206 receives a command for reading data from the cache memory 102, the bus interface 206 refers to the value of the DMCR 104. Then, the bus interface 206 complements the input physical address and DMID information with the complementary bit based on the value of the DMCR 104, and provides the PAM 31 with new physical addresses PADR2 and DMID2, thereby providing the main memory. An instruction to transfer data from the device 41 is given.

図10は、前記バスインターフェース206が補完する情報の一例である。   FIG. 10 shows an example of information supplemented by the bus interface 206.

例えば前記DMCRの値が“00”であるとき、前記バスインターフェース206は前記EXTID107に格納された前記補完ビット[7:0]を上位物理アドレス(UPDR2)とし、当該UPADR2[7:0]とLPADR[31:0]とを併せた新たな物理アドレスPADR2[39:0]を出力する。また前記バスインターフェース206は、前記DMID[7:0]を前記DMID2[7:0]として出力する。前記DMCRの値が“01”であるとき前記バスインターフェース206は、前記EXTID107に格納された前記補完ビット[7:4]を上位物理アドレス(UPDR2)とし、当該UPADR2[7:4]とLPADR[31:0]とを併せた物理アドレスPADR2[35:0]を出力する。また、前記バスインターフェース206は、前記EXTID107に格納された前記補完ビット[3:0]と前記DMID[7:4]とを併せたDMID2[7:0]を出力する。このとき、前記DMID2[7:0]のうち上位側のDMID2[7:4]の値のみが意味をなす。前記DMCRの値が“00”であるとき、前記バスインターフェース206は、前記EXTID107に格納された前記補完ビット[7:0]をDMID2[7:0]として出力する。このとき、前記DMID2[7:0]の値は意味をなさない。また、前記バスインターフェース206は、前記UPADR[38:32]をUPADR2[38:32]として出力される。   For example, when the DMCR value is “00”, the bus interface 206 uses the complementary bits [7: 0] stored in the EXTID 107 as the upper physical address (UPDR2), and the UPADR2 [7: 0] and LPADR. A new physical address PADR2 [39: 0] combined with [31: 0] is output. The bus interface 206 outputs the DMID [7: 0] as the DMID2 [7: 0]. When the DMCR value is “01”, the bus interface 206 uses the complementary bits [7: 4] stored in the EXTID 107 as the upper physical address (UPDR2), and the UPADR2 [7: 4] and LPADR [ 31: 0] and a physical address PADR2 [35: 0] are output. The bus interface 206 outputs DMID2 [7: 0], which is a combination of the complementary bits [3: 0] stored in the EXTID 107 and the DMID [7: 4]. At this time, only the value of DMID2 [7: 4] on the upper side of the DMID2 [7: 0] makes sense. When the DMCR value is “00”, the bus interface 206 outputs the complementary bits [7: 0] stored in the EXTID 107 as DMID2 [7: 0]. At this time, the value of the DMID2 [7: 0] does not make sense. The bus interface 206 outputs the UPADR [38:32] as UPADR2 [38:32].

以上実施の形態2によれば、前記キャッシュメモリ102のバスアクセスに際し、プロセッサコアのバスインターフェースから出力するアドレス等のビット数とアクセスの対象のアドレス等のビット数とが相違する場合であってもバスアクセスが可能となるから、前記キャッシュメモリ102を適用した複数のプロセッサコアを共通バスに接続することができる。   According to the second embodiment, even when the cache memory 102 is accessed by the bus, even if the number of bits such as the address output from the bus interface of the processor core is different from the number of bits such as the address to be accessed. Since bus access is possible, a plurality of processor cores to which the cache memory 102 is applied can be connected to a common bus.

実施の形態2に係るデータプロセッサの構成を適用しない従来のデータプロセッサでは、複数のプロセッサコアが要求する物理アドレス空間及び保護ドメインが異なる場合、最大の物理アドレス空間及び最大の保護ドメイン数を兼ね備えたキャッシュメモリを採用しなければならなかった。しかし本実施の形態によれば、プロセッサコアの面積を小さく抑えつつも、多様なドメインに対応した保護と物理アドレス空間の拡張に対応することができる。   In the conventional data processor to which the configuration of the data processor according to the second embodiment is not applied, the maximum physical address space and the maximum number of protection domains are combined when the physical address space and the protection domain required by the plurality of processor cores are different. I had to use cache memory. However, according to the present embodiment, it is possible to cope with protection corresponding to various domains and expansion of the physical address space while keeping the area of the processor core small.

≪実施の形態3≫
図11に実施の形態3に係るデータプロセッサ3を示す。
<< Embodiment 3 >>
FIG. 11 shows a data processor 3 according to the third embodiment.

実施の形態1に係るデータプロセッサ1では、前記キャッシュメモリ102の前記拡張アレイ1022に前記物理アドレスと前記保護ドメイン(DMID)が切り換え可能に格納されたが、前記データプロセッサ3に係る前記拡張アレイには、前記保護ドメイン(DMID)と誤り訂正符号(以下、「ECC(Error Checking and Correction)コード」という。)が切り換え可能に格納される。ここで、ECCとは、RAM(Random Access Memory)を構成する記憶素子の情報が放射線や中性子線の影響で反転するソフトエラーを回避するために誤りを検出して訂正する機能である。以下の説明では、32ビットのデータに対して4ビットの冗長ビットを用いるECCを一例として説明する。   In the data processor 1 according to the first embodiment, the physical address and the protection domain (DMID) are stored in the extended array 1022 of the cache memory 102 so as to be switchable. The protection domain (DMID) and the error correction code (hereinafter referred to as “ECC (Error Checking and Correction) code”) are stored in a switchable manner. Here, the ECC is a function of detecting and correcting an error in order to avoid a soft error in which information of a storage element constituting a RAM (Random Access Memory) is reversed due to the influence of radiation or neutron radiation. In the following description, ECC using 4 redundant bits for 32-bit data will be described as an example.

実施の形態3に係る前記データプロセッサ3は、実施の形態1に係るデータプロセッサ10の前記キャッシュメモリ102と前記DMCR104に代えて、キャッシュメモリ302とドメイン制御レジスタ(DMCR)103を有する。   The data processor 3 according to the third embodiment includes a cache memory 302 and a domain control register (DMCR) 103 instead of the cache memory 102 and the DMCR 104 of the data processor 10 according to the first embodiment.

前記キャッシュメモリ302は、データのエラーを検出し訂正するエラー訂正論理部(ECR(Error Corrector))3027を更に有し、また前記拡張アレイ1022、前記制御ロジック部1021、及び前記比較部1025に代えて、拡張アレイ3022、制御ロジック部3021、及び比較部3025を有する。その他の構成要素は前記キャッシュメモリ102と同様とすることで、その詳細な説明を省略する。   The cache memory 302 further includes an error correction logic unit (ECR (Error Collector)) 3027 that detects and corrects data errors, and replaces the expansion array 1022, the control logic unit 1021, and the comparison unit 1025. And an expansion array 3022, a control logic unit 3021, and a comparison unit 3025. The other components are the same as those of the cache memory 102, and a detailed description thereof is omitted.

前記拡張アレイ3022は、特に制限されないが、ここでは8ビットの記憶容量を持つ。前記拡張データは、例えば最大8ビットの保護ドメイン(DMID)又は最大4ビットのECCコードであり、それは前記DMCR304の設定値によって決定される。   The expansion array 3022 is not particularly limited, but here has a storage capacity of 8 bits. The extension data is, for example, a protection domain (DMID) having a maximum of 8 bits or an ECC code having a maximum of 4 bits, which is determined by a setting value of the DMCR 304.

図12に、前記DMCR304の設定値と拡張データの対応関係の一例を示す。   FIG. 12 shows an example of the correspondence between the setting value of the DMCR 304 and the extended data.

この場合、前記DMCR304の値を“0”に設定することで、前記拡張アレイ3022[7:0]にDMID[7:0]が記憶される。一方、前記DMCR304の値を“0”に設定することで、前記拡張アレイ3022[3:0]にDMID[3:0]が記憶されると共に前記拡張アレイ3022[7:4]にECCコード[3:0]が記憶され、前記キャッシュメモリ302は、4ビットの保護ドメイン(DMID)と4ビットの冗長符号を備えたECCメモリに対応するキャッシュメモリとなる。   In this case, the DMID [7: 0] is stored in the extended array 3022 [7: 0] by setting the value of the DMCR 304 to “0”. On the other hand, by setting the value of the DMCR 304 to “0”, DMID [3: 0] is stored in the extended array 3022 [3: 0] and the ECC code [ 3: 0] is stored, and the cache memory 302 is a cache memory corresponding to an ECC memory having a 4-bit protection domain (DMID) and a 4-bit redundant code.

前記比較部3025は、前記CPU101のリードアクセスに際して、前記比較部1025と同様にキャッシュヒット又はミスを判別する。このとき、前記比較部1025は、前記拡張データEXT[7:0]とDMID[7:0]の比較を実行するが、当該比較は、DMIDの上位側DMID[7:4]と前記拡張データの上位側拡張データEXT[7:4]の比較と、DMIDの下位側DMID[3:0]と前記拡張データの下位側拡張データEXT[3:0]の比較に分割されて実行される。   The comparison unit 3025 determines a cache hit or miss in the same way as the comparison unit 1025 when the CPU 101 performs a read access. At this time, the comparison unit 1025 compares the extension data EXT [7: 0] and DMID [7: 0]. The comparison is performed by comparing the DMID upper DMID [7: 4] and the extension data. Are divided into the comparison of the higher-order extension data EXT [7: 4] and the lower-order DMID [3: 0] of the DMID and the lower-order extension data EXT [3: 0] of the extension data.

前記比較部3025は、前記CPU101のリードアクセスに際して、前記拡張アレイ3022と前記タグアレイ1023からウェイ毎の前記タグ情報TAG、前記有効ビット、及び前記拡張データEXTが与えられる。また、前記比較部3025は、UPADR、LPADR、前記DMID、及びDMCR304の値を入力する。   The comparison unit 3025 is supplied with the tag information TAG, the valid bit, and the extension data EXT for each way from the extension array 3022 and the tag array 1023 when the CPU 101 performs a read access. Further, the comparison unit 3025 inputs UPADR, LPADR, DMID, and DMCR 304 values.

図13は前記比較部3025のブロック図の一例である。   FIG. 13 is an example of a block diagram of the comparison unit 3025.

前記比較部3025は、比較器3031〜3033、及びロジック部3034を有する。   The comparison unit 3025 includes comparators 3031 to 3033 and a logic unit 3034.

前記比較器3031は、LPADRと前記タグ情報TAGとをウェイ毎に比較し、比較結果が一致している場合に比較結果一致を、そうでない場合には比較結果不一致を、ウェイ毎に出力する。また、前記比較器3032は、前記下位側DMID[3:0]と前記下位側拡張データEXT[3:0]をウェイ毎に比較し、比較結果が一致している場合に比較結果一致を、そうでない場合には比較結果不一致を、ウェイ毎に出力する。更に、前記比較器3033は、前記上位側DMID[7:4]と前記上位側拡張データEXT[7:4]をウェイ毎に比較し、比較結果が一致している場合に比較結果一致を、そうでない場合には比較結果不一致を、ウェイ毎に出力する。   The comparator 3031 compares the LPADR and the tag information TAG for each way, and outputs a comparison result coincidence if the comparison results match, and a comparison result disagreement for each way otherwise. The comparator 3032 compares the lower-order DMID [3: 0] and the lower-order extended data EXT [3: 0] for each way, and if the comparison results match, the comparison result matches. Otherwise, a comparison result mismatch is output for each way. Further, the comparator 3033 compares the higher-order DMID [7: 4] and the higher-order extended data EXT [7: 4] for each way, and if the comparison results match, the comparison result matches. Otherwise, a comparison result mismatch is output for each way.

前記ロジック部3034は前記比較器3031〜3033の比較結果を入力し、キャッシュヒット・キャッシュミスをウェイ毎の信号HITにて出力する。このとき前記ロジック部3034は、前記DMCR304の値を入力し、前記DMCR304の値に応じて前記比較器3033の比較結果の有効と無効を判断する。すなわち、図12の場合において前記DMCR304の値が“0”のとき、前記上位側拡張データEXT[7:4]と前記下位側拡張データEXT[3:0]は共にDMIDであるので、前記比較部3033の比較結果を有効とし、全ての前記比較器3031〜3033の比較結果に基づいてキャッシュヒット・ミスを判断する。一方、前記DMCR304の値が“1”のとき、前記上位側拡張データEXT[7:4]はECCコードであり、下位側拡張データEXT[3:0]はDMIDである。すなわち、前記比較部3033はECCコードとDMIDを比較していることから、前記ロジック部3034は当該比較結果を無効とし、前記比較器3031と前記比較器3032の比較結果に基づいてキャッシュヒット・ミスを判断する。前記比較部3033の比較結果の有効・無効を判断するには、例えば図13に示すように、前記比較部3033の比較結果と前記DMCR304の値の論理和をウェイ毎にとればよい。   The logic unit 3034 receives the comparison results of the comparators 3031 to 3033 and outputs a cache hit / cache miss as a signal HIT for each way. At this time, the logic unit 3034 receives the value of the DMCR 304 and determines whether the comparison result of the comparator 3033 is valid or invalid according to the value of the DMCR 304. That is, in the case of FIG. 12, when the value of the DMCR 304 is “0”, the upper side extension data EXT [7: 4] and the lower side extension data EXT [3: 0] are both DMIDs. The comparison result of the unit 3033 is validated, and a cache hit / miss is determined based on the comparison results of all the comparators 3031 to 3033. On the other hand, when the value of the DMCR 304 is “1”, the upper side extension data EXT [7: 4] is an ECC code, and the lower side extension data EXT [3: 0] is a DMID. That is, since the comparison unit 3033 compares the ECC code and the DMID, the logic unit 3034 invalidates the comparison result, and the cache hit / miss is performed based on the comparison result of the comparator 3031 and the comparator 3032. Judging. In order to determine validity / invalidity of the comparison result of the comparison unit 3033, for example, as shown in FIG. 13, the logical sum of the comparison result of the comparison unit 3033 and the value of the DMCR 304 may be taken for each way.

前記エラー訂正論理部(ECR)3027は、前記CPU101のリードアクセスに際して、前記データアレイ1024から与えられたデータDATAのエラーを検出し訂正する。また、前記ECR3027は、前記DMCR304の値に基づいて、エラー訂正を施したデータ又は前記データDATAの何れかを選択して出力する。   The error correction logic unit (ECR) 3027 detects and corrects an error in the data DATA provided from the data array 1024 when the CPU 101 performs a read access. Further, the ECR 3027 selects and outputs either error-corrected data or the data DATA based on the value of the DMCR 304.

図14に前記ECR3027のブロック図の一例を示す。   FIG. 14 shows an example of a block diagram of the ECR 3027.

前記ECR3027は、前記CPU101のリードアクセスに際して、前記拡張アレイ3022と前記データアレイ1024から、インデックスアドレスINDEXで指定されるキャッシュラインの情報としてウェイ毎の前記拡張データEXTとデータDATAを受け取る。受け取った前記拡張データのうち前記上位側拡張データEXT[7:4]と、データDATAが、ECCデコード部(ECCDEC)3028_0〜3028_3にウェイ毎に入力される。前記ECCデコード部3028_0〜3028_3は、必要に応じて前記上位側拡張データEXT[7:4]を用いて前記データDATAにエラー訂正を施し、エラー訂正されたデータを選択回路3029_0〜3029_3に与える。前記選択回路3029_0〜3029_3は、前記DMCR304の値を入力し、当該値に基づいて、エラー訂正されたデータと前記データDATAの何れかのデータを選択して出力する。例えば、図12の場合において、前記DMCR304の値が“0”の場合には、ECC機能は無効とし、データDATA0〜3をそのまま前記選択部1029に与える。一方、前記DMCR104の値が“1”の場合には、ECC機能を有効とし、ECCデコード部3028_0〜3028_3からの出力データを選択して前記選択部1029に与える。   The ECR 3027 receives the extension data EXT and data DATA for each way as cache line information specified by the index address INDEX from the extension array 3022 and the data array 1024 when the CPU 101 performs read access. Of the received extension data, the higher-order extension data EXT [7: 4] and data DATA are input to the ECC decoding units (ECDECEC) 3028_0 to 3028_3 for each way. The ECC decoding units 3028_0 to 3028_3 perform error correction on the data DATA using the higher-order extension data EXT [7: 4] as necessary, and provide the error-corrected data to the selection circuits 3029_0 to 3029_3. The selection circuits 3029_0 to 3029_3 receive the value of the DMCR 304, and select and output either the error-corrected data or the data DATA based on the value. For example, in the case of FIG. 12, when the value of the DMCR 304 is “0”, the ECC function is invalidated and the data DATA0 to 3 are supplied to the selection unit 1029 as they are. On the other hand, when the value of the DMCR 104 is “1”, the ECC function is enabled, and output data from the ECC decoding units 3028_0 to 3028_3 is selected and supplied to the selection unit 1029.

前記制御ロジック部3021は書込み制御部3026を有し、前記書込み制御部3026は前記書込み制御部1026の機能に加え、拡張データ生成部(EXTGEN)3030を有する。   The control logic unit 3021 has a write control unit 3026, and the write control unit 3026 has an extended data generation unit (EXTGEN) 3030 in addition to the functions of the write control unit 1026.

前記EXTGEN3030は、キャッシュミスに係るキャッシュエントリ生成時、及びライトアクセスの際のキャッシュエントリ生成時に前記拡張データを前記拡張アレイ3022に格納するが、このとき前記ECCコードも生成する。   The EXTGEN 3030 stores the extension data in the extension array 3022 when generating a cache entry related to a cache miss and when generating a cache entry at the time of write access. At this time, the EXTGEN 3030 also generates the ECC code.

図15は、前記拡張データ生成部(EXTGEN)3030のブロック図の一例である。ここでは、前記拡張データ[7:0]のうち上位側拡張データ[7:4]を生成する機能を実現する回路ブロックのみを図示する。   FIG. 15 is an example of a block diagram of the extension data generation unit (EXTGEN) 3030. Here, only a circuit block that realizes a function of generating higher-order extension data [7: 4] among the extension data [7: 0] is illustrated.

例えばキャッシュミスに係るデータを読み込んでキャッシュエントリを生成する際に、前記主記憶装置40から読み出されたデータWDATAがECCコード生成部(ECCGEN)3035に入力される。前記ECCGEN3035は、当該データWDATAのECCコードを生成して選択回路3036に与える。前記選択回路3036は、前記DMCR304の値に基づいてDMIDと生成されたECCコードの何れかを選択して前記拡張アレイ3022に与える。例えば、図12の場合において、前記DMCR304の値が“0”のときはECC機能を無効とし、DMID[7:4]を上位側拡張データ[7:4]として前記拡張アレイ3022に与える。一方、前記DMCR304の値が“1”のときはECC機能を有効とし、生成されたECCコードを上位側拡張データEXT[7:4]として前記拡張アレイ3022に与える。なお、図12の場合において、下位側拡張データEXT[3:0]は、前記DMIDの値に関わらず、DMID[3:0]の値となる。   For example, when data related to a cache miss is read to generate a cache entry, the data WDATA read from the main storage device 40 is input to an ECC code generation unit (ECCGEN) 3035. The ECCGEN 3035 generates an ECC code of the data WDATA and supplies it to the selection circuit 3036. The selection circuit 3036 selects either the DMID or the generated ECC code based on the value of the DMCR 304 and supplies it to the extended array 3022. For example, in the case of FIG. 12, when the value of the DMCR 304 is “0”, the ECC function is invalidated, and DMID [7: 4] is given to the expansion array 3022 as upper side expansion data [7: 4]. On the other hand, when the value of the DMCR 304 is “1”, the ECC function is validated, and the generated ECC code is given to the extension array 3022 as the upper side extension data EXT [7: 4]. In the case of FIG. 12, the lower side extension data EXT [3: 0] has a value of DMID [3: 0] regardless of the value of DMID.

以上実施の形態3に係るデータプロセッサ3によれば、前記キャッシュメモリ302は応用システムに応じてキャッシュメモリの信頼性向上のための手段を選択することが可能となる。すなわち、前記キャッシュメモリ302の前記拡張アレイの用途を耐ソフトエラー性の向上のために用いるか、ソフトウェアの観点で保護ドメイン数を多く割り当てるために用いるか、を選択することが可能となる。   According to the data processor 3 according to the third embodiment, the cache memory 302 can select means for improving the reliability of the cache memory in accordance with the application system. That is, it is possible to select whether the use of the extended array of the cache memory 302 is used for improving soft error resistance or for assigning a large number of protection domains from the viewpoint of software.

なお、実施の形態3において、ソフトエラーの訂正の方法として32ビットのデータに対して4ビットの冗長ビットを用いるECCを一例として説明したが、これに限られず1ビットの冗長ビットでエラー検出のみを行うパリティ方式にも適用することが可能である。   In the third embodiment, the ECC using 4 redundant bits for 32 bits of data has been described as an example of the soft error correction method. However, the present invention is not limited to this, and only error detection is performed using 1 redundant bit. It is also possible to apply to a parity system that performs the above.

また、実施の形態3では前記データアレイ1024の読み出し内容にエラー訂正を施す場合を一例として示したが、これに限られず、前記タグアレイ1023のタグ情報にエラー訂正を施すことも可能である。この場合には例えば、前記タグアレイ1023と前記比較部3025の間にエラー訂正のための回路等を配置すればよい。   In the third embodiment, the case where error correction is performed on the read contents of the data array 1024 is shown as an example. However, the present invention is not limited to this, and it is also possible to perform error correction on the tag information of the tag array 1023. In this case, for example, a circuit for error correction may be disposed between the tag array 1023 and the comparison unit 3025.

以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.

例えば、実施形態1乃至3のデータプロセッサでは、前記主記憶装置40、41へのアクセスを一例として説明しているが、これに限られず、前記バス50、21には前記主記憶装置40、41以外の周辺デバイスや入出力装置などの共有リソースを配置することが可能であり、それらのリソースへのアクセス管理は夫々のリソース毎に設置された前記PAM30、31により、前記主記憶装置40、41と同様に管理し、保護することが可能である。   For example, in the data processors of the first to third embodiments, the access to the main storage devices 40 and 41 has been described as an example. However, the present invention is not limited to this, and the buses 50 and 21 include the main storage devices 40 and 41. It is possible to arrange shared resources such as peripheral devices and input / output devices other than the above, and the access management to these resources is performed by the main storage devices 40 and 41 by the PAMs 30 and 31 installed for each resource. Can be managed and protected in the same way.

また、実施形態1乃至3のデータプロセッサでは、前記DMIDと上位物理アドレス、及び前記DMIDと前記ECCコードを前記拡張データとして切り換え可能とする例を示したが、これに限られず、上記3つのデータを切り換え可能とすることが可能である。例えば、実施の形態2において前記拡張アレイに格納されるデータを保護ドメインとECCコードとし、これらを切り換え可能にしてもよいし、実施の形態3において前記拡張アレイに格納されるデータを上位物理アドレスとECCコードとし、これらを切り換え可能にしてもよい。   In the data processors according to the first to third embodiments, the DMID and the upper physical address, and the DMID and the ECC code can be switched as the extension data. However, the present invention is not limited thereto, and the three data Can be switched. For example, the data stored in the extended array in the second embodiment may be a protection domain and an ECC code, and these may be switched, or the data stored in the extended array in the third embodiment may be changed to an upper physical address. And ECC codes, which can be switched.

更に、実施形態1乃至3のデータプロセッサでは、キャッシュメモリに前記拡張アレイを適用する場合を示したが、これに限られず、前記CPUのアクセスに際して、そのアクセスアドレスを用いて動作するモジュールにも適用可能である。例えば一つの例として、メモリ管理ユニット(MMU)の代表的な構成例であるTLB(Translation Look−aside Buffer)に適用することができる。仮想記憶をサポートするデータプロセッサでは、前記MMUは仮想アドレスから物理アドレスへの変換機能を備えるのが一般的であり、前記TLBはオペレーティングシステムの仮想記憶サブシステムを構成するアドレス変換テーブルの一部を高速な連想メモリに保持し、仮想アドレスを検索キーとして物理アドレスの検索を行う。そして複数のオペレーティングシステムの実行が可能なドメイン保護機能を備えるデータプロセッサでは、前記TLBに保持される仮想アドレスから物理アドレスへの変換対が、どの保護ドメインに属するかを判定し、不正なメモリアクセスを遮断しなくてはならない。そのため、前述したキャッシュメモリと同様に、前記TLBに保護ドメイン(DMID)を付加して記憶する必要がある。そこで、前記DMCRをデータプロセッサに設けると共に前記拡張アレイを前記TLBに設けることで、保護ドメインによるメモリ保護機能と、キャッシュのタグに相当する仮想アドレス空間の拡張と、前記TLBを構成するRAMのエラー訂正機能とを容易に切り換えることが可能となり、上記と同様の作用効果を奏する。   Further, in the data processors of the first to third embodiments, the case where the expansion array is applied to the cache memory has been shown. Is possible. For example, as one example, the present invention can be applied to a TLB (Translation Look-aside Buffer) which is a typical configuration example of a memory management unit (MMU). In a data processor that supports virtual memory, the MMU generally has a virtual address to physical address translation function, and the TLB is a part of an address translation table that constitutes a virtual memory subsystem of an operating system. It is stored in a high-speed associative memory, and a physical address is searched using a virtual address as a search key. In a data processor having a domain protection function capable of executing a plurality of operating systems, it is determined to which protection domain a virtual address-to-physical address translation pair held in the TLB belongs, and unauthorized memory access Must be shut off. Therefore, like the cache memory described above, it is necessary to add a protection domain (DMID) to the TLB and store it. Therefore, by providing the DMCR in the data processor and the expansion array in the TLB, the memory protection function by the protection domain, the expansion of the virtual address space corresponding to the cache tag, and the error of the RAM constituting the TLB It is possible to easily switch between the correction function and the same effect as described above.

また、他の例として、データ転送をCPUに代わって行うDMAC(Direct Memory Access Controller)を備えるデータプロセッサにも前記拡張アレイ等は適用可能である。例えば、CPUが前記DMACに対し転送を要求する際に転送条件を設定するレジスタに、前記拡張アレイと同様の機能を持たせる。これにより、前記DMACが保護ドメインによるメモリ保護機能やアドレス空間の拡張等を容易に切り換えることが可能となり、上記と同様の作用効果を奏する。   As another example, the expansion array or the like can be applied to a data processor including a DMAC (Direct Memory Access Controller) that performs data transfer instead of the CPU. For example, a register that sets transfer conditions when the CPU requests transfer to the DMAC has the same function as the expansion array. As a result, the DMAC can easily switch the memory protection function by the protection domain, the expansion of the address space, and the like, and has the same effect as described above.

1〜3 データプロセッサ
10、20_A〜20_C プロセッサコア
30、31 物理アドレス管理モジュール
40、41 主記憶装置
50、51 バス
101 CPU
102、302 キャッシュメモリ
103 ドメインIDレジスタ
104、304 ドメイン制御レジスタ
105 MMU
106、206 バスインターフェース
107、107A〜107C 補完レジスタ
1021、3021 制御ロジック部
1022、3022 拡張アレイ
1023 タグアレイ
1024 データアレイ
1025、3025 比較部
1026、3026 書込み制御部
1027 拡張機能セレクタ
1030、1031 比較器
3027 エラー訂正論理部
3028_0〜3028_3 ECCデコード部
3029_0〜3029_3 選択回路
3030 拡張データ生成部
3031〜3033 比較器
3034 ロジック部
3035 ECCコード生成部
3036 選択回路
1-3 Data processor 10, 20_A-20_C Processor core 30, 31 Physical address management module 40, 41 Main storage device 50, 51 Bus 101 CPU
102, 302 Cache memory 103 Domain ID register 104, 304 Domain control register 105 MMU
106, 206 Bus interface 107, 107A to 107C Complement register 1021, 3021 Control logic unit 1022, 3022 Expansion array 1023 Tag array 1024 Data array 1025, 3025 Comparison unit 1026, 3026 Write control unit 1027 Extended function selector 1030, 1031 Comparator 3027 Error Correction logic unit 3028_0 to 3028_3 ECC decoding unit 3029_0 to 3029_3 selection circuit 3030 extended data generation unit 3031 to 3033 comparator 3034 logic unit 3035 ECC code generation unit 3036 selection circuit

Claims (16)

プログラムを実行する中央処理装置と、
前記中央処理装置のアドレス空間上のデータの一部を保持する連想メモリと、
メモリ保護に利用される識別子を保持する第1レジスタと、を有するデータプロセッサであって、
前記連想メモリは、タグを格納するタグ部と、データを格納するデータ部とから構成される複数の連想エントリと、前記中央処理装置のアクセスに際し、前記中央処理装置から供給される情報とインデックスされたタグとを比較する比較部と、を有し、
前記連想メモリは、前記供給される情報をアドレス情報とする第1の動作モードと、前記供給される情報をアドレス情報及び前記識別子とする第2の動作モードとを有する、データプロセッサ。
A central processing unit for executing the program;
An associative memory for holding a part of data on the address space of the central processing unit;
A data processor having a first register for holding an identifier used for memory protection,
The associative memory is indexed with a plurality of associative entries including a tag unit for storing a tag and a data unit for storing data, and information supplied from the central processing unit when accessed by the central processing unit. A comparison unit for comparing the tag with
The content addressable memory has a first operation mode in which the supplied information is address information and a second operation mode in which the supplied information is address information and the identifier.
前記連想メモリの前記動作モードを決定するための情報が保持される第2レジスタを更に有し、
前記タグ部は、アドレス情報を格納するアドレス部と、拡張部とを有し、
前記連想メモリは、前記第2レジスタの値に基づいて前記動作モードを決定し、
前記拡張部は、前記第1の動作モードではアドレス情報が格納され、前記第2の動作モードでは前記識別子が格納される、請求項1記載のデータプロセッサ。
A second register holding information for determining the operation mode of the associative memory;
The tag part has an address part for storing address information and an extension part,
The associative memory determines the operation mode based on a value of the second register;
The data processor according to claim 1, wherein the extension unit stores address information in the first operation mode, and stores the identifier in the second operation mode.
前記第1の動作モードにおいて、前記比較部は、前記供給されたアドレス情報と当該アドレス情報に対応する前記連想エントリにおける前記アドレス部及び前記拡張部に保持されたアドレス情報とを比較し、一致する場合には、前記連想メモリは当該連想エントリにおける前記データ部のデータを出力し、一致しない場合には、前記供給されたアドレス情報とそれに対応するデータとを、前記対応する前記連想エントリに格納する、請求項2記載のデータプロセッサ。   In the first operation mode, the comparison unit compares the supplied address information with the address information held in the address unit and the extension unit in the associative entry corresponding to the address information, and matches. In the case, the associative memory outputs the data of the data part in the associative entry, and if not, stores the supplied address information and the corresponding data in the corresponding associative entry. The data processor according to claim 2. 前記第2の動作モードにおいて、前記比較部は、前記供給されたアドレス情報と当該アドレス情報に対応する前記連想エントリにおける前記アドレス部に保持された情報とを比較するとともに、前記供給された前記識別子と当該連想エントリにおける前記拡張部に保持された情報とを比較し、ともに一致する場合には、前記連想メモリは、当該連想エントリにおける前記データ部のデータを出力し、一方又は双方が一致しない場合には、前記供給されたアドレス情報とそれに対応するデータとを、前記対応する前記連想エントリに格納する、請求項2記載のデータプロセッサ。   In the second operation mode, the comparison unit compares the supplied address information with information held in the address unit in the associative entry corresponding to the address information, and the supplied identifier And the information held in the extension part in the associative entry are compared, and if both match, the associative memory outputs data of the data part in the associative entry, and one or both do not match The data processor according to claim 2, wherein the supplied address information and data corresponding thereto are stored in the corresponding associative entry. 前記メモリ保護に利用される識別子は、前記プログラムの実行を管理する上位ソフトウェアを識別するためのドメイン識別子である、請求項2記載のデータプロセッサ。   The data processor according to claim 2, wherein the identifier used for memory protection is a domain identifier for identifying higher-order software that manages execution of the program. 前記中央処理装置と、前記連想メモリと、前記第1レジスタと、前記第2レジスタと、を一組とするデータ処理部を複数組有し、
前記第2レジスタは、前記データ処理部毎に設定可能とされる、請求項2記載のデータプロセッサ。
A plurality of data processing units each including the central processing unit, the associative memory, the first register, and the second register;
The data processor according to claim 2, wherein the second register can be set for each data processing unit.
夫々の前記データ処理部によって共通利用されるバスを更に有し、
前記データ処理部は、前記中央処理装置のアクセス要求に応じて、前記中央処理装置が供給するアドレス情報を出力するための制御を行うアクセス制御部と、アドレス情報を補完するための情報が格納される第3レジスタとを有し、
前記バスは、複数の前記データ処理部のうち、最大となるアドレス空間に応じたバス幅以上のバス幅を有し、
前記アクセス制御部は、前記中央処理装置がアクセス要求を行う際、前記中央処理装置が供給するアドレス情報に基づくアドレス幅が前記バス幅に対して小さいと判断した場合には、前記第3レジスタの値に基づいて、当該アドレス情報に所定の情報を補完した新たなアドレス情報を前記バスに出力する、請求項6記載のデータプロセッサ。
A bus commonly used by each of the data processing units;
The data processing unit stores an access control unit that performs control for outputting address information supplied by the central processing unit in response to an access request from the central processing unit, and information for complementing the address information. And a third register
The bus has a bus width equal to or larger than a bus width corresponding to a maximum address space among the plurality of data processing units,
When the central processing unit makes an access request, the access control unit determines that the address width based on the address information supplied by the central processing unit is smaller than the bus width. 7. The data processor according to claim 6, wherein new address information obtained by complementing predetermined information to the address information is output to the bus based on the value.
前記アクセス制御部は更に、前記中央処理装置のアクセス要求に応じて、前記第1レジスタの値を出力する制御を行う、請求項7記載のデータプロセッサ。   The data processor according to claim 7, wherein the access control unit further performs control to output a value of the first register in response to an access request of the central processing unit. 前記第3レジスタは更に、前記第1レジスタの値を補完するための情報が格納され、
前記バスは更に、複数の前記データ処理部のうち、前記メモリ保護に利用される識別子の最大となるデータ量に応じたバス幅以上のバス幅を有し、
前記アクセス制御部は、前記中央処理装置がアクセス要求を行う際、前記第1レジスタの値が前記バス幅に対して小さいと判断した場合には、前記第3レジスタの値に基づいて、当該第1レジスタの値に所定の情報を補完した新たな情報を前記バスに出力する、請求項8記載のデータプロセッサ。
The third register further stores information for complementing the value of the first register,
The bus further has a bus width equal to or greater than a bus width corresponding to a maximum data amount of an identifier used for memory protection among the plurality of data processing units,
When the central processing unit makes an access request, the access control unit determines that the value of the first register is smaller than the bus width, based on the value of the third register. 9. The data processor according to claim 8, wherein new information obtained by complementing predetermined information to a value of one register is output to the bus.
前記アクセス制御部は、前記第2レジスタの値を参照して補完すべきビット数を決定する、請求項7又は9記載のデータプロセッサ。   The data processor according to claim 7 or 9, wherein the access control unit determines the number of bits to be complemented with reference to a value of the second register. プログラムを実行する中央処理装置と、
前記中央処理装置のアドレス空間上のデータの一部を保持する連想メモリと、を有するデータプロセッサであって、
前記連想メモリは、タグを格納するタグ部と、データを格納するデータ部とから構成される複数の連想エントリと、前記中央処理装置のアクセスに際し、前記中央処理装置から供給される情報とインデックスされたタグとを比較する比較部と、を有し、
前記連想メモリは、前記供給される情報をアドレス情報とする第1の動作モードと、前記供給される情報をアドレス情報及び誤り訂正のための情報とする第2の動作モードと、を有する、データプロセッサ。
A central processing unit for executing the program;
An associative memory for holding a part of the data on the address space of the central processing unit,
The associative memory is indexed with a plurality of associative entries including a tag unit for storing a tag and a data unit for storing data, and information supplied from the central processing unit when accessed by the central processing unit. A comparison unit for comparing the tag with
The associative memory has a first operation mode in which the supplied information is address information, and a second operation mode in which the supplied information is address information and error correction information. Processor.
前記連想メモリの前記動作モードを決定するための情報が保持される第1レジスタを更に有し、
前記タグ部は、アドレス情報を格納するアドレス部と、拡張部とを有し、
前記連想メモリは、前記第1レジスタの値に基づいて前記動作モードを決定し、
前記拡張部は、前記第1の動作モードではアドレス情報が格納され、前記第2の動作モードでは前記誤り訂正のための情報が格納される、請求項11記載のデータプロセッサ。
A first register holding information for determining the operation mode of the associative memory;
The tag part has an address part for storing address information and an extension part,
The associative memory determines the operation mode based on a value of the first register;
The data processor according to claim 11, wherein the extension unit stores address information in the first operation mode and stores information for error correction in the second operation mode.
前記連想メモリは、キャッシュメモリである、請求項2又は12記載のデータプロセッサ。   The data processor according to claim 2 or 12, wherein the associative memory is a cache memory. 前記連想メモリは、前記中央処理装置の仮想アドレス空間における仮想アドレスを物理アドレスへアドレス変換するためのアドレス変換対を記憶するアドレス変換バッファである、請求項2又は12記載のデータプロセッサ。   13. The data processor according to claim 2, wherein the associative memory is an address translation buffer that stores an address translation pair for translating a virtual address in a virtual address space of the central processing unit into a physical address. プログラムを実行する中央処理装置と、
前記中央処理装置によるデータ処理に基づいて、前記中央処理装置のアドレス空間をアクセスするためのアドレス情報を出力する内部モジュールと、
メモリ保護に利用される識別子を保持する第1レジスタと、を有するデータプロセッサであって、
前記内部モジュールは、前記アドレス情報に前記識別子を付加しない第1の動作モードと、前記アドレス情報に前記識別子を付加する第2の動作モードとを有する、データプロセッサ。
A central processing unit for executing the program;
An internal module that outputs address information for accessing the address space of the central processing unit based on data processing by the central processing unit;
A data processor having a first register for holding an identifier used for memory protection,
The internal module has a first operation mode in which the identifier is not added to the address information, and a second operation mode in which the identifier is added to the address information.
前記動作モードを決定するための情報が保持される第2レジスタを更に有し、
前記内部モジュールは、前記第2レジスタの値に基づいて前記動作モードを決定し、
前記メモリ保護に利用される識別子は、前記プログラムの実行を管理する上位ソフトウェアを識別するためのドメイン識別子である、請求項15記載のデータプロセッサ。
A second register holding information for determining the operation mode;
The internal module determines the operation mode based on a value of the second register;
16. The data processor according to claim 15, wherein the identifier used for memory protection is a domain identifier for identifying higher-order software that manages execution of the program.
JP2010046557A 2010-03-03 2010-03-03 Data processor Withdrawn JP2011180969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010046557A JP2011180969A (en) 2010-03-03 2010-03-03 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010046557A JP2011180969A (en) 2010-03-03 2010-03-03 Data processor

Publications (1)

Publication Number Publication Date
JP2011180969A true JP2011180969A (en) 2011-09-15

Family

ID=44692385

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010046557A Withdrawn JP2011180969A (en) 2010-03-03 2010-03-03 Data processor

Country Status (1)

Country Link
JP (1) JP2011180969A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182548A (en) * 2020-09-23 2021-01-05 博流智能科技(南京)有限公司 Chip system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182548A (en) * 2020-09-23 2021-01-05 博流智能科技(南京)有限公司 Chip system
CN112182548B (en) * 2020-09-23 2024-04-16 博流智能科技(南京)有限公司 Chip system

Similar Documents

Publication Publication Date Title
JP3713312B2 (en) Data processing device
US6324634B1 (en) Methods for operating logical cache memory storing logical and physical address information
US11972126B2 (en) Data relocation for inline metadata
JP3740195B2 (en) Data processing device
US8296538B2 (en) Storing secure mode page table data in secure and non-secure regions of memory
EP0253824B1 (en) Paged memory management unit capable of selectively supporting multiple address spaces
US12259823B2 (en) Virtual memory management method and apparatus supporting physical addresses larger than virtual addresses
JP5526626B2 (en) Arithmetic processing device and address conversion method
US8296518B2 (en) Arithmetic processing apparatus and method
US20030093686A1 (en) Memory management system and method providing linear address based memory access security
EP2537097A2 (en) Storing secure mode page table data in secure and non-secure regions of memory
JPS6248258B2 (en)
US6795937B2 (en) Multiple traps after faulty access to a resource
US6901540B1 (en) TLB parity error recovery
EP4064058B1 (en) Data relocation for inline metadata
US6795939B2 (en) Processor resource access control with response faking
US20050027960A1 (en) Translation look-aside buffer sharing among logical partitions
JP3936672B2 (en) Microprocessor
KR20220092372A (en) Method and apparatus for run-time memory isolation across different execution realms
JP2007280421A (en) Data processor
JP2011180969A (en) Data processor
US6795936B2 (en) Bus bridge resource access controller
US7607048B2 (en) Method and apparatus for protecting TLB&#39;s VPN from soft errors
US20070255927A1 (en) Data access in a data processing system
US7076635B1 (en) Method and apparatus for reducing instruction TLB accesses

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20130507