JP5630886B2 - Semiconductor device - Google Patents
Semiconductor device Download PDFInfo
- Publication number
- JP5630886B2 JP5630886B2 JP2013259133A JP2013259133A JP5630886B2 JP 5630886 B2 JP5630886 B2 JP 5630886B2 JP 2013259133 A JP2013259133 A JP 2013259133A JP 2013259133 A JP2013259133 A JP 2013259133A JP 5630886 B2 JP5630886 B2 JP 5630886B2
- Authority
- JP
- Japan
- Prior art keywords
- access
- bus
- bus master
- slave device
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Description
本発明は、情報処理装置に関するものであり、特に計算機の中央処理装置に用いられるプロセッサに関するものである。 The present invention relates to an information processing apparatus, and more particularly to a processor used in a central processing unit of a computer.
今日のプロセッサ、特に組み込み機器用途のマイコンでは、汎用的処理を行うCPUコアと、特定処理向けの複数の周辺IPを1チップに構成し、1チップのプロセッサとしてシステムを構成する手法が用いられている。このようなシステムでは、プロセッサ内のバスに対して、複数のCPUや周辺IPなどのデバイスが接続される構成が一般的であり、特に、バスに対してアクセスリクエストを発行する側である、バスマスタデバイスが複数存在するシステムとなる。 In today's processors, especially microcomputers for embedded devices, a technique is used in which a CPU core that performs general-purpose processing and a plurality of peripheral IPs for specific processing are configured on a single chip, and the system is configured as a single-chip processor. Yes. In such a system, a configuration in which devices such as a plurality of CPUs and peripheral IPs are connected to a bus in a processor is common, and in particular, a bus master that is a side that issues an access request to the bus. A system with multiple devices.
プロセッサ内の、CPUを含めたバスマスタデバイスからは、(1)ソフトウェアバグ、(2)ハードウェアバグ、(3)一時的なハード障害(α線によるソフトエラー等)によって本来意図しないアクセスをバスに対して発生することがある。このようなアクセスを、不正アドレスアクセスと呼ぶこととする。特に組み込み機器用途では、ソフトウェアバグによる製品の不良が問題となることが多い。 From the bus master device including the CPU in the processor, (1) a software bug, (2) a hardware bug, and (3) a temporary hardware failure (soft error due to α rays, etc.) on the bus. May occur. Such access is referred to as illegal address access. Especially for embedded devices, product defects due to software bugs are often a problem.
以下に、本願発明者が本願発明をするにあたって考慮した複数のバスマスタが存在するシステムにおいて、不正アドレスアクセスが発生する場合の例として、画像入力、処理を行うシステムを示す。図10はシステムの構成を示したものである。810は画像入力部であり、830はメモリである。810、830はともにシステムバス800に接続しており、810は、例えばカメラなどからの画像を取り込み、バスマスタ動作をすることにより、そのデータを830に格納する。850はこの動作におけるデータの流れである。
In the following, a system that performs image input and processing will be shown as an example in the case where an illegal address access occurs in a system in which there are a plurality of bus masters considered by the inventor of the present invention. FIG. 10 shows the system configuration.
また、820は画像処理部であり、例えば色調補正やノイズ除去などの処理を行うものである。820はメモリ830から画像データを読み込み、処理結果を書き戻す。851、852はそれぞれデータの流れである。
An
ここで、画像入力部810からのメモリ書き込み850と、画像処理部820からのメモリ書き込み852は並列に行われる必要があるため、両者がアクセスするメモリ領域に衝突が無いように切り替える必要がある。
Here, since the memory writing 850 from the
図11は、図10に示したシステムにおけるメモリマップである。910に示す部分がメモリ830の領域である。画像入力部810と画像処理部830を並列に動作させるために、ある期間Tの間は画像入力部810が領域910内の領域921に書き込みをし、画像処理部830が領域920に書き込みを行うことで、メモリ領域の衝突を回避する。同様に、期間T+1ではそれぞれ922と921、期間T+2では920と922といった具合である。
FIG. 11 is a memory map in the system shown in FIG. A portion indicated by 910 is an area of the
上記に示した、領域切り替えによるメモリ領域衝突の回避は、特に複数のバスマスタが存在するシステムでは重要となる。例えば、制御ソフトウェアのバグなどにより不正アクセスが発生し、メモリ領域の衝突が起こると、画像データが正しく処理されないといった問題が発生する。 The avoidance of memory area collision by area switching as described above is particularly important in a system having a plurality of bus masters. For example, when an illegal access occurs due to a bug in the control software and a memory area collision occurs, there arises a problem that the image data is not processed correctly.
バスマスタデバイスの代表であるCPUコアでは、MMU(メモリ マネージメント ユニット)と呼ばれる機構を有するものが存在し、不正アドレスアクセスを検知、遮断する能力を持ち合わせている。しかし、一般的には周辺IPは、MMUを搭載していない。ここで周辺IPに一般的なMMUを適用するとMMUは、CPUコア内の仮想アドレスから物理アドレスへの変換も行っているため、不正アドレスアクセス遮断の目的に対しては、回路量のオーバーヘッドや、それを扱うためのソフトウェアオーバーヘッドが大きい。従って、周辺IPからの不正アドレスアクセス検知、遮断を目的としてのMMUの適用は困難であることがわかった。 Some CPU cores, which are representative of bus master devices, have a mechanism called an MMU (memory management unit), and have the ability to detect and block illegal address access. However, generally, the peripheral IP does not have an MMU. Here, when a general MMU is applied to the peripheral IP, the MMU also performs conversion from a virtual address in the CPU core to a physical address. For the purpose of blocking unauthorized address access, the overhead of circuit amount, The software overhead for handling it is large. Therefore, it has been found that it is difficult to apply the MMU for the purpose of detecting and blocking unauthorized address access from the peripheral IP.
本発明の一つの目的は、回路量のオーバーヘッドが少ない不正アドレスアクセス検知、遮断回路を提供することにある。 One object of the present invention is to provide an illegal address access detection / blocking circuit with a small amount of circuit overhead.
本発明の前記又はその他の目的と新規な特徴は、本願明細書の記述及び図面から明らかになるだろう。 The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the drawings.
本願において開示される発明のうち代表的なものの概要を簡単に説明すれば、下記の通りである。すなわち、第1バスマスタデバイスと、第1スレーブデバイスと、前記第1バスマスタデバイス及び前記第1スレーブデバイスに接続されるバスとを具備する情報処理装置であって、前記第1バスマスタデバイスは、前記第1スレーブデバイスにアクセスする際に、前記第1バスマスタデバイスのアクセスが不正であることを検出し遮断する第1不正アドレスアクセス遮断回路を有する。 The outline of a typical invention among the inventions disclosed in the present application will be briefly described as follows. That is, an information processing apparatus comprising a first bus master device, a first slave device, and a bus connected to the first bus master device and the first slave device, wherein the first bus master device When accessing one slave device, a first illegal address access blocking circuit is provided for detecting and blocking unauthorized access to the first bus master device.
更に望ましくは、前記第1不正アドレスアクセス遮断回路は、アクセス禁止範囲を設定する範囲設定レジスタを有する。 More preferably, the first illegal address access blocking circuit has a range setting register for setting an access prohibition range.
更に望ましくは、前記範囲設定レジスタは、前記第1スレーブデバイスに割り当てられたアドレスの上限のアドレスを保持する第1レジスタと、下限のアドレスを保持する第2レジスタとを有し、前記第1不正アドレスアクセス遮断回路は、前記第1バスマスタデバイスが出力するアドレスが前記第1レジスタ及び第2レジスタで示されるアドレス範囲に含まれているかを比較する比較回路を更に有する。 More preferably, the range setting register includes a first register that holds an upper limit address of an address assigned to the first slave device, and a second register that holds a lower limit address. The address access blocking circuit further includes a comparison circuit for comparing whether the address output from the first bus master device is included in the address range indicated by the first register and the second register.
本発明によると、少ない回路量で信頼性の高い情報処理装置を実現できる。 According to the present invention, a highly reliable information processing apparatus with a small circuit amount can be realized.
以下、本発明に係る情報処理装置の好適な実施の形態について、添付図面を参照しながら説明する。特に制限されないが、実施例の各ブロックを構成する回路素子は、公知のCMOS(相補型MOSトランジスタ)やバイポーラトランジスタ等の半導体集積回路技術によって、単結晶シリコンのような1個の半導体基板上に形成される。 DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, a preferred embodiment of an information processing device according to the invention will be described with reference to the accompanying drawings. Although not particularly limited, circuit elements constituting each block of the embodiment are formed on a single semiconductor substrate such as single crystal silicon by a known semiconductor integrated circuit technology such as a CMOS (complementary MOS transistor) or a bipolar transistor. It is formed.
(実施例1)
図1から図3は、本発明の一つの実施例を示したものである。本実施例は、システムバスの構造として、制御線、データ線、アドレス線を複数のデバイスで共有するバス形式を用いた場合のものである。
Example 1
1 to 3 show one embodiment of the present invention. In the present embodiment, the system bus structure uses a bus format in which a control line, a data line, and an address line are shared by a plurality of devices.
図1は、本実施例でのシステム全体の構成を簡単に示しており、特に制限されないが、各構成要素は、1個の半導体基板上に形成されている。100は、プロセッサ内のシステムバスであり、制御線、データ線、アドレス線を複数のデバイスで共有する構成をとる。110、および120は、他のデバイスに対してシステムバス100を介してアクセスするバスマスタデバイスであり、130は、マスターデバイス110、120のシステムバス100を介したリクエストを受け付けて、システムバス100に応答を返す、スレーブデバイスである。
FIG. 1 simply shows a configuration of the entire system in the present embodiment, and each component is formed on one semiconductor substrate, although not particularly limited. A
このようなシステム構成の例を挙げると、例えば音声処理用IPと画像処理用IPの2個のバスマスタデバイスを備え、それぞれの処理結果を、スレーブデバイスであるシリアルインターフェースに書き出すようなシステムが考えられる。 As an example of such a system configuration, for example, a system having two bus master devices, that is, an audio processing IP and an image processing IP, and writing each processing result to a serial interface as a slave device is conceivable. .
また、本実施例ではバスマスタデバイス2個とスレーブデバイス1個のシステムを想定しているが、本発明の方式はこれらデバイスの種類や個数に制約を与えるものではない。 In this embodiment, a system of two bus master devices and one slave device is assumed. However, the method of the present invention does not limit the types and number of these devices.
111、および121はそれぞれ、バスマスタデバイスの主回路である。113、および123が本発明の不正アドレスアクセス遮断回路であり、112、122の接続線を通じてバスマスタデバイスの主回路111、113と、また、114、124の接続線を通じて、システムバス100と接続している。スレーブデバイス130は、接続線131を通じて、システムバス100と接続している。
111 and 121 are main circuits of the bus master device, respectively. 113 and 123 are illegal address access blocking circuits of the present invention, which are connected to the
後に詳述するが、不正アドレスアクセス遮断回路113、123は、バスマスタデバイスがスレーブデバイスにアクセスする際に、バスマスタデバイスのアクセスが不正であることを検出し遮断する機能を有する。
As will be described in detail later, the unauthorized address
図2は、システムバス100自体と、システムバス100と接続線114、124、131との接続関係について示したものである。
FIG. 2 shows the connection relationship between the
バスマスタデバイス110とシステムバス100を接続する接続線114は、210のリクエスト制御線、211のリードライト指定制御線、212のアドレス線、213のライトデータ線、および214のリードデータ線で構成される。
The
リクエスト制御線210は、特に制限されないが、ここでは“H”がリクエスト要求有りを、“L”が要求無しを示す。また、リクエスト制御線210が“H”の時に、リードライト指定制御線211は、“H”がリードリクエストを、“L”がライトリクエストを示し、アドレス線212はその対象となるアドレスを示す。ライトリクエストの際には、ライトデータ線213から書き込むデータを出力する。また、リードリクエストの際には、リードデータ線214からデータを入力する。バスマスタデバイス120とシステムバス100とを接続する接続線124は、接続線114と同様の構成である。210〜214がそれぞれ、220〜224に対応する。
The
スレーブデバイス130とシステムバス100とを接続する接続線131は、230のリクエスト制御線、231のリードライト指定制御線、232のアドレス線、233のライトデータ線、234のリードデータ線で構成され、例えば、リクエスト制御線210からの出力が、リクエスト制御線230に伝わる。接続線131を通じて、スレーブデバイスは、ライトデータ線233からデータを入力、もしくは、リードデータ線234に対してデータを出力する。
The
図3は、本発明のバスマスタデバイス110に含まれる不正アドレスアクセス遮断回路113の内部構成を示している。なお、バスマスタデバイス120に含まれる不正アドレスアドレス遮断回路123についても同様である。
FIG. 3 shows the internal configuration of the illegal address
信号線310〜314は、接続線112を構成するものであり、バスとの接続線である114を構成する信号線210〜214にそれぞれ対応している。
The signal lines 310 to 314 constitute the
320は不正アドレスアクセス検知部である。レジスタ321と322とでバスマスタデバイス110がスレーブデバイス120にアクセスするアドレス範囲を設定する範囲設定レジスタとを有する。レジスタ321には、バスマスタデバイス110に対してアクセスを許可するアドレス範囲の上限を、レジスタ322には下限のアドレス値を格納する。なお、図中明記はしていないが、これらのレジスタの設定は信号線112を通じて行うことができる。また、上記レジスタへの設定は、電源投入時のソフトウェア処理で設定しても良いし、電源が投入されたことを検出して自動的に設定される構成としても良い。
323と324はそれぞれ比較器であり、比較器323は、アドレス線312の値とレジスタ321の値を比較し、アドレス線312の値の方が大きい場合に、信号線325に“H”を出力する。同様に、比較器324は、アドレス線312の値とレジスタ322の値を比較し、アドレス線312の値の方が小さい場合に、信号線326に“H”を出力する。したがって、信号線325と信号線326の論理積である信号線327は、アドレス線312の値が、レジスタ321とレジスタ322に指定された範囲内である場合に、“H”の出力となる。
330は不正アドレスアクセス遮断部である。信号線327の出力が“H”、すなわち、アドレス線312の値が、レジスタ321とレジスタ322に指定された範囲内にある場合には、リクエスト制御線310の出力が、そのままリクエスト制御線210に出力される。逆に、信号線327の出力が“L”、すなわち、アクセス許可範囲を逸脱している場合には、リクエスト制御線310の出力が“H”であっても、リクエスト制御線210の出力が“L”となり、不正アドレスアクセスが遮断される。また、信号線327はそのまま信号線315として出力され、遮断されたことをバスマスタデバイス主回路111に通知する。このようにして不正アクセスを遮断することができる。なお、本実施例では、レジスタ321、322及び比較器323、326を一組のみ有しているが、スレーブデバイスが多数ある場合には、その数に応じて設けることにより本発明を実現できることは言うまでもない。また、レジスタ321、322に格納するアドレスは、アドレスを示すビット全てを格納する構成としてもいいし、その一部のみを格納する構成としてもよい。即ち、アクセス制御を行いたい範囲を指定することができればよい。例えば、対応するスレーブデバイスのアドレス空間のうちH’08000000〜H’0BFFFFFFの範囲において上述の不正アドレス検出を行いたい場合は、上位8ビットを設定できるようにすればよい。この場合、レジスタ321、322及び比較器323、326を小さくすることができ小面積で実現できる。また、レジスタ321、322に32ビット設定可能とする構成としてもよい。この場合、より細かく不正アドレス検出をする範囲を設定することが可能となり、アドレス範囲の大きさが異なる複数のスレーブデバイスへの適用が容易となる。
図4に、不正アドレスアクセス遮断機能を数するプロセッサにおいて、正常アドレスへのアクセス、および不正アドレスへのアクセスが発生した場合動作を示す。700、および710は1クロック期間を示しており、この期間でのリクエスト制御信号310、210、アドレス線312、および不正アドレスアクセス遮断機構320の内部信号325、326、327の遷移を示す。
FIG. 4 shows an operation in the case where an access to a normal address and an access to an illegal address occur in a processor counting the illegal address access blocking function.
期間700では、アドレス線312の値701が、レジスタ321、322に設定された範囲内である。このとき、信号325、326の出力は“H”となり、信号327の出力も“H”となる。したがって、リクエスト制御信号310と等しい“H”が、リクエスト制御信号210にも出力される。
In the
期間701では、値702がレジスタ322に設定された下限値よりも大きい値となっている。このとき、信号326の出力が“L”となることで、信号327の出力も“L”となる。したがって、リクエスト制御信号310が“H”であるのに対して、リクエスト制御信号210が“L”となり、不正アドレスアクセスが遮断される。なお、不正アドレスアクセスとされた場合は、特に限定されないが、例えば、割り込みを通知する信号線をマスターデバイス110に引き込み、マスターデバイス側で例外処理を行うか、又は、割り込みをソフトウェアで検出することで例外処理が行われる。
In the
このように構成することにより、1個の周辺IPなどのバスマスタデバイスに対して、最少の構成では2個のレジスタと2個の比較器、および2個のANDゲートと、少ない回路量で不正アドレスアクセス遮断機構を実現でき、ソフトウェアのバグ等による製品不良の防止、早期発見を期待できる。 With this configuration, for a bus master device such as one peripheral IP, in the minimum configuration, two registers, two comparators, and two AND gates, and an illegal address with a small circuit amount An access blocking mechanism can be realized, and product failure due to software bugs can be expected and early detection can be expected.
(実施例2)
図5から図7は本発明の他の実施例である。本実施例では、システムバスの構造として、スイッチ形式(相互結合網型バス)を用いた場合のものである。スイッチ形式(相互結合網型バス)のバス構造とは、例えばバスマスタデバイスとスレーブデバイスとの接続関係をセレクタにより制御する構造である。この構成を採用することにより、より高速にシステムバスを動作させることが可能となる。以下、主に実施例1と異なる点について説明するが、実施例1で説明した事項を適宜実施例2に適用できることは言うまでもない。
(Example 2)
5 to 7 show another embodiment of the present invention. In the present embodiment, the system bus structure is a switch type (interconnection network type bus). The switch type (interconnect network bus) bus structure is a structure in which, for example, a connection relationship between a bus master device and a slave device is controlled by a selector. By adopting this configuration, the system bus can be operated at a higher speed. Hereinafter, points different from the first embodiment will be mainly described, but it is needless to say that the matters described in the first embodiment can be appropriately applied to the second embodiment.
図5は、本願発明を適用した場合のシステム全体を簡単に示した構成である。400は、プロセッサ内のスイッチ形式のシステムバス(相互結合網型バス)である。410、および420はバスマスタデバイスであり、430は、スレーブデバイスである。バスマスタデバイス410、420、およびスレーブデバイス430はそれぞれ、接続線411、421、431でシステムバス400と接続している。なお、実施例1と同様、本方式は接続するデバイスの種類や個数に制限を与えるものではない。
FIG. 5 shows a simple configuration of the entire system when the present invention is applied.
図6は、システムバス400自体と、システムバス400と接続線411、421、431との接続関係について示したものである。バスマスタデバイス410とシステムバス400とを接続する接続線411は、510のリクエスト制御線、511のリードライト指定制御線、512のアドレス線、513のライトデータ線、514のリードデータ線、515のリクエスト受理通知線で構成されており、各信号線510〜514の意味は、実施例1の210〜214に対応する。信号線515は、リクエスト制御線510のリクエストが受理されたか否かを示す。バスマスタデバイス420とシステムバス400とを接続する接続線421も、接続線411と同様の構成である。
FIG. 6 shows the connection relationship between the
スレーブデバイス430とシステムバス400とを接続する接続線431は、530のリクエスト制御線、531のリードライト指定制御線、532のアドレス線、533のライトデータ線、534のリードデータ線で構成され、各信号線の意味は、実施例1の230〜234に対応する。
The
540は、リクエスト信号セレクタ(スイッチ)制御回路である。リクエスト制御線510、520、およびアドレス線512、522が入力され、セレクタ制御信号である541、542、543と、リクエスト制御線530が出力されている。制御回路540が出力するセレクタ制御信号543が“L”の場合には、リードライト指定制御線531には、リードライト指定制御線511が出力される。反対に、セレクタ制御信号543が“H”の場合には、制御線531には制御線521が出力される。
同様にして、セレクタ制御信号542にしたがって、アドレス線532には512、もしくは522が、セレクタ制御信号541にしたがって、データ線533には、513、523が、それぞれ出力される。このようにしてバスマスタデバイス410、420とスレーブデバイス430との接続を切換える。このように構成することによりシステムバス400を高速に動作させることが可能となる。
Similarly, 512 or 522 is output to the
図7は、制御回路540の内部構成を示した図である。600はデコーダであり、アドレス線522の値がスレーブデバイス430を指している場合に信号線601に“H”を出力する。したがって、制御信号541、542、543には、バスマスタデバイス420からのリクエストが、スレーブデバイス430に対して発行されている場合に、セレクタが420側の制御信号を出力する。
FIG. 7 is a diagram showing an internal configuration of the
また、デコーダ600は、アドレス先522の値がスレーブデバイス430を指していない場合には、信号線602に“H”、信号線525に“L”を出力し、逆の場合は信号線602に“L”、信号線525に“H”を出力する。
The
610は、不正アドレスアクセス検知部である。611と612はそれぞれレジスタであり、613、および614は比較器である。この不正アドレスアクセス検出部の回路は、実施例1の320と同等であり、信号線617は、アドレス線512の値が、レジスタ611とレジスタ612に指定された範囲内である場合に、“H”となる。また、レジスタ611と612は、信号線411を通じて読み書きが可能である。
620は不正アドレスアクセス遮断部であり、実施例1の330と同等であり、信号線617の出力が“L”である場合に、リクエスト制御線510をマスクする。これにより、バスマスタデバイス410からの不正アドレスアクセスを遮断できる。また、信号線617の出力によって信号線602をマスクすることにより、不正アドレスアクセスを遮断したことをバスマスタデバイス410に通知する。バスマスタデバイス410は、当該通知を受けて例外処理等を行う。
このように、バスマスタデバイス410、420は、必ずシステムバス400のセレクタを介してスレーブデバイスにアクセスされるため、本発明の不正アドレス遮断回路は、セレクタ制御回路に設けるのみでよく、面積を小さくすることができる。
As described above, since the
図8は、本願発明を適用した具体的なプロセッサPCの一実施例である。プロセッサPCは、プロセッサPCの全体を制御する中央処理装置CPUを備える。中央処理装置CPU内に含まれるMMUは、CPUコア内の仮想アドレスから物理アドレスへの変換を行うと共に不正アドレスアクセスを遮断する機能を有する。本実施例におけるプロセッサPCにおいて中央処理装置CPU、ダイレクトメモリアクセスコントローラDMAC、及び画像処理専用IP(デバイス)MPEG4、音声専用処理IP(デバイス)MP3がバスマスタデバイスを構成する。プロセッサPCによる外部アクセスは、内部バスIBUSを介して前記バスステートコントローラ5に接続された外部バスインタフェース回路EXIFで行う。外部バスインタフェース回路EXIFは外部メモリMEMに接続される。また、バスステートコントローラBSCからは、外部に設けられるところのメモリMEMに対するストローブ信号RAS、CAS及びライトイネーブル信号WE等が出力される。
FIG. 8 shows an example of a specific processor PC to which the present invention is applied. The processor PC includes a central processing unit CPU that controls the entire processor PC. The MMU included in the central processing unit CPU has a function of converting a virtual address in the CPU core to a physical address and blocking illegal address access. In the processor PC in this embodiment, the central processing unit CPU, the direct memory access controller DMAC, the image processing dedicated IP (device) MPEG4, and the audio dedicated processing IP (device) MP3 constitute a bus master device. External access by the processor PC is performed by an external bus interface circuit EXIF connected to the
プロセッサPCは、内部バスIBUSに接続された内蔵周辺回路として、クロックパルスジェネレータCPG、割り込み制御回路INTC、シリアルコミュニケーションインタフェースコントローラSCI、リアルタイムクロック回路RTC及びタイマTMUを有する。それら周辺回路は前記内部バスIBUSを介して中央処理装置CPU又はダイレクトメモリアクセスコントローラDMAC、画像専用処理デバイスMPEG4、音声専用処理デバイスMP3によってアクセスされる。また、前記クロックパルスジェネレータCPGからは、システムクロックに同期したクロック信号が出力される。このプロセッサPCは、このシステムクロック信号に同期して、例えば外部からデータを取り込む等の動作を行う。 The processor PC includes a clock pulse generator CPG, an interrupt control circuit INTC, a serial communication interface controller SCI, a real-time clock circuit RTC, and a timer TMU as built-in peripheral circuits connected to the internal bus IBUS. These peripheral circuits are accessed by the central processing unit CPU or the direct memory access controller DMAC, the image dedicated processing device MPEG4, and the audio dedicated processing device MP3 via the internal bus IBUS. The clock pulse generator CPG outputs a clock signal synchronized with the system clock. The processor PC performs operations such as fetching data from the outside in synchronization with the system clock signal.
前記バスステートコントローラBSCは、中央処理装置CPUやダイレクトメモリアクセスコントローラDMACによるアクセス対象回路(アクセス対象とされるアドレスエリア)に応じて、アクセスデータサイズ、アクセスタイム、ウェイトステートを決定し、外部メモリMEMに対するバスアクセスを制御する。更にバスステートコントローラBSCは、ダイレクトメモリアクセスコントローラDMAC及び外部からのバス使用要求の競合を調停する。 The bus state controller BSC determines an access data size, an access time, and a wait state in accordance with an access target circuit (address area to be accessed) by the central processing unit CPU and the direct memory access controller DMAC, and external memory MEM. Control bus access to. Further, the bus state controller BSC arbitrates contention between the direct memory access controller DMAC and external bus use requests.
ここで、内部バスIBUSは、バス形式である。従って、バスマスタデバイスである中央処理装置CPU及び画像専用処理デバイスMPEG4、音声専用処理デバイスMP3及びダイレクトメモリアクセスコントローラDMACには、本発明である不正アクセス遮断回路IABUが設けられる。これにより少ない回路量で不正アドレスアクセスの遮断を実現でき、ソフトウェアのバグ等による製品不良の防止、早期発見を期待できる。なお、内部バスIBUSをスイッチ形式にした場合、内部バスIBUSに不正アクセス遮断回路を設けることで不正アクセスを防止でき、ダイレクトアクセスメモリコントローラDMAC等には不正アクセス遮断回路を設ける必要はなく、更に面積を小さくすることが出来る。 Here, the internal bus IBUS has a bus format. Accordingly, the central processing unit CPU and the dedicated image processing device MPEG4, the dedicated audio processing device MP3, and the direct memory access controller DMAC which are bus master devices are provided with the unauthorized access blocking circuit IABU according to the present invention. As a result, it is possible to block unauthorized address access with a small amount of circuit, and it is expected to prevent product defects due to software bugs and to detect them early. When the internal bus IBUS is switched, unauthorized access can be prevented by providing an unauthorized access blocking circuit on the internal bus IBUS, and it is not necessary to provide an unauthorized access blocking circuit in the direct access memory controller DMAC or the like. Can be reduced.
また、近年の回路設計では、各デバイス(CPUやDMAC等)を予め回路設計してIPとして設計ツールに登録しておき、回路設計時に登録されたデバイスのうち製品として必要なデバイスを設計ツール上で組み合わせることで一つのLSIの回路を設計している。この場合、本願発明の不正アドレス遮断回路を一つのIPとして設計ツール等に登録しておき、各デバイスとシステムバスとの間に登録した不正アドレス遮断回路を接続することで容易に実現することができる。 In recent circuit design, each device (CPU, DMAC, etc.) is designed in advance and registered in the design tool as an IP, and among the devices registered at the time of circuit design, a device necessary as a product is displayed on the design tool. A single LSI circuit is designed by combining them. In this case, the illegal address blocking circuit of the present invention can be easily realized by registering it in a design tool or the like as one IP and connecting the registered illegal address blocking circuit between each device and the system bus. it can.
図9は、本願発明を適用したプロセッサの第2の実施例である。図8と異なることは、内部バスIBUSと分離して周辺回路が接続される周辺バスPBUSを設けたことである。内部バスIBUSと周辺BUSは、バスステートコントローラBSCを介して接続される。このように構成することにより、スレーブデバイスである周辺回路は、ダイレクトメモリアクセスコントローラDMACを含むバスステートコンローラBSCを介してバスマスタデバイスに接続されている。図8におけるプロセッサPCでは、内部バスIBUSを介して直接周辺回路にアクセスする構成となっているため、不正アクセス遮断回路は、夫々のバスマスタデバイスの中にスレーブデバイス毎に設ける必要があるが、本実施例では、周辺回路がバスステートコントローラを介してバスマスタデバイスと接続されているため、不正アクセス遮断回路をバスステートコントローラ内に集約することができ、図8に対してプロセッサPCの面積を小さくすることが可能となる。 FIG. 9 shows a second embodiment of a processor to which the present invention is applied. 8 is different from FIG. 8 in that a peripheral bus PBUS to which peripheral circuits are connected is provided separately from the internal bus IBUS. The internal bus IBUS and the peripheral BUS are connected via a bus state controller BSC. With this configuration, the peripheral circuit as a slave device is connected to the bus master device via the bus state controller BSC including the direct memory access controller DMAC. Since the processor PC in FIG. 8 is configured to directly access the peripheral circuit via the internal bus IBUS, an unauthorized access blocking circuit needs to be provided for each slave device in each bus master device. In the embodiment, since the peripheral circuit is connected to the bus master device via the bus state controller, the unauthorized access blocking circuit can be integrated in the bus state controller, and the area of the processor PC is reduced compared to FIG. It becomes possible.
以上、実施例に基づいて本願発明を説明してきたが、本願の目的の範囲を外れない範囲で種々の変更が可能である。例えば、アドレス範囲を指定するレジスタを設けずにハードワイヤードで構成しても良い。 As described above, the present invention has been described based on the embodiments, but various modifications can be made without departing from the scope of the purpose of the present application. For example, a hard-wired configuration may be used without providing a register that specifies an address range.
100…システムバス
110、120…バスマスタデバイス
130…スレーブデバイス
113、123…不正アドレスアクセス遮断機構
320…不正アドレスアクセス検知部
330…不正アドレスアクセス遮断部
321、322…アクセス許可範囲設定レジスタ
323、324…比較器
400…システムバス
410、420…バスマスタデバイス
430…スレーブデバイス
540…リクエスト信号セレクタ制御回路
600…アドレスデコーダ
610…不正アドレスアクセス検知部
620…不正アドレスアクセス遮断部
611、612…アクセス許可範囲設定レジスタ
613、614…比較器
CPU…中央処理装置
MPEG1、2…画像専用処理装置
BSC…バスステートコントローラ
DMAC…ダイレクトメモリアクセスコントローラ
WDT…ウォッチドックタイマ
INTC…割り込み制御回路、
SCI、SCIF…シリアルインターフェースコミュニケーションコントローラ
TMU…タイマ
RTC…リアルタイムクロック
CPG…クロックパルスジェネレータ
EXIF…外部メモリインターフェース
MEM…外部メモリ
MMU…メモリマネジメントユニット
IABU…不正アドレスアクセス遮断回路
IBUS…内部バス
PBUS…周辺バス
DESCRIPTION OF
SCI, SCIF ... Serial interface communication controller TMU ... Timer RTC ... Real time clock CPG ... Clock pulse generator EXIF ... External memory interface MEM ... External memory MMU ... Memory management unit IABU ... Illegal address access blocking circuit IBUS ... Internal bus PBUS ... Peripheral bus
Claims (6)
自身の不正アクセスを検知し遮断する機能を有さない第2バスマスタデバイスと、
自身の不正アクセスを検知し遮断する機能を有するCPUコアを含む第3バスマスタデバイスと、
スレーブデバイスと、
前記第1バスマスタデバイス、前記第2バスマスタデバイスおよび前記第3バスマスタデバイスが接続される内部バスと、
前記スレーブデバイスが接続される周辺バスと、
前記内部バスと前記周辺バスとに接続され、不正アクセス遮断回路を含むバスステートコントローラとを備える半導体装置であって、
前記不正アクセス遮断回路は、前記スレーブデバイスに対するアクセスを許可するアドレス範囲を指定するためのレジスタを有し、
前記第1バスマスタデバイスから前記内部バスを介して前記スレーブデバイスへのアクセスを受けたとき、前記第1バスマスタデバイスから出力された前記スレーブデバイスに対するアクセスアドレスと前記レジスタに設定されたアドレス範囲とを比較することにより、そのアクセスが正常か又は不正であるかを検知し、正常であるときは前記第1バスマスタデバイスから前記スレーブデバイスへアクセスを可能にし、不正であるときは前記第1バスマスタデバイスから前記スレーブデバイスへのアクセスを遮断し、前記第2バスマスタデバイスから前記バスを介して前記スレーブデバイスへのアクセスを受けたとき、前記第2バスマスタデバイスから出力された前記スレーブデバイスに対するアクセスアドレスと前記レジスタに設定されたアドレス範囲とを比較することにより、そのアクセスが正常か又は不正であるかを検知し、正常であるときは前記第2バスマスタデバイスから前記スレーブデバイスへのアクセスを可能にし、不正であるときは前記第2バスマスタデバイスから前記スレーブデバイスへのアクセスを遮断することを特徴とする半導体装置。 A first bus master device having no function of detecting and blocking its own unauthorized access;
A second bus master device having no function of detecting and blocking its own unauthorized access;
A third bus master device including a CPU core having a function of detecting and blocking its own unauthorized access;
A slave device,
An internal bus to which the first bus master device, the second bus master device, and the third bus master device are connected;
A peripheral bus to which the slave device is connected;
A semiconductor device comprising a bus state controller connected to the internal bus and the peripheral bus and including an unauthorized access blocking circuit,
The unauthorized access blocking circuit has a register for designating an address range that permits access to the slave device,
When access to the slave device is received from the first bus master device via the internal bus, the access address for the slave device output from the first bus master device is compared with the address range set in the register By detecting whether the access is normal or unauthorized, the slave device can be accessed from the first bus master device when the access is normal, and from the first bus master device when the access is invalid. When access to the slave device is blocked and access from the second bus master device to the slave device is received via the bus, the access address and the register output from the second bus master device to the slave device are stored in the register. Set The address range is compared to detect whether the access is normal or illegal. When the access is normal, the second bus master device can access the slave device. A semiconductor device, wherein access from the second bus master device to the slave device is blocked.
前記第1バスマスタデバイスは、ダイレクトメモリアクセスコントローラであることを特徴とする半導体装置。 The semiconductor device according to claim 1,
The semiconductor device, wherein the first bus master device is a direct memory access controller.
さらに、ダイレクトメモリアクセスコントローラを有し、
前記不正アクセス遮断回路は、前記ダイレクトメモリアクセスコントローラから前記スレーブデバイスへのアクセスが正常か又は不正であるかを検知し、正常であるときは前ダイレクトメモリアクセスコントローラから前記スレーブデバイスへのアクセスを可能にし、不正であるときは前記ダイレクトメモリアクセスコントローラから前記スレーブデバイスへのアクセスを遮断することを特徴とする半導体装置。 The semiconductor device according to claim 1,
In addition, it has a direct memory access controller,
The unauthorized access blocking circuit detects whether the access from the direct memory access controller to the slave device is normal or unauthorized, and can access the slave device from the previous direct memory access controller when the access is normal. The semiconductor device is characterized in that access to the slave device from the direct memory access controller is blocked when it is illegal.
前記第1バスマスタデバイスは画像処理IP、前記第2バスマスタデバイスは音声処理IPであることを特徴とする半導体装置。 The semiconductor device according to claim 1 or 3, wherein
The semiconductor device according to claim 1, wherein the first bus master device is an image processing IP, and the second bus master device is an audio processing IP.
前記スレーブデバイスはメモリであることを特徴とする半導体装置。 The semiconductor device according to claim 1, wherein
The semiconductor device, wherein the slave device is a memory.
前記不正アクセス遮断回路は、前記スレーブデバイスのアクセスを許可するアドレス範囲を指定するための前記レジスタを、前記複数のスレーブデバイスに対応付けて備え、
前記不正アクセス遮断回路は、前記第1及び第2バスマスタデバイスから出力された前記スレーブデバイスに対するアクセスアドレスと当該スレーブデバイスに対応する前記レジスタに設定されたアドレス範囲とを比較することにより、当該スレーブデバイスに対するアクセスを遮断するか否かを、前記スレーブデバイス毎に決定する、請求項1に記載の半導体装置。 Including a plurality of slave devices,
The unauthorized access blocking circuit includes the register for designating an address range that permits access of the slave device in association with the plurality of slave devices,
The unauthorized access blocking circuit compares the access address for the slave device output from the first and second bus master devices with the address range set in the register corresponding to the slave device, thereby obtaining the slave device. The semiconductor device according to claim 1, wherein whether or not to block access to is determined for each slave device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013259133A JP5630886B2 (en) | 2013-12-16 | 2013-12-16 | Semiconductor device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013259133A JP5630886B2 (en) | 2013-12-16 | 2013-12-16 | Semiconductor device |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012099608A Division JP5464676B2 (en) | 2012-04-25 | 2012-04-25 | Semiconductor device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014099185A JP2014099185A (en) | 2014-05-29 |
JP5630886B2 true JP5630886B2 (en) | 2014-11-26 |
Family
ID=50941093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013259133A Expired - Lifetime JP5630886B2 (en) | 2013-12-16 | 2013-12-16 | Semiconductor device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5630886B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI791138B (en) * | 2019-09-12 | 2023-02-01 | 新唐科技股份有限公司 | Security monitoring of serial peripheral interface flash |
-
2013
- 2013-12-16 JP JP2013259133A patent/JP5630886B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2014099185A (en) | 2014-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10983924B2 (en) | Information processing device and processor | |
JP5433349B2 (en) | Data processor | |
JP2008130056A (en) | Semiconductor circuit | |
JP2016516228A (en) | Access method and circuit device under control of slave unit in system on chip | |
JP4587756B2 (en) | Semiconductor integrated circuit device | |
US20120311266A1 (en) | Multiprocessor and image processing system using the same | |
US6898646B1 (en) | Highly concurrent DMA controller with programmable DMA channels | |
JP2007058716A (en) | Data transfer bus system | |
US20110022756A1 (en) | Data Space Arbiter | |
US20140223059A1 (en) | Write Transaction Interpretation for Interrupt Assertion | |
JP2010079765A (en) | Information processing apparatus | |
JP5630886B2 (en) | Semiconductor device | |
JP5464676B2 (en) | Semiconductor device | |
KR20180091364A (en) | System-on-chip comprising a cpu operating as a debug host and method of operation thereof | |
JP5981004B2 (en) | Semiconductor device | |
US7178003B2 (en) | Data processing apparatus, data processing system, and access area control method | |
JP2010049718A (en) | Semiconductor device | |
JP2006243811A (en) | Dma transfer system and dma transfer method | |
JP5805546B2 (en) | Semiconductor device | |
CN115374041A (en) | Bus decoder | |
JPH08241199A (en) | Data-processing system | |
JP2008250386A (en) | Access control device and computer system | |
JP2002536718A (en) | Address remapping assurance apparatus and method | |
JPS62154045A (en) | Bus arbitration system | |
JP5431823B2 (en) | Semiconductor device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140929 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20141002 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141003 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5630886 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
EXPY | Cancellation because of completion of term |