JP2005056239A - Semiconductor integrated circuit - Google Patents
Semiconductor integrated circuit Download PDFInfo
- Publication number
- JP2005056239A JP2005056239A JP2003287733A JP2003287733A JP2005056239A JP 2005056239 A JP2005056239 A JP 2005056239A JP 2003287733 A JP2003287733 A JP 2003287733A JP 2003287733 A JP2003287733 A JP 2003287733A JP 2005056239 A JP2005056239 A JP 2005056239A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- priority
- access
- control means
- access control
- 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
Links
Images
Abstract
Description
本発明は、RAM(random access memory:ランダムアクセスメモリ)とペリフェラル(RAMの周辺機器又は周辺回路)との間のデータ転送を、CPU(central processing unit:中央演算装置)を介さずに制御するDMA(direct memory access:ダイレクトメモリアクセス)機能を有する半導体集積回路に関する。 The present invention is a DMA that controls data transfer between a random access memory (RAM) and a peripheral (peripheral device or peripheral circuit of a RAM) without going through a central processing unit (CPU). The present invention relates to a semiconductor integrated circuit having a (direct memory access) function.
従来より、CPUにおける処理の負荷を軽減するために、CPUが転送処理を行うことなく、RAMとペリフェラルとの間のデータ転送を直接的に行うDMAデータ転送方式が知られている。DMAデータ転送方式においては、ペリフェラルから出力されるデータをRAMに書き込んだり、RAMから読み出されるデータをペリフェラルに出力したりするデータ転送が、内部に独立したバッファを有するDMAC(DMAコントローラ)の制御の下で行われる。 Conventionally, in order to reduce the processing load on the CPU, a DMA data transfer method is known in which data transfer between a RAM and a peripheral is directly performed without the CPU performing a transfer process. In the DMA data transfer method, data transfer for writing data output from a peripheral to the RAM or outputting data read from the RAM to the peripheral is controlled by a DMAC (DMA controller) having an independent buffer inside. Done under.
複数のペリフェラルが用いられるシステムにおいては、それらのペリフェラルにそれぞれ対応して複数のDMACが設けられる。そのような場合には、複数のDMACの制御によるデータ転送が競合しないように、DMAアービタが、DMACに設定された優先順位に基づいて、RAMと複数のペリフェラルとの間のバスを調停することにより、複数のDMACの内のいずれか1つに対して、RAMへのアクセスを許可する。 In a system using a plurality of peripherals, a plurality of DMACs are provided corresponding to the peripherals. In such a case, the DMA arbiter arbitrates the bus between the RAM and the plurality of peripherals based on the priority set in the DMAC so that data transfer under the control of the plurality of DMACs does not compete. Thus, any one of the plurality of DMACs is permitted to access the RAM.
しかしながら、DMAアービタが、予め製造時に設定された固定の優先順位に基づいてRAMへのアクセスを許可する場合には、優先順位が低いDMACに対応するペリフェラルにとっては、必要なデータ転送能力が得られないおそれがあるという問題があった。即ち、固定の優先順位を用いる場合には、最上位の優先順位が与えられたDMACからアクセス要求が連続して発生したときに、そのアクセス要求が常に受付けられるので、それ以外のDMACからのアクセス要求が長い間受付けられず、タイムアウトやオーバーラン等の不具合が発生することもあった。一方、ファームウェアによって擬似固定の優先順位とする場合には、その分のCPUのリソースを使用するので、CPUのパフォーマンスが低下してしまうという問題があった。 However, when the DMA arbiter permits access to the RAM based on a fixed priority set in advance at the time of manufacture, a necessary data transfer capability can be obtained for a peripheral corresponding to a DMAC having a low priority. There was a problem that there was no fear. That is, when a fixed priority is used, when access requests are continuously generated from the DMAC to which the highest priority is given, the access requests are always accepted. Requests could not be accepted for a long time, causing problems such as timeouts and overruns. On the other hand, when the priority is set to be quasi-fixed by the firmware, there is a problem that the CPU performance is lowered because the CPU resources are used accordingly.
一方、複数のペリフェラルのアクセス順によって回帰的に優先順位を変更する場合には、ある一定のアクセス数において優先順位が平均化されるため、高速動作を行うペリフェラルと低速動作を行うペリフェラルとが混在するシステムにおいては、設計者が意図した最大システム性能が得られないおそれがあるという問題があった。 On the other hand, when the priority is recursively changed according to the access order of multiple peripherals, the priority is averaged over a certain number of accesses, so peripherals that perform high-speed operations and peripherals that perform low-speed operations are mixed. In such a system, there is a problem that the maximum system performance intended by the designer may not be obtained.
関連する技術として、下記の特許文献1には、一定時間内にデータを転送する必要のあるデバイス若しくはDMAチャンネルへのデータ転送を確実に保証する調停システム及び調停方法について述べられている。この調停システムは、調停の対象となる複数のデバイスの中で一定時間内にデータを転送する必要がある特定のデバイスのメモリアクセス開始から次のメモリアクセス開始までの時間を計測して、その特定のデバイスが一定時間選択されていないことを検知したら、その特定デバイスのプライオリティが最も高く、又は少なくとも2番目に高くなるように調停手段のプライオリティを変更するようにして、その特定デバイスのメモリアクセス要求を一定時間ごとに許可できるようにしたものである。
As a related technique, the following
しかしながら、この調停システムにおいては、プライオリティを高くする対象となる全ての特定デバイスに対して、メモリアクセス間隔に関する一定時間を設定する必要がある。例えば、外付けハードディスクドライブに記録されているデータをRAMに書き込む場合には、単位時間内に転送しなければならない転送量を定める必要がないので、メモリアクセス間隔に関する一定時間を設定する必要がないが、外付けハードディスクドライブのプライオリティを高くしたい場合には、外付けハードディスクドライブに対して、メモリアクセス間隔に関する一定時間を設定する必要があるので、設定が煩雑となってしまう。
そこで、上記の点に鑑み、本発明は、RAMとペリフェラルとの間のデータ転送をCPUを介さずに制御するDMA機能を有する半導体集積回路において、多数のペリフェラルを使用するシステムにおいても、少数のペリフェラルを使用するシステムにおいても、RAMに対する複数のペリフェラルからのアクセス要求をスムーズに調停することができる半導体集積回路を提供することを目的とする。 Therefore, in view of the above points, the present invention provides a semiconductor integrated circuit having a DMA function for controlling data transfer between a RAM and a peripheral without using a CPU. Even in a system using a large number of peripherals, An object of the present invention is to provide a semiconductor integrated circuit capable of smoothly arbitrating access requests from a plurality of peripherals to a RAM even in a system using the peripherals.
上記課題を解決するため、本発明に係る半導体集積回路は、中央演算装置を介さずに複数の周辺回路からメモリへのアクセスを制御するダイレクトメモリアクセス機能を有する半導体集積回路であって、それぞれの周辺回路に接続されてメモリへのアクセスを要求するアクセス要求信号を発生し、メモリへのアクセスが許可された場合に、その周辺回路とメモリとの間のデータ転送を制御する複数のメモリアクセス制御手段と、複数のメモリアクセス制御手段に対して設定された優先順位に基づいて、アクセス要求信号を発生するいずれか1つのメモリアクセス制御手段にメモリへのアクセスを許可し、メモリへのアクセスが許可されたメモリアクセス制御手段とメモリとの間のバス調停を行うバス調停手段と、複数のメモリアクセス制御手段のメモリへのアクセス状態に関する複数のカウント値を得る複数のカウンタと、複数のカウンタによって得られた複数のカウント値に基づいて、複数のメモリアクセス制御手段に対して設定された優先順位を変更する優先順位変更手段とを具備する。 In order to solve the above problems, a semiconductor integrated circuit according to the present invention is a semiconductor integrated circuit having a direct memory access function for controlling access to a memory from a plurality of peripheral circuits without using a central processing unit. Multiple memory access control that controls the data transfer between the peripheral circuit and the memory when an access request signal is generated to request access to the memory connected to the peripheral circuit and access to the memory is permitted And one of the memory access control means for generating an access request signal is allowed to access the memory based on the priority set for the means and the plurality of memory access control means, and access to the memory is permitted. Bus arbitration means for arbitrating the bus between the memory access control means and the memory, and a plurality of memory access control means A plurality of counters for obtaining a plurality of count values relating to the access state of the memory, and a priority set for the plurality of memory access control means is changed based on the plurality of count values obtained by the plurality of counters. Priority order changing means.
ここで、優先順位変更手段が、複数の所定の値を保持するレジスタを含み、複数のカウンタによって得られた複数のカウント値とレジスタが保持する複数の所定の値とのそれぞれの比較結果に基づいて、複数のメモリアクセス制御手段に対して設定された優先順位を変更するようにしても良い。 Here, the priority order changing means includes a register that holds a plurality of predetermined values, and is based on a comparison result between a plurality of count values obtained by the plurality of counters and a plurality of predetermined values held by the register. Thus, the priority order set for a plurality of memory access control means may be changed.
また、この半導体集積回路が、複数のメモリアクセス制御手段のメモリへのアクセス要求に関する複数のカウント値を得る複数の第2のカウンタをさらに具備し、優先順位変更手段が、複数のカウンタによって得られた複数のカウント値と複数の第2のカウンタによって得られた複数のカウント値とに基づいて、複数のメモリアクセス制御手段に対して設定された優先順位を変更するようにしても良い。 The semiconductor integrated circuit further includes a plurality of second counters for obtaining a plurality of count values related to access requests to the memories of the plurality of memory access control means, and the priority changing means is obtained by the plurality of counters. The priority order set for the plurality of memory access control means may be changed based on the plurality of count values and the plurality of count values obtained by the plurality of second counters.
また、この半導体集積回路は、メモリへのアクセスが最後に許可されたメモリアクセス制御手段に関する情報を記憶する記憶手段と、記憶手段に記憶されている情報に基づいて、メモリへのアクセスが最後に許可されたメモリアクセス制御手段から出力されるアクセス要求信号を所定の期間マスクすることによりバス調停手段に入力させないアクセス要求信号マスク手段とをさらに具備するようにしても良い。 In addition, the semiconductor integrated circuit stores the information related to the memory access control means that is finally permitted to access the memory, and the memory access is finally performed based on the information stored in the storage means. Access request signal masking means for masking the access request signal output from the permitted memory access control means for a predetermined period so as not to be input to the bus arbitration means may be provided.
本発明によれば、複数のメモリアクセス制御手段のメモリへのアクセス状態に関する複数のカウント値に基づいて、複数のメモリアクセス制御手段に対して設定された優先順位を変更するので、多数のペリフェラルを使用するシステムにおいても、少数のペリフェラルを使用するシステムにおいても、RAMに対する複数のペリフェラルからのアクセス要求をスムーズに調停することができる。 According to the present invention, the priority set for the plurality of memory access control means is changed based on the plurality of count values related to the memory access states of the plurality of memory access control means. In both the system used and the system using a small number of peripherals, access requests from a plurality of peripherals to the RAM can be smoothly arbitrated.
以下、本発明を実施するための最良の形態について、図面を参照しながら詳しく説明する。なお、同一の構成要素には同一の参照番号を付して、説明を省略する。
図1は、本発明の第1の実施形態に係る半導体集積回路を含むシステムの構成を示すブロック図である。このシステムは、プリンタにおいて印字データを処理するためのシステムである。図1に示すように、このシステムは、データを記憶するRAM10と、RAM10へのデータの書込み及びRAM10からのデータの読出しをDMAデータ転送方式によって行う半導体集積回路20と、システム全体を制御するCPU90とを含んでいる。
Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to the drawings. The same constituent elements are denoted by the same reference numerals, and the description thereof is omitted.
FIG. 1 is a block diagram showing a configuration of a system including a semiconductor integrated circuit according to the first embodiment of the present invention. This system is a system for processing print data in a printer. As shown in FIG. 1, this system includes a
半導体集積回路20は、複数のペリフェラル21a、21b、・・・と、これらのペリフェラルに対応して設けられ、これらのペリフェラルとRAM10との間のデータ転送を制御する複数のDMAC22a、22b、・・・と、RAM10との間でデータの受渡しを行うメモリインタフェース23と、複数のDMACとメモリインタフェース23との間のバス調停を行うDMAアービタ30とを含んでいる。
The semiconductor integrated circuit 20 is provided corresponding to a plurality of
ここで、ペリフェラル21a、21b、・・・としては、プリンタ内部の印字部との間でデータ転送を行うためのプリントデータインタフェースや、プリンタに付属するスキャナとの間でデータ転送を行うためのスキャナインタフェースや、パーソナルコンピュータやデジカメ等の外部装置との間でデータ転送を行うためのシリアルインタフェースであるIEEE1394又はUSB(universal serial bus)等や、パラレルインタフェースであるIEEE1284や、ネットワークに接続された装置との間でデータ転送を行うためのネットワークインタフェース等が該当する。
Here, as the
DMAC22a、22b、・・・は、それぞれ独立したバッファを有しており、それぞれのペリフェラルから出力されるデータをRAM10に書き込んだり、RAM10から読み出されるデータをそれぞれのペリフェラルに出力したりする。また、DMAC22a、22b、・・・の各々は、RAM10へのアクセスを要求するリクエスト信号を発生し、アクセスが許可された場合にはアクノリッジ信号を受信する。
Each of the
DMAアービタ30は、DMAC22a、22b、・・・から入力されるリクエスト信号、及び、RAM10へのアクセスに関するそれらのDMACの優先順位に基づいて、それらのDMACとメモリインタフェース23との間でバス調停を行う。本実施形態においては、DMAアービタ30が、各々のDMACからバスの使用を要求するために出力されるリクエスト信号と、各々のDMACにバスの使用を許可するために入力されるアクノリッジ信号とを、所定の期間においてサンプリングすることにより、リクエスト信号が出力されている時間とアクノリッジ信号が入力されている時間とに基づいて、DMAC22a、22b、・・・の優先順位を変更する。
The
図2は、図1に示すDMAアービタの詳細な構成を示すブロック図である。なお、図2には、3つのDMACを用いる例が示されている。図2に示すように、DMAアービタ30は、2つのタイマ31及び32と、それぞれのDMACからリクエスト信号が出力されている時間を累積するカウンタ33a〜33cと、それぞれのDMACにアクノリッジ信号が入力されている時間を累積するカウンタ34a〜34cと、複数のDMACの優先順位を変更するプライオリティジェネレータ部40と、いずれかのDMACにRAM10へのアクセスを許可するアービタ部70と、マルチプレクサ35とを含んでいる。
FIG. 2 is a block diagram showing a detailed configuration of the DMA arbiter shown in FIG. FIG. 2 shows an example using three DMACs. As shown in FIG. 2, the
タイマ31は、サンプリングを継続して行う期間を規定するタイミング信号を出力する。タイマ32は、リクエスト信号及びアクノリッジ信号をサンプリングするために用いられるサンプリングクロック信号を出力する。
The
カウンタ33aは、タイミング信号によってリセットされ、DMAC22aからリクエスト信号が出力されているときにサンプリングクロック信号のパルスをカウントすることにより、DMAC22aからリクエスト信号が出力されている時間に相当するカウント値Ca1を出力する。同様に、カウンタ33bは、DMAC22bからリクエスト信号が出力されているときにサンプリングクロック信号のパルスをカウントすることにより、DMAC22bからリクエスト信号が出力されている時間に相当するカウント値Cb1を出力し、カウンタ33cは、DMAC22cからリクエスト信号が出力されているときにサンプリングクロック信号のパルスをカウントすることにより、DMAC22cからリクエスト信号が出力されている時間に相当するカウント値Cc1を出力する。
The
カウンタ34aは、タイミング信号によってリセットされ、DMAC22aにRAM10へのバスアクセス権を示すアクノリッジ信号が入力されているときにサンプリングクロック信号のパルスをカウントすることにより、DMAC22aにアクノリッジ信号が入力されている時間に相当するカウント値Ca2を出力する。同様に、カウンタ34bは、DMAC22bにアクノリッジ信号が入力されているときにサンプリングクロック信号のパルスをカウントすることにより、DMAC22bにアクノリッジ信号が入力されている時間に相当するカウント値Cb2を出力し、カウンタ34cは、DMAC22cにアクノリッジ信号が入力されているときにサンプリングクロック信号のパルスをカウントすることにより、DMAC22cにアクノリッジ信号が入力されている時間に相当するカウント値Cc2を出力する。
The
プライオリティジェネレータ部40は、カウンタ33a〜33c及び34a〜34cにおいて得られたカウンタ値に基づいて、既に設定されているDMACの優先順位を変更する。アービタ部70は、複数のDMACから出力されるリクエスト信号と複数のDMACの優先順位とに基づいて、いずれかのDMACにアクノリッジ信号を出力すると共に、バス調停信号を出力する。マルチプレクサ35は、バス調停信号に基づいて、いずれかのDMACとメモリインタフェース23との間のバスを接続する。
The
本実施形態においては、タイマ31から出力されるタイミング信号のパルスの周期T1によってサンプリング継続期間を規定し、タイマ32から出力されるサンプリングクロック信号のパルスの周期T2(<T1)によってサンプリング期間を規定する。
In this embodiment, the sampling duration is defined by the pulse period T1 of the timing signal output from the
即ち、図3に示すように、DMAC22aからリクエスト信号Raが出力されているときに、サンプリング期間T2毎にカウンタ33aにおけるカウント値Ca1が1ずつインクリメントされ、サンプリング期間T1の間にカウント値Ca1がNRまで増加する。その場合には、NR×T2の期間においてリクエスト信号が出力されていたことになる。
That is, as shown in FIG. 3, when the request signal Ra is output from the
また、DMAC22aにアクノリッジ信号が入力されているときに、サンプリング期間T2毎にカウンタ34aにおけるカウント値Ca2が1ずつインクリメントされ、サンプリング期間T1の間にカウント値Ca2がNAまで増加する。その場合には、NA×T2の期間においてアクノリッジ信号が出力されていたことになる。このように、タイマ32から出力されるサンプリングクロック信号に同期してカウントを行うことにより、高ビットのカウンタを用いる必要はない。
Further, when the acknowledge signal is inputted to the DMAC22a count value Ca2 in the
再び図2を参照すると、プライオリティジェネレータ部40は、カウンタ33a〜33c及び34a〜34cからそれぞれ出力されるカウント値Ca1〜Cc1及びCa2〜Cc2に基づいて、タイマ31から出力されるタイミング信号に同期して、複数の異なる変更方法を用いてDMAC22a〜22cの優先順位を変更し、変更された優先順位を表す信号P1及びP2を出力する。
Referring to FIG. 2 again, the
また、アービタ部70は、プライオリティジェネレータ部40から出力された優先順位を表す信号P1及びP2、及び、DMAC22a〜22cから出力されたリクエスト信号Ra〜Rcに基づいて、アクノリッジ信号Aa〜Acのいずれかを対応するDMACに出力すると共に、アクノリッジ信号を出力したDMACとメモリインタフェース23とを接続するためのバス調停信号BAを出力する。
The
図4は、図2に示すプライオリティジェネレータ部の詳細な構成を示すブロック図である。図4に示すように、プライオリティジェネレータ部40は、第1のアービタにおいて用いる優先順位を変更するプライオリティジェネレータ50と、第2のアービタにおいて用いる優先順位を変更するプライオリティジェネレータ60とを含んでいる。
FIG. 4 is a block diagram showing a detailed configuration of the priority generator unit shown in FIG. As shown in FIG. 4, the
プライオリティジェネレータ50は、カウント値Ca2〜Cc2に基づいて、タイマ31から出力されるタイミング信号に同期して、DMAC22a〜22cの優先順位を与える信号P1を変更する。また、プライオリティジェネレータ60は、カウント値Ca1〜Cc1及びCa2〜Cc2に基づいて、タイマ31から出力されるタイミング信号に同期して、DMAC22a〜22cの優先順位を与える信号P2を変更する。プライオリティジェネレータ50及び60で変更された優先順位を表す信号P1及びP2は、それぞれアービタ部70に出力される。
Based on the count values Ca2 to Cc2, the
図5は、図4に示すプライオリティジェネレータ50の詳細な構成を示すブロック図である。プライオリティジェネレータ50は、一定の時間内に所定の量のデータを転送しなければならない印字部やスキャナ等のインタフェースのような最優先ペリフェラルの優先順位を変更し、そのペリフェラルに対して所望の転送能力を保証するための機能ブロックである。
FIG. 5 is a block diagram showing a detailed configuration of the
図5に示すように、プライオリティジェネレータ50は、DMAC22a〜22cにそれぞれ対応して設定された所望の転送能力を表すデータを保持するレジスタ51a〜51cと、タイミング信号が入力されたときのカウント値Ca2に基づいて、サンプリング継続期間においてDMAC22aが実際に転送を行ったデータの単位時間当りの量を算出する実転送能力算出部52aと、カウント値Cb2に基づいて、DMAC22bが実際に転送を行ったデータの単位時間当りの量を算出する実転送能力算出部52bと、カウント値Cc2に基づいて、DMAC22cが実際に転送を行ったデータの単位時間当りの量を算出する実転送能力算出部52cとを含んでいる。
As shown in FIG. 5, the
各転送量算出部は、次式(1)を用いて、それぞれのDMACの実転送能力QR(Mbps)を算出する。
QR=QA×NA×T2/T1 ・・・(1)
但し、QAは、単位時間当たりのデータ転送可能量(Mbps)であり、NAは、タイミング信号が入力されたときにカウンタ34a〜34cの各々から出力されていたカウント値である。
Each transfer amount calculating unit uses the following equation (1) to calculate the actual transfer capability of each DMAC Q R a (Mbps).
Q R = Q A × N A × T2 / T1 ··· (1)
However, Q A is data transferable per unit time (Mbps), N A is the count value output from each
また、プライオリティジェネレータ50は、レジスタ51a〜51cにおいて保持されている所望の転送能力を表すデータと実転送能力算出部52a〜52cによって算出された実転送能力とをそれぞれ比較する比較部53a〜53cと、比較部53a〜53cにおいて比較された結果に基づいて優先順位を変更する優先順位変更部54とを含んでいる。
The
ここで、優先順位変更部54は、比較部53a〜53cにおける比較結果に基づいて、実転送能力QRが所望の転送能力未満であるDMACの優先順位を、上位の優先順位に変更し、変更された優先順位を表す信号P1をアービタ部70に出力する。ここで、優先順位変更部54は、実転送能力QRが所望の転送能力未満であるDMACの優先順位が1つずつ高くなるように優先順位を変更しても良いし、所望の転送能力に対する実転送能力QRの割合が最も小さいDMACほど優先順位が高くなるように優先順位を変更しても良い。なお、優先順位の初期値は、起動時においてCPU90が設定する。
Here, the
図6は、図4に示すプライオリティジェネレータ60の詳細な構成を示すブロック図である。プライオリティジェネレータ60は、外付けのハードディスクドライブのように、一定の時間内に転送すべきデータ量は規定されないが、バスを使用する許可を与えられるのが大幅に遅れることなくスムーズにデータ転送することが望まれるような準優先ペリフェラルの優先順位を変更し、そのペリフェラルに対してスムーズにデータ転送することを保証するための機能ブロックである。
FIG. 6 is a block diagram showing a detailed configuration of the
図6に示すように、プライオリティジェネレータ60は、タイミング信号が入力されたときのカウント値Ca1及びCa2に基づいて、DMAC22aの待機時間を算出する待機時間算出部61aと、カウント値Cb1及びCb2に基づいて、DMAC22bの待機時間を算出する待機時間算出部61bと、カウント値Cc1及びCc2に基づいて、DMAC22cの待機時間を算出する待機時間算出部61cとを含んでいる。
As shown in FIG. 6, the
待機時間算出部61a〜61cは、次式(2)を用いて、DMAC22a〜22cのバス使用リクエストの待機時間Tをそれぞれ算出する。
T=(NR−NA)×T2 ・・・(2)
但し、NRは、図2に示すタイマ31から各待機時間算出部にタイミング信号が入力された時に各カウンタから入力されているカウント値である。
The standby
T = (N R −N A ) × T2 (2)
Here, N R is a count value input from each counter when a timing signal is input from the
また、プライオリティジェネレータ60は、待機時間算出部61a〜61cにおいて算出された待機時間Tを比較する比較部62と、比較部62における比較結果に基づいて優先順位を変更する優先順位変更部63とを含んでいる。
The
ここで、優先順位変更部63は、各DMACに対応する待機時間Tを比較し、待機時間Tが大きいものほど優先順位が高くなるように優先順位を変更し、変更された優先順位を表す信号P2をアービタ部70に出力する。なお、優先順位の初期値は、起動時においてCPU90が設定する。
Here, the
図7は、図2に示すアービタ部の詳細な構成を示すブロック図である。図7に示すように、アービタ部70は、優先順位を変更する方法を選択するためにCPU90によって設定されたデータを保持するレジスタ71a〜71c及び72a〜72cと、3入力AND回路73a〜73c、74a〜74c、75a〜75cと、アービタ76a〜76c及び77とを含んでいる。アービタ76a〜76cの各々は、それぞれの優先順位に基づいてリクエスト信号Ra〜Rcの内の1つを選択し(それが存在する場合に)、選択したリクエスト信号を出力したDMACを表す信号を出力する。
FIG. 7 is a block diagram showing a detailed configuration of the arbiter unit shown in FIG. As shown in FIG. 7, the
ここで、アービタ76aは、優先順位を表す信号P1に基づいて、いずれかのDMACからAND回路73a〜75aを介して入力されたリクエスト信号を選択し、選択したリクエスト信号を出力したDMACを表す信号S1を出力する。アービタ76bは、優先順位を表す信号P2に基づいて、いずれかのDMACからAND回路73b〜75bを介して入力されたリクエスト信号を選択し、選択したリクエスト信号を出力したDMACを表す信号S2を出力する。アービタ76cは、予め定められている優先順位に基づいて、いずれかのDMACからAND回路73c〜75cを介して入力されたリクエスト信号を選択し、選択したリクエスト信号を出力したDMACを表す信号S3を出力する。
Here, the
ここで、各アービタ76a〜76cの各々は、それぞれの優先順位に基づいて、入力されたリクエスト信号を出力したDMACの中で、最も優先順位の高いDMACのリクエスト信号を選択し、選択したリクエスト信号を出力したDMACを表す信号をアービタ77に出力する。
Here, each of the
また、アービタ部77は、予め定められている優先順位に基づいて、アービタ76a〜76cから入力された信号S1〜S3の内のいずれか1つを選択し、選択した信号が表すDMACにアクノリッジ信号を出力すると共に、選択した信号をバス調停信号BAとしてマルチプレクサ35に出力する。
Further, the
本実施形態においては、アービタ77が、所望の転送能力を保証するために変更された優先順位に基づいてアービタ76aから出力された信号S1を最も高い優先順位で選択し、アービタ76bから出力された信号S2を次に高い優先順位で選択し、固定された優先順位に基づいてアービタ76cから出力された信号S3を最も低い優先順位で選択する。
In this embodiment, the
即ち、アービタ76aに、いずれかのDMACからリクエスト信号が入力された場合には、アービタ76aから最も高い優先順位の信号S1が出力されるので、アービタ77は、アービタ76aから出力された信号S1を選択する。
That is, when a request signal is input from any DMAC to the
また、アービタ76aに、いずれのDMACからもリクエスト信号が入力されず、アービタ76bに、いずれかのDMACからリクエスト信号が入力された場合には、アービタ76aから信号S1が出力されず、アービタ76bから信号S2が出力されるので、アービタ77は、アービタ76bから出力された信号S2を選択する。
If no request signal is input from any DMAC to the
さらに、アービタ76a及び76bに、いずれのDMACからもリクエスト信号が入力されず、アービタ76cに、いずれかのDMACからリクエスト信号が入力された場合には、アービタ76a及び76bから信号S1及びS2が出力されず、アービタ76cから信号S3が出力されるので、アービタ77は、アービタ76cから出力された信号S3を選択する。
Further, when a request signal is not input from any DMAC to the
アービタ77は、いずれかのアービタから入力された信号に基づいて、その信号が表すDMACにアクノリッジ信号を出力し、その信号をバス調停信号BAとしてマルチプレクサ35に出力する。マルチプレクサ35は、バス調停信号BAに基づいて、そのDMACとメモリインタフェース23との間のバス調停を行う。
Based on the signal input from any arbiter, the
なお、複数のDMACがRAMにアクセスする優先順位の変更方法は、レジスタ71及び72に保持させるデータによって設定される。即ち、各DMACに対応するペリフェラルが最優先ペリフェラル、準優先ペリフェラル、低優先ペリフェラルのいずれかであるかは、レジスタ71及び72に保持させるデータによって設定される。 Note that the priority changing method for accessing a RAM by a plurality of DMACs is set by data held in the registers 71 and 72. That is, whether the peripheral corresponding to each DMAC is the highest priority peripheral, the semi-priority peripheral, or the low-priority peripheral is set by the data held in the registers 71 and 72.
例えば、優先順位を表す信号P1に基づいてDMAC22aとメモリインタフェース23との間のバスを調停する場合には、レジスタ71a及び72aにハイレベルの信号「1」を保持させることにより、DMAC22aから出力されるリクエスト信号が、AND回路73aを介してアービタ76aに入力され、AND回路74a及び75aの出力信号は常にローレベルであるので、アービタ76b及び76cには入力されない。したがって、DMAC22aとメモリインタフェース23との間のバスは、優先順位を表す信号P1に基づいて、アービタ76aによって調停される。
For example, when arbitrating the bus between the
同様に、優先順位を表す信号P2に基づいてDMAC22aとメモリインタフェース23との間のバスを調停する場合には、レジスタ71aにハイレベルの信号「1」及びレジスタ72aにローレベルの信号「0」を保持させることにより、DMAC22aから出力されるリクエスト信号が、AND回路74aを介してアービタ76bに入力される。したがって、DMAC22aとメモリインタフェース23との間のバスは、優先順位を表す信号P2に基づいて、アービタ76bによって調停される。
Similarly, when the bus between the
予め設定された優先順位に基づいてDMAC22aとメモリインタフェース23との間のバスを調停する場合には、レジスタ71aにローレベルの信号「0」及びレジスタ72aにハイレベルの信号「1」を保持させることにより、DMAC22aから出力されるリクエスト信号が、AND回路75aを介してアービタ76cに入力される。したがって、DMAC22aとメモリインタフェース23との間のバスは、予め設定された優先順位に基づいて、アービタ76cによって調停される。
When arbitrating the bus between the
次に、本発明の第2の実施形態に係る半導体集積回路について説明する。図8は、本発明の第2の実施形態に係る半導体集積回路を含むシステムの構成を示すブロック図である。なお、この半導体集積回路においては、DMAアービタ30の替わりに、DMAアービタ80が、複数のDMACとメモリインタフェース23との間のバス調停を行う。その他の構成については、図1に示す半導体集積回路と同様である。
Next, a semiconductor integrated circuit according to a second embodiment of the present invention will be described. FIG. 8 is a block diagram showing a configuration of a system including a semiconductor integrated circuit according to the second embodiment of the present invention. In this semiconductor integrated circuit, instead of the
図9は、図8に示すDMAアービタの詳細な構成を示すブロック図である。図9に示すように、DMAアービタ80は、バス調停信号BAを記憶することにより、最後にバスを使用したDMACの情報を格納するパストレコーダ81と、パストレコーダ81の記憶するバス調停信号BAに基づいて、最後にバスを使用したDMACから出力されるリクエスト信号を1クロック信号の間出力しないことにより、アービタ部70に出力されるリクエスト信号をマスクするリクエストマスカ82a〜82cとを含んでいる。その他の構成については、図2に示すDMAアービタ30と同様である。
FIG. 9 is a block diagram showing a detailed configuration of the DMA arbiter shown in FIG. As shown in FIG. 9, the
次に、パストレコーダ81及びリクエストマスカ82a〜82cの動作について説明する。パストレコーダ81は、アービタ部70から最後に出力されたバス調停信号BAを格納する。バス調停信号BAは、マルチプレクサ35がメモリインタフェース23とDMACのいずれかのバスを接続するための信号であるので、最後に出力されたバス調停信号BAは、最後にRAM10にアクセスしたDMACの情報に相当する。
Next, operations of the
ここで、例えば、最優先ペリフェラルに対応するDMACからリクエスト信号が連続して出力された場合には、そのリクエスト信号が出力されている期間において、準優先ペリフェラルに対応するDMACからリクエスト信号が出力されても、最優先ペリフェラルに対応するDMACによるRAMの制御が連続して行われる可能性がある。 Here, for example, when a request signal is continuously output from the DMAC corresponding to the highest priority peripheral, the request signal is output from the DMAC corresponding to the semi-priority peripheral during the period in which the request signal is output. However, there is a possibility that the RAM control by the DMAC corresponding to the highest priority peripheral is continuously performed.
そこで、本実施形態においては、パストレコーダ81が、バス調停信号BAの表すDMACに対応するリクエストマスカにリクエスト信号をマスクするためのマスク制御信号を出力し、マスク制御信号を入力されたリクエストマスカが、マスク制御信号に同期して1クロック間だけバス調停信号BAの表すDMACから出力されるリクエスト信号をマスクする。
Therefore, in the present embodiment, the
その結果、最優先ペリフェラルに対応するDMACからリクエスト信号が連続して出力されている期間内において、準優先ペリフェラルに対応するDMACからリクエスト信号が出力されても、最優先ペリフェラルに対応するDMACから出力されるリクエスト信号がマスクされている期間に、準優先ペリフェラルに対応するDMACが、RAMの制御を開始することができる。 As a result, even if the request signal is output from the DMAC corresponding to the semi-priority peripheral within the period in which the request signal is continuously output from the DMAC corresponding to the highest priority peripheral, it is output from the DMAC corresponding to the highest priority peripheral. The DMAC corresponding to the semi-priority peripheral can start controlling the RAM during the period when the request signal to be processed is masked.
これにより、本実施形態においては、優先順位の高いDMACから連続してリクエスト信号が出力された場合においても、バスが、優先順位の高いDMACに独占されることなく、他のDMACがバスを使用することが可能となる。 Thereby, in this embodiment, even when a request signal is continuously output from a DMAC having a high priority, the other DMAC uses the bus without being exclusively used by the DMAC having a high priority. It becomes possible to do.
以上説明したように、本発明は、ビデオインタフェースやネットワークインタフェース等の異なる種類のペリフェラルを有するプリンタ等において印字データを処理するためのシステムに利用可能である。 As described above, the present invention can be used for a system for processing print data in a printer having different types of peripherals such as a video interface and a network interface.
10 RAM、 20 半導体集積回路、 21a〜21c ペリフェラル、 22a〜22c DMAC、 23 メモリインタフェース、 30、80 DMAアービタ、 31、32 タイマ、 33a〜33c、34a〜34c カウンタ、 35 マルチプレクサ、 40 プライオリティジェネレータ部、 50、60 プライオリティジェネレータ、 51a〜51c、71a〜71c、72a〜72c レジスタ、 52a〜52c 実転送能力算出部、 53a〜53c、62 比較部、 54、63 優先順位変更部 61a〜61c 待機時間算出部、 73a〜73c、74a〜74c、75a〜75c AND回路、 76a〜76c、77 アービタ、 81 パストレジスタ、 82a〜82c リクエストマスカ、 90 CPU(中央演算装置)
10 RAM, 20 semiconductor integrated circuit, 21a-21c peripheral, 22a-22c DMAC, 23 memory interface, 30, 80 DMA arbiter, 31, 32 timer, 33a-33c, 34a-34c counter, 35 multiplexer, 40 priority generator section, 50, 60 priority generator, 51a-51c, 71a-71c, 72a-72c register, 52a-52c actual transfer capacity calculation unit, 53a-53c, 62 comparison unit, 54, 63
Claims (4)
それぞれの周辺回路に接続されて前記メモリへのアクセスを要求するアクセス要求信号を発生し、前記メモリへのアクセスが許可された場合に、その周辺回路と前記メモリとの間のデータ転送を制御する複数のメモリアクセス制御手段と、
前記複数のメモリアクセス制御手段に対して設定された優先順位に基づいて、アクセス要求信号を発生するいずれか1つのメモリアクセス制御手段に前記メモリへのアクセスを許可し、前記メモリへのアクセスが許可されたメモリアクセス制御手段と前記メモリとの間のバス調停を行うバス調停手段と、
前記複数のメモリアクセス制御手段の前記メモリへのアクセス状態に関する複数のカウント値を得る複数のカウンタと、
前記複数のカウンタによって得られた複数のカウント値に基づいて、前記複数のメモリアクセス制御手段に対して設定された優先順位を変更する優先順位変更手段と、
を具備する半導体集積回路。 A semiconductor integrated circuit having a direct memory access function for controlling access to a memory from a plurality of peripheral circuits without going through a central processing unit,
An access request signal connected to each peripheral circuit to request access to the memory is generated, and when access to the memory is permitted, data transfer between the peripheral circuit and the memory is controlled. A plurality of memory access control means;
Based on the priority set for the plurality of memory access control means, any one memory access control means for generating an access request signal is allowed to access the memory, and access to the memory is allowed. Bus arbitration means for performing bus arbitration between the memory access control means and the memory,
A plurality of counters for obtaining a plurality of count values related to an access state to the memory of the plurality of memory access control means;
Priority order changing means for changing the priority order set for the plurality of memory access control means based on a plurality of count values obtained by the plurality of counters;
A semiconductor integrated circuit comprising:
前記優先順位変更手段が、前記複数のカウンタによって得られた複数のカウント値と前記複数の第2のカウンタによって得られた複数のカウント値とに基づいて、前記複数のメモリアクセス制御手段に対して設定された優先順位を変更する、
請求項1又は2記載の半導体集積回路。 A plurality of second counters for obtaining a plurality of count values related to access requests to the memory by the plurality of memory access control means;
The priority changing unit is configured to control the plurality of memory access control units based on a plurality of count values obtained by the plurality of counters and a plurality of count values obtained by the plurality of second counters. Change the set priority,
The semiconductor integrated circuit according to claim 1 or 2.
前記記憶手段に記憶されている情報に基づいて、前記メモリへのアクセスが最後に許可されたメモリアクセス制御手段から出力されるアクセス要求信号を所定の期間マスクすることにより前記バス調停手段に入力させないアクセス要求信号マスク手段と、
をさらに具備する請求項1〜3のいずれか1項記載の半導体集積回路。 Storage means for storing information relating to the memory access control means that was last granted access to the memory;
Based on the information stored in the storage means, the access request signal output from the memory access control means that is finally permitted to access the memory is masked for a predetermined period so as not to be input to the bus arbitration means. Access request signal masking means;
The semiconductor integrated circuit according to claim 1, further comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003287733A JP2005056239A (en) | 2003-08-06 | 2003-08-06 | Semiconductor integrated circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003287733A JP2005056239A (en) | 2003-08-06 | 2003-08-06 | Semiconductor integrated circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005056239A true JP2005056239A (en) | 2005-03-03 |
Family
ID=34366632
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003287733A Withdrawn JP2005056239A (en) | 2003-08-06 | 2003-08-06 | Semiconductor integrated circuit |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005056239A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008262315A (en) * | 2007-04-11 | 2008-10-30 | Renesas Technology Corp | Dma controller and dma transfer method |
JP2012234581A (en) * | 2012-09-05 | 2012-11-29 | Renesas Electronics Corp | Dma controller |
JP2014004694A (en) * | 2012-06-21 | 2014-01-16 | Seiko Epson Corp | Liquid discharge device |
-
2003
- 2003-08-06 JP JP2003287733A patent/JP2005056239A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008262315A (en) * | 2007-04-11 | 2008-10-30 | Renesas Technology Corp | Dma controller and dma transfer method |
US8176221B2 (en) | 2007-04-11 | 2012-05-08 | Renesas Electronics Corporation | DMA controller |
JP2014004694A (en) * | 2012-06-21 | 2014-01-16 | Seiko Epson Corp | Liquid discharge device |
JP2012234581A (en) * | 2012-09-05 | 2012-11-29 | Renesas Electronics Corp | Dma controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4480427B2 (en) | Resource management device | |
EP1403773B1 (en) | Resource management device | |
JP4457168B2 (en) | Resource request arbitration device, resource request arbitration method, and computer program | |
EP0439987B1 (en) | Arbitration system limiting high priority successive grants | |
JP2006195714A (en) | Resource management device | |
EP2423824B1 (en) | Data transfer device, method of transferring data, and image forming apparatus | |
KR930002787B1 (en) | Universal peripheral controller self-configuring bootloadable ramware | |
US4896266A (en) | Bus activity sequence controller | |
JP2004246862A (en) | Resource management device | |
JP2005056239A (en) | Semiconductor integrated circuit | |
JP4666143B2 (en) | Data transfer processing device | |
EP1513069B1 (en) | Resource management apparatus | |
JP4953794B2 (en) | Bus arbitration method for bus system and bus system | |
EP1424634B1 (en) | Avoidance of extended bus occupancy through simple control operation | |
JP4344163B2 (en) | Resource request arbitration device, resource request arbitration method, and computer program | |
JPH07281942A (en) | Arbitration method for shared resources | |
JP7381603B2 (en) | Data transfer device and data transfer method | |
JP2574345B2 (en) | Bus arbitration equipment | |
JP7226084B2 (en) | Information processing equipment | |
JPH10149311A (en) | Memory controller | |
JP2001117860A (en) | Memory access priority switching controller | |
JP4150953B2 (en) | Information processing device | |
JP2004213142A (en) | Semiconductor integrated circuit device | |
JPH1125035A (en) | Bus arbiter device | |
JP2004220309A (en) | Multiprocessor system |
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: 20061107 |