JP4832327B2 - Bus arbitration circuit - Google Patents

Bus arbitration circuit Download PDF

Info

Publication number
JP4832327B2
JP4832327B2 JP2007026939A JP2007026939A JP4832327B2 JP 4832327 B2 JP4832327 B2 JP 4832327B2 JP 2007026939 A JP2007026939 A JP 2007026939A JP 2007026939 A JP2007026939 A JP 2007026939A JP 4832327 B2 JP4832327 B2 JP 4832327B2
Authority
JP
Japan
Prior art keywords
bus
priority
acquisition request
request
signal
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.)
Active
Application number
JP2007026939A
Other languages
Japanese (ja)
Other versions
JP2008191987A (en
Inventor
知砂 中川
通之 鈴木
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2007026939A priority Critical patent/JP4832327B2/en
Publication of JP2008191987A publication Critical patent/JP2008191987A/en
Application granted granted Critical
Publication of JP4832327B2 publication Critical patent/JP4832327B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Bus Control (AREA)

Description

この発明は、複数のバスマスタからバス使用権の取得要求を受け、それらのうち1つのバスマスタにバス使用権を与えるバス調停回路に関する。   The present invention relates to a bus arbitration circuit that receives a bus use right acquisition request from a plurality of bus masters and gives a bus use right to one of the bus masters.

CPUを用いた装置では、CPUとその周辺との間、あるいは、周辺と周辺との間でデータをやり取りするためにバスが用いられる。バスを用いて、主体的にデータをやり取りし得るものは、バスマスタと呼ばれる。単純な構成の装置では、CPUのみがバスマスタである。しかし、周辺から周辺へデータを高速で転送する場合にダイレクト・メモリ・アクセス・コントローラ(DMA)がバスマスタとなる装置が多用されている。例えば、デジタル複合機やプリンタなどの画像形成装置では、通例、画像データを高速で転送するためにDMAコントローラが使用される。   In a device using a CPU, a bus is used for exchanging data between the CPU and its periphery or between the periphery and the periphery. Those that can exchange data independently using the bus are called bus masters. In a device with a simple configuration, only the CPU is a bus master. However, a device in which a direct memory access controller (DMA) is a bus master is frequently used when data is transferred from peripheral to peripheral at high speed. For example, in an image forming apparatus such as a digital multi-function peripheral or a printer, a DMA controller is usually used to transfer image data at a high speed.

複数のバスマスタを有する装置では、ある瞬間において一つのバスマスタのみがバスの使用権を獲得し得る。バスの使用権を獲得したものが、狭義のバスマスタである。以下、この明細書において特に断りのない場合、バスマスタの語は、バスの使用権を獲得し得るもの(広義のバスマスタ)の意味で用いる。   In a device having a plurality of bus masters, only one bus master can acquire the right to use the bus at a certain moment. The bus master in the narrow sense is the one who has acquired the right to use the bus. Hereinafter, unless otherwise specified in this specification, the word “bus master” is used to mean a bus mastership right (bus master in a broad sense).

複数のバスマスタから同時にバス使用権の取得要求があった場合、優先順位の高いものから順にバスを使用してデータを転送させるようなバス調停(バス・アービトレーション)がなされる。バス調停を実現するため、各バスマスタからのバス使用権の取得要求を受けてそれらのうち1つのバスマスタにバス使用権を与えるバス調停回路が用いられる。   When a plurality of bus masters simultaneously request acquisition of a bus usage right, bus arbitration (bus arbitration) is performed in which data is transferred using the bus in descending order of priority. In order to realize bus arbitration, a bus arbitration circuit that receives a bus use right acquisition request from each bus master and gives the bus use right to one of the bus masters is used.

ここで、各バスマスタに対して前記優先順位をどのように付与するかが問題になる。単純な手法は固定の優先順位を各バスマスタに割り当てるもの(固定優先順位方式)であるが、優先順位の高いバスマスタが頻繁にバス使用権の取得要求を発すると、そのバスマスタに大半の時間が割り当てられ、優先順位の低いバスマスタに処理が回らないことが起こる。固定優先順位方式の短所を克服するため、各バスマスタに割り当てる優先順位を循環式に変える回転優先順位方式(ラウンド・ロビン方式)が多用されている。回転優先順位方式では、各バスマスタに対して予め定められた循環的な優先順位に従って取得要求を判定する。このとき、前回のバス調停でバス使用権を獲得したバスマスタが最も低い優先順位、即ち順位の末尾になるように各バスマスタの優先順位が割当てられる。複数回のバス調停を通してみると、各バスマスタの平均的な優先順位は等しい。従って、特定のバスマスタに大半の時間が割り当てられるといった不公平は生じない。その反面、バス使用権を緊急に取得する必要が生じた場合であっても、例えば、そのバスマスタが直近のバス調停でバス使用権を獲得していたときは、次回に最下位の優先順位が割り当てられてしまう。その結果、同時に取得要求をしている他のバスマスタがあれば、他のバスマスタが優先され、それらの処理が終わるまでバス使用権取得待ちの状態におかれてしまう。   Here, how to give the priority to each bus master becomes a problem. A simple method is to assign a fixed priority to each bus master (fixed priority method). However, if a bus master with a high priority issues frequent bus usage right acquisition requests, most of the time is allocated to that bus master. Therefore, the processing does not go to the bus master with a low priority. In order to overcome the disadvantages of the fixed priority method, a rotation priority method (round robin method) that changes the priority assigned to each bus master to a cyclic method is frequently used. In the rotation priority order method, an acquisition request is determined according to a cyclic priority order predetermined for each bus master. At this time, the priority order of each bus master is assigned so that the bus master that has acquired the bus use right in the previous bus arbitration has the lowest priority, that is, the end of the order. Looking through multiple bus arbitrations, the average priority of each bus master is equal. Therefore, there is no unfairness that most of the time is allocated to a specific bus master. On the other hand, even if it is necessary to urgently acquire the bus use right, for example, if the bus master has acquired the bus use right in the latest bus arbitration, the lowest priority will be given next time. Will be assigned. As a result, if there is another bus master making an acquisition request at the same time, the other bus master is prioritized and is put in a state of waiting for acquisition of the bus use right until the processing is completed.

このように、固定優先順位方式と回転優先順位方式には、それぞれの長所と短所がある。固定優先順位方式と回転優先順位方式のいずれか一方の手法だけでは適当でない用途が存在する。例えば、特定のバスマスタは、バス使用権の取得要求を行った後速やかにバスを使用する必要があり、他のバスマスタは平等にバスを使用したいといったような用途がある。このような用途に対しては、固定優先順位方式と回転優先順位方式の長所を併せ持った柔軟なバス調停回路が求められる。   As described above, the fixed priority method and the rotation priority method have their advantages and disadvantages. There are applications in which either the fixed priority method or the rotation priority method is not appropriate. For example, a specific bus master needs to use a bus immediately after making a request to acquire a bus use right, and other bus masters want to use the bus equally. For such applications, a flexible bus arbitration circuit that combines the advantages of the fixed priority method and the rotation priority method is required.

これに対し、例えば、上位の優先順位を保持すべきデータ転送路と、残りのデータ転送回路とにデータ転送路とに分割し、前者に対して固定優先順位として上位の優先順位を設定し、後者に対して回転優先順位を適用するものが知られている(例えば、特許文献1参照)。また、優先順位の異なる複数のグループのいずれかに属するように複数のバスマスタを分割し、バス調停回路はいずれかのグループに対して使用許可を与え、かつ、その場合にグループに属するバスマスタからのバス要求の数だけ連続して使用許可を与えるようにし、バスマスタの切替えに要する時間の低減を図りながら公平なバス調停を実現しようとするものが知られている(例えば、特許文献2参照)。さらに、回転優先順位判定回路の外部にバス使用要求信号をマスクするマスク信号生成回路を設け、優先順位の低い装置にもバスを使用する機会を与えるようにしたものが知られている(例えば、特許文献3参照)。
特開2005−71049号公報 特開2001−175589号公報 特開平5−53979号公報
On the other hand, for example, the data transfer path that should hold the upper priority and the data transfer path are divided into the remaining data transfer circuits, and the upper priority is set as a fixed priority for the former, One that applies rotation priority to the latter is known (see, for example, Patent Document 1). Also, a plurality of bus masters are divided so as to belong to any of a plurality of groups having different priorities, and the bus arbitration circuit grants use permission to any of the groups, and in that case, from the bus masters belonging to the group. It is known that use permission is continuously given for the number of bus requests to achieve fair bus arbitration while reducing the time required for switching the bus master (see, for example, Patent Document 2). Further, a mask signal generation circuit for masking a bus use request signal is provided outside the rotation priority determination circuit so that a device having a low priority is given an opportunity to use the bus (for example, (See Patent Document 3).
JP 2005-71049 A JP 2001-175589 A JP-A-5-53979

同一のバスマスタにおいて、特定の処理だけを速やかに処理し、他の処理はバスを平等に割り当てたい場合がある。例えば、画像形成装置において、原稿の画像は、原稿を走査してCCDなどのイメージセンサで読み取り、イメージセンサでサンプリングされた画像の信号をA/D変換器を通してデジタル化し、デジタル化された画像(画像データ)を画像メモリに格納する。画像データを画像メモリに格納するとき、画像データのDMA転送が行われる。一旦画像メモリに格納された画像データは、通常複数段階の画像処理が施された後、画像形成部へ出力される。各段階の画像処理においては、画像メモリから画像メモリへのDMA転送が行われる。画像形成部への出力時には、画像メモリから画像形成部へのDMA転送が行われる。イメージセンサから出力された原稿の画像データを画像メモリに格納する処理は、高い優先順位で、要求後直ちに画像データの転送を開始することが求められる。一旦原稿の走査が始まると、所定量の処理を完了するまでは機械的、電気的に一時停止させることができない。イメージセンサと画像メモリとの間の転送路には、有限容量の入力バッファが配置されており、イメージセンサと画像メモリの転送速度の差をある程度吸収する。入力バッファが満杯にならないように画像データを転送しなければならない。   In the same bus master, there is a case where only a specific process is processed promptly, and other processes want to allocate the bus equally. For example, in an image forming apparatus, an image of a document is scanned by the document, read by an image sensor such as a CCD, and the signal of the image sampled by the image sensor is digitized through an A / D converter, and the digitized image ( Image data) is stored in the image memory. When image data is stored in the image memory, DMA transfer of the image data is performed. The image data once stored in the image memory is usually output to the image forming unit after being subjected to a plurality of stages of image processing. In the image processing at each stage, DMA transfer from the image memory to the image memory is performed. At the time of output to the image forming unit, DMA transfer from the image memory to the image forming unit is performed. The process of storing the image data of the document output from the image sensor in the image memory is required to start the transfer of the image data immediately after the request with high priority. Once scanning of the document starts, it cannot be temporarily stopped mechanically and electrically until a predetermined amount of processing is completed. A finite-capacity input buffer is arranged on the transfer path between the image sensor and the image memory, and absorbs a difference in transfer speed between the image sensor and the image memory to some extent. The image data must be transferred so that the input buffer does not fill up.

画像メモリから画像形成部へのデータ転送についても、同様のことがいえる。一旦画像形成部が画像形成を開始すると、所定量の処理を完了するまでは画像形成を機械的、電気的に一時停止させることができない。画像メモリと画像形成部との間の転送路には、有限容量の出力バッファが配置されており、画像メモリと画像形成部の転送速度の差をある程度吸収する。出力バッファが空にならないように画像データを転送しなければならない。それに比べて、画像メモリから画像メモリへの転送は、所定期間内の処理を保証する必要はなく、優先順位を低くしてもよい。ただし、処理がずっと待たされていたのでは、いつまでたっても出力すべきデータの準備ができないので、平等にバス使用権を配分することが好ましい。   The same can be said for data transfer from the image memory to the image forming unit. Once the image forming unit starts image formation, image formation cannot be temporarily stopped mechanically and electrically until a predetermined amount of processing is completed. A finite-capacity output buffer is arranged in the transfer path between the image memory and the image forming unit, and absorbs a difference in transfer speed between the image memory and the image forming unit to some extent. The image data must be transferred so that the output buffer does not become empty. On the other hand, the transfer from the image memory to the image memory does not need to guarantee processing within a predetermined period, and may have a lower priority. However, if processing has been awaited for a long time, it is not possible to prepare data to be output indefinitely, so it is preferable to distribute the right to use the bus equally.

しかし、イメージセンサからのデータ転送であっても、例えば、原稿を読み取る速度が異なる複数の動作モードを有する画像形成装置がある。また、バス、DMAおよび画像メモリを含む構成部がユニット化されてなり、高速で原稿を読み取る画像形成装置と低速で原稿を読み取る画像形成装置とに同一種類のユニットが使用されることがある。このようなケースで、高速で原稿を読み取るモード(高速モード)と低速で原稿を読み取るモード(読取モード)の各モードに対して画像デ―タの転送処理が最適化できることが好ましい。即ち、高速モード時は、画像データの転送を高い優先順位で処理することが好ましい。一方、低速モード時は、画像データの転送を高い優先順位で処理する必要は必ずしも存在しない。むしろ画像形成部への出力を優先するために、優先順位を下げるほうが好ましい場合もある。
このような用途では、特定のバスマスタに高い優先順位を固定的に割り当てることは好ましくない。
However, even with data transfer from an image sensor, for example, there is an image forming apparatus having a plurality of operation modes with different document reading speeds. In addition, components including a bus, a DMA, and an image memory are unitized, and the same type of unit may be used for an image forming apparatus that reads a document at high speed and an image forming apparatus that reads a document at low speed. In such a case, it is preferable that the image data transfer process can be optimized for each of a mode for reading a document at high speed (high-speed mode) and a mode for reading a document at low speed (reading mode). That is, in the high speed mode, it is preferable to process the transfer of image data with high priority. On the other hand, in the low speed mode, it is not always necessary to transfer image data with high priority. Rather, it may be preferable to lower the priority order in order to give priority to output to the image forming unit.
In such applications, it is not preferable to assign a fixed high priority to a specific bus master.

この発明は、前述のような事情を考慮してなされたものであって、所定のバスマスタの所定の処理に対して高い優先度を付与し、前記バスマスタの他の処理および他のバスマスタには平等にバスを割り当てることのできるバス調停回路を、単純な構成で実現するものである。   The present invention has been made in consideration of the circumstances as described above, and gives high priority to predetermined processing of a predetermined bus master, and equalizes other processing of the bus master and other bus masters. A bus arbitration circuit capable of assigning buses to each other is realized with a simple configuration.

この発明は、複数のバスマスタの少なくとも一つからバス使用権取得の要求を受けたとき、所定の優先順位で各バスマスタからの要求の有無を判定し、要求をしたバスマスタの一つにバス使用権を与えるバス調停用の回路であって、各バスマスタからバス取得要求を受ける要求受領部と、前記バス取得要求に優先する緊急取得要求を所定のバスマスタから受ける緊急取得要求受領部と、前回のバス調停でバス使用権を取得したバスマスタを示す第1識別情報を次回のバス調停時に供給すべく保持する優先状態保持部と、第1識別情報を取得し、それに基づき回転優先順位方式で各バスマスタからの前記バス取得要求の有無を判定し、バス使用権を与えるバスマスタを決定し得る要求判定部と、緊急取得要求を受けたとき、その緊急取得要求に対応する第2識別情報を第1識別情報に代えてバス要求判定部へ供給する切替部とを備え、前記要求判定部は、供給された第1または第2識別情報が示すバスマスタを最低順位とする回転優先順位方式で各バスマスタからのバス取得要求および緊急取得要求の有無を判定し、第2識別情報は、その緊急取得要求を発したバスマスタが最高優先順位になるように予め設定されてなることを特徴とするバス調停回路を提供する。
また、この発明は、前記バス調停回路を含んでなる半導体装置を提供する。
In the present invention, when a request for acquiring a bus usage right is received from at least one of a plurality of bus masters, the presence or absence of a request from each bus master is determined with a predetermined priority, and the bus usage right is assigned to one of the requested bus masters. A bus receiving circuit that receives a bus acquisition request from each bus master, an emergency acquisition request receiving unit that receives an emergency acquisition request prior to the bus acquisition request from a predetermined bus master, and a previous bus A priority state holding unit that holds first identification information indicating the bus master that has acquired the bus use right by arbitration to be supplied at the next bus arbitration, and obtains the first identification information, and based on that, from each bus master in the rotation priority method A request determination unit that can determine whether or not there is a bus acquisition request and determine a bus master to which a bus use right is given, and when an emergency acquisition request is received, A switching unit that supplies the corresponding second identification information to the bus request determination unit instead of the first identification information, and the request determination unit sets the bus master indicated by the supplied first or second identification information as the lowest order. And determining whether or not there is a bus acquisition request and an emergency acquisition request from each bus master, and the second identification information is preset so that the bus master that issued the emergency acquisition request has the highest priority. A bus arbitration circuit is provided.
The present invention also provides a semiconductor device including the bus arbitration circuit.

この発明のバス調停回路は、緊急取得要求を受けたとき、その緊急取得要求に対応する第2識別情報を第1識別情報に代えてバス要求判定部へ供給する切替部を備え、第2識別情報が、その緊急取得要求を発したバスマスタが最高優先順位になるように予め設定されてなるので、緊急取得要求を受けたとき、その要求を発したバスマスタを最初に判定することができる。また、前記要求判定部が、供給された第1または第2識別情報が示すバスマスタを最低順位とする回転優先順位方式で各バスマスタからのバス取得要求および緊急取得要求の有無を判定するので、前記バスマスタから取得要求を受けたときや他のバスマスタから取得要求を受けたときは回転優先順位方式でバス要求を判定する。   When receiving an emergency acquisition request, the bus arbitration circuit of the present invention includes a switching unit that supplies second identification information corresponding to the emergency acquisition request to the bus request determination unit instead of the first identification information, and includes a second identification Since the information is preset so that the bus master that issued the emergency acquisition request has the highest priority, when the emergency acquisition request is received, the bus master that issued the request can be determined first. In addition, since the request determination unit determines the presence or absence of a bus acquisition request and an emergency acquisition request from each bus master in a rotation priority method with the bus master indicated by the supplied first or second identification information as the lowest order, When an acquisition request is received from the bus master or when an acquisition request is received from another bus master, the bus request is determined by the rotation priority method.

また、この発明のバス調停回路は、主として緊急取得要求受領部、優先状態保持部および切替部によって緊急取得要求に対する優先順位の切替えが処理される。それらの付加部分とバス取得要求を処理する部分、即ち、従来の回転優先順位方式のバス調停部分との機能分担が明確である。従って、従来の回転優先順位方式のバス調停回路に緊急取得要求受領部、優先状態保持部および切替部を付加する単純な構成で緊急取得要求に対応することができる。   In the bus arbitration circuit according to the present invention, priority switching for the emergency acquisition request is processed mainly by the emergency acquisition request receiving unit, the priority state holding unit, and the switching unit. The function sharing between these additional portions and the portion that processes the bus acquisition request, that is, the bus arbitration portion of the conventional rotation priority method is clear. Therefore, it is possible to respond to the emergency acquisition request with a simple configuration in which the emergency acquisition request receiving unit, the priority state holding unit, and the switching unit are added to the conventional rotation priority order type bus arbitration circuit.

前記切替部は、緊急取得要求を発したバスマスタにバス使用権が与えられた後、第1識別情報をバス要求判定部へ供給し優先状態保持部は、第2識別情報がバス要求判定部に供給されている間、第1識別情報を保持してもよい。このようにすれば、緊急取得要求を発したバスマスタにバス使用権が与えられた後のバス調停は、第1識別情報、即ち、バス取得要求の処理に基づく優先順位で判定される。即ち、バス取得要求は回転優先順位方式で処理され、緊急取得要求が割り込んで処理されても、その後の優先順位は緊急取得要求の処理によって影響を受けない。   The switching unit supplies the first identification information to the bus request determining unit after the bus use right is given to the bus master that issued the emergency acquisition request, and the priority state holding unit transfers the second identification information to the bus request determining unit. While being supplied, the first identification information may be held. In this way, the bus arbitration after the bus use right is given to the bus master that has issued the emergency acquisition request is determined by the priority based on the first identification information, that is, the processing of the bus acquisition request. That is, the bus acquisition request is processed by the rotation priority method, and even if the emergency acquisition request is interrupted and processed, the subsequent priority is not affected by the processing of the emergency acquisition request.

また、前記バスマスタは、メモリから読み出されたデータを転送し、および/または、メモリへ格納するデータを転送するためのものであってもよい。メモリを転送元および/または転送先としたデータ転送を行うDMAコントローラは、この発明に係るバスマスタの典型例である。   The bus master may be for transferring data read from the memory and / or transferring data to be stored in the memory. A DMA controller that performs data transfer using a memory as a transfer source and / or transfer destination is a typical example of a bus master according to the present invention.

されにまた、転送されるデータは、ページ単位の画像のデータであり、緊急取得要求は、各ページのデータ転送に対応して発せられてもよい。画像データは、この発明に係るバスを用いて転送されるデータの典型例である。
好ましい態様は、組み合わせることができる。
In addition, the transferred data is image data in units of pages, and the emergency acquisition request may be issued corresponding to the data transfer of each page. Image data is a typical example of data transferred using the bus according to the present invention.
Preferred embodiments can be combined.

以下、図面を用いてこの発明をさらに詳述する。なお、以下の説明は、すべての点で例示であって、この発明を限定するものと解されるべきではない。
装置の全体構成
図2は、この発明のバス調停回路が用いられる装置のバスとその周辺の構成例を示すブロック図である。
Hereinafter, the present invention will be described in more detail with reference to the drawings. In addition, the following description is an illustration in all the points, Comprising: It should not be interpreted as limiting this invention.
Overall Configuration of Device FIG. 2 is a block diagram showing an example of the configuration of the bus of the device in which the bus arbitration circuit of the present invention is used and its periphery.

図2で、バス・インターフェース部13は、装置1が有する複数の処理ブロック(周辺29)が、メモリ23、CPU21および他の周辺との間でバスを介してデータやコマンドをやり取りするためのブロックである。やり取りされるコマンドは、予めその形式と内容が定められている。各ブロックは、周辺A、周辺B、周辺C、…周辺nとして示している。例えば、画像形成装置において、周辺Aは原稿の画像を読み取り画像データとして提供するブロック、周辺Bは画像データをページ単位で格納するハードディスク装置、周辺Cは画像データに基づいて画像を形成して印刷を行う画像形成部、他の周辺(周辺nを含む)は、画像データに対して画像フィルタ処理、色補正処理、中間調の特性補正等の各種画像処理をそれぞれ行う画像処理部である。各周辺29は、それぞれが請求項にいうバスマスタであり、DMAによるデータ転送が可能である。各周辺29とバスとの間には、データ転送時の転送元と転送先の処理速度の差を吸収するためのバッファ15が設けられている。即ち、周辺Aとバスとの間にバッファAが設けられ、周辺Bとバスとの間にバッファBが設けられ、周辺Cとバスとの間にバッファCが設けられている。他の周辺についても同様である。   In FIG. 2, the bus interface unit 13 is a block for a plurality of processing blocks (peripheral 29) of the device 1 to exchange data and commands with the memory 23, the CPU 21 and other peripherals via the bus. It is. The format and contents of commands to be exchanged are determined in advance. Each block is shown as peripheral A, peripheral B, peripheral C,... Peripheral n. For example, in the image forming apparatus, peripheral A is a block that reads an image of a document and provides it as image data, peripheral B is a hard disk device that stores image data in units of pages, and peripheral C forms an image based on the image data and prints it. The image forming unit that performs image processing and the other periphery (including the periphery n) are image processing units that perform various types of image processing such as image filter processing, color correction processing, and halftone characteristic correction on image data. Each peripheral 29 is a bus master referred to in the claims, and data transfer by DMA is possible. Between each peripheral 29 and the bus, a buffer 15 is provided for absorbing a difference in processing speed between the transfer source and the transfer destination during data transfer. That is, the buffer A is provided between the peripheral A and the bus, the buffer B is provided between the peripheral B and the bus, and the buffer C is provided between the peripheral C and the bus. The same applies to the other surroundings.

バス・インターフェース部13には、優先順位判定回路11が接続されている。優先順位判定回路11は、請求項にいうバス調停回路に相当する。各周辺29は、コマンドの一つとして、データ転送要求を出力する。バス・インターフェース部13は、データ転送要求を認識してバス使用権の取得要求信号Req*あるいは緊急取得要求信号EmReq*を優先順位判定回路11へ出力する。優先順位判定回路11は、それらの要求信号に応じてどの周辺にバス使用権を付与するかを決定し、決定した周辺に対してバス使用権付与信号Ack*を出力する。   A priority determination circuit 11 is connected to the bus interface unit 13. The priority determination circuit 11 corresponds to a bus arbitration circuit described in the claims. Each peripheral 29 outputs a data transfer request as one of the commands. The bus interface unit 13 recognizes the data transfer request and outputs a bus use right acquisition request signal Req * or an emergency acquisition request signal EmReq * to the priority determination circuit 11. The priority determination circuit 11 determines to which peripheral the right to use the bus is granted according to these request signals, and outputs a bus usage right grant signal Ack * to the determined peripheral.

図2で、取得要求信号Req*は、各周辺に対応したn本の信号がある。緊急取得要求信号EmReq*は、周辺Aだけに割り当てられている。即ち、EmReq*Aの1本のみの信号である。周辺Aから送られるデータ転送要求のコマンドには、周辺Aが転送しようとするデータの種類についての情報(例えば、通常の取得要求信号か緊急取得要求信号かを示すフラグ)が付加されている。バス・インターフェース部13は、付加された情報に基づいてReq*Aを出力すべきかEmReq*Aを出力すべきかを判断し、その結果に応じた信号を出力する。なお、この実施の形態において、緊急取得要求信号EmReq*Aを出力するときは必ずReq*Aも同時に出力する。ただし、これは、後述する優先順位判定回路11の具体的な構成に依存するものであって、この発明を限定するものではない。例えば、原稿画像を読み取った画像データを高速モードで転送するときはEmReq*Aを出力する。一方、低速モードで画像を読み取る場合はReq*Aを出力する。   In FIG. 2, the acquisition request signal Req * has n signals corresponding to each periphery. The emergency acquisition request signal EmReq * is assigned only to the periphery A. That is, only one signal of EmReq * A. The data transfer request command sent from the peripheral A is added with information about the type of data to be transferred by the peripheral A (for example, a flag indicating a normal acquisition request signal or an emergency acquisition request signal). The bus interface unit 13 determines whether to output Req * A or EmReq * A based on the added information, and outputs a signal corresponding to the result. In this embodiment, when the emergency acquisition request signal EmReq * A is output, Req * A is always output at the same time. However, this depends on a specific configuration of the priority determination circuit 11 described later, and does not limit the present invention. For example, EmReq * A is output when image data obtained by scanning a document image is transferred in the high-speed mode. On the other hand, when reading an image in the low speed mode, Req * A is output.

なお、この実施の形態では、緊急取得要求信号を発するのは周辺Aの一つだけであるが、この発明は、これに限定されるものではなく、複数の周辺が緊急取得要求信号を発し得るように構成してもよい。   In this embodiment, only one of the surroundings A issues an emergency acquisition request signal. However, the present invention is not limited to this, and a plurality of surroundings can issue an emergency acquisition request signal. You may comprise as follows.

バスが開放されているとき、優先順位判定回路11は、先にバス使用権の取得要求を受け付けた周辺にバス使用権を付与する。バス使用権を獲得した周辺は、データ転送を行う。例えば、バスが開放されているときに周辺Cのみがバス使用権を要求すると、優先順位判定回路11は、周辺Cにバス使用権を付与することを決定し、Ack*C信号を出力する。周辺Cは、Ack*C信号が出力されたことを認識すると、メモリ23から周辺Cへ所定量のデータ転送を行う。その間、他の周辺は、バスを使用することができない。例えば、周辺Cのデータ転送中に周辺Bがバス使用権の取得要求を行うと、Req*C信号が出力されるが、周辺Cのデータ転送が終了するまで要求は保留される。周辺Cの転送が終了し、バスが開放されると、優先順位判定回路11は、そのときアサートされているReq*信号およびEmReq*信号のいずれか一つにバス使用権を付与すべく、判定を行う。各Req*信号については、回転優先順位方式を用いてバス使用権を付与する。EmReq*Aがアサートされている場合は、いずれのReq*よりも優先して周辺Aにバス使用権を付与する。これについては、後に詳述する。   When the bus is open, the priority determination circuit 11 grants the bus use right to the periphery that has received the bus use right acquisition request first. Peripherals that have acquired the bus use right perform data transfer. For example, when only the peripheral C requests the right to use the bus when the bus is open, the priority determination circuit 11 determines to grant the right to use the bus to the peripheral C and outputs an Ack * C signal. When the peripheral C recognizes that the Ack * C signal has been output, the peripheral C performs a predetermined amount of data transfer from the memory 23 to the peripheral C. Meanwhile, other peripherals cannot use the bus. For example, if the peripheral B makes a bus use right acquisition request during the data transfer of the peripheral C, the Req * C signal is output, but the request is suspended until the data transfer of the peripheral C is completed. When the transfer of peripheral C is completed and the bus is released, the priority determination circuit 11 determines to give the right to use the bus to one of the Req * signal and the EmReq * signal asserted at that time. I do. For each Req * signal, the right to use the bus is given using the rotation priority method. When EmReq * A is asserted, the bus use right is granted to peripheral A in preference to any Req *. This will be described in detail later.

バスは、バス変換部27を介してシステムバスに接続される。システムバスには、CPU21、メモリ23が接続されている。システムバス・インターフェース部25は、CPU21およびメモリ23がシステムバスを介してデータをやり取りできるようにするブロックである。メモリの一例は、SDRAMである。バス変換部27は、互いに構成の異なるバスとシステムバスとの間でデータのやり取りをできるようにするためのブロックである。一例では、バスはPCIバスである。システムバスは、メモリ23の種類に応じて決定される。   The bus is connected to the system bus via the bus conversion unit 27. A CPU 21 and a memory 23 are connected to the system bus. The system bus interface unit 25 is a block that allows the CPU 21 and the memory 23 to exchange data via the system bus. An example of the memory is SDRAM. The bus conversion unit 27 is a block for enabling data exchange between a system bus and a bus having different configurations. In one example, the bus is a PCI bus. The system bus is determined according to the type of the memory 23.

CPU21は、装置1を制御する制御部として機能するものである。メモリ23は、バスを介して転送されるデータを格納するほか、CPU21が実行するプログラムを格納する。さらに、メモリ23には、緊急取得要求信号の出力を許可するか否かを設定するフラグ領域として、緊急取得要求許可/禁止フラグ24が設けられている。前記フラグは、CPU21によって設定/変更可能である。そして、バス・インターフェース部13は、前記フラグの状態を直接参照することができるように構成されている。CPU21は、電源オン後の初期化処理で、前記フラグをオンあるいはオフに設定する。周辺AからEmReq*によるデータ転送を行うようコマンドが送られてきたとき、バス・インターフェース部13は、緊急取得要求許可/禁止フラグ24を参照する。前記フラグが「許可」状態のとき、EmReq*AをReq*Aと共に出力する。一方、前記フラグが「禁止」状態のときReq*Aのみを出力し、EmReq*Aを出力しないように構成されている。即ち、装置1は、CPUの実行するプログラムの内容に応じて、EmReq*Aを使用するか否かを変更きるように構成されている。CPU21が前記フラグの設定を変更すると、変更後の優先順位判定に変更された内容が反映される。   The CPU 21 functions as a control unit that controls the apparatus 1. The memory 23 stores data transferred via the bus and stores a program executed by the CPU 21. Further, the memory 23 is provided with an emergency acquisition request permission / prohibition flag 24 as a flag area for setting whether or not to permit output of the emergency acquisition request signal. The flag can be set / changed by the CPU 21. The bus interface unit 13 is configured to directly refer to the state of the flag. The CPU 21 sets the flag on or off in the initialization process after the power is turned on. When a command is sent from the peripheral A to perform data transfer using EmReq *, the bus interface unit 13 refers to the emergency acquisition request permission / prohibition flag 24. When the flag is in the “permitted” state, EmReq * A is output together with Req * A. On the other hand, when the flag is in the “prohibited” state, only Req * A is output and EmReq * A is not output. That is, the apparatus 1 is configured to change whether to use EmReq * A according to the contents of the program executed by the CPU. When the CPU 21 changes the setting of the flag, the changed content is reflected in the priority order determination after the change.

優先順位の判定
次に、優先順位判定回路11の機能について説明する。複数の周辺から同時にバス使用権の取得要求がされている場合、回転優先順位判定回路11は、それらの一つの周辺にバス使用権を付与する。その判断に際して、各周辺に割り当てた優先順位に基づいて最も優先順位の高い周辺にバス使用権を付与する。
Priority determination will be explained the function of the priority decision circuit 11. When a bus use right acquisition request is made simultaneously from a plurality of peripherals, the rotation priority determination circuit 11 grants the bus use right to one of those peripherals. In making this determination, the right to use the bus is given to the periphery with the highest priority based on the priority assigned to each periphery.

図3は、この発明の優先順位判定回路が最優先の周辺を判定する際のルールを示す説明図である。周辺が、A,B,C,Dの4つの場合である。この発明の優先順位判定回路は、通常の取得要求信号に対しては回転優先順位方式に基づいて各周辺に優先順位を割り当てる。従って、判定時の優先順位は、前回判定時の優先順位によって異なる。図3で、鎖線の矢印は、通常の取得要求信号に基づいて判定を行う都度優先順位が切り替わることを示している。たとえば、前回最優先のものが周辺Dであった場合、今回の判定では周辺Aが最優先である。優先順位判定回路11は、周辺A(1)→周辺B→周辺C→周辺Dの順にReq*の有無を判断していき、最初にReq*がアサートされているものにバス使用権を付与する。次回の判定においては、周辺Bが最優先であり、周辺B→周辺C→周辺D→周辺A(1)の順にReq*の有無を判断する。以下、同様である。これを、まとめたものが表1である。   FIG. 3 is an explanatory diagram showing rules when the priority determination circuit of the present invention determines the periphery with the highest priority. In this case, there are four surroundings, A, B, C, and D. The priority determination circuit of the present invention assigns a priority to each periphery based on the rotation priority method for a normal acquisition request signal. Accordingly, the priority at the time of determination differs depending on the priority at the time of the previous determination. In FIG. 3, a chain line arrow indicates that the priority is switched every time determination is performed based on a normal acquisition request signal. For example, if the previous highest priority is the periphery D, the periphery A is the highest priority in this determination. The priority determination circuit 11 determines the presence / absence of Req * in the order of peripheral A (1) → peripheral B → peripheral C → peripheral D, and grants the right to use the bus to those for which Req * is initially asserted. . In the next determination, the periphery B has the highest priority, and the presence / absence of Req * is determined in the order of the periphery B → the periphery C → the periphery D → the periphery A (1). The same applies hereinafter. This is summarized in Table 1.

Figure 0004832327
Figure 0004832327

EmReq*Aがアサートされた場合、優先順位判定回路11は、前回判定時の優先順位にかかわらず周辺Aを最優先で処理する。実線の矢印は、この場合の経路を示している。次回の判定においては、EmReq*Aがなかった場合と同様の優先順位で判定する。たとえば、前回最優先のものが周辺Dであった場合にEmReq*Aがアサートされると、優先順位判定回路11は、最初に周辺Aにバス使用権を付与する(周辺A(5))。次回の優先順位判定において、優先順位判定回路11は、周辺A(1)→周辺B→周辺C→周辺Dの順にReq*の有無を判断する。ここで、次回の優先順位判定でも、EmReq*Aがアサートされていると、優先順位判定回路11は再び周辺Aにバス使用権を付与するように構成されている。これが続くと他の周辺にバス使用権が付与されない。これは、周辺A側で、緊急取得要求を連続して発しないようにすることで回避できる。   When EmReq * A is asserted, the priority determining circuit 11 processes the peripheral A with the highest priority regardless of the priority at the previous determination. A solid arrow indicates a route in this case. In the next determination, the determination is performed in the same priority order as when there is no EmReq * A. For example, when EmReq * A is asserted when the previous highest priority is peripheral D, the priority determination circuit 11 first grants the bus use right to peripheral A (peripheral A (5)). In the next priority determination, the priority determination circuit 11 determines the presence / absence of Req * in the order of peripheral A (1) → peripheral B → peripheral C → peripheral D. Here, also in the next priority determination, if EmReq * A is asserted, the priority determination circuit 11 is configured to grant the right to use the bus to the peripheral A again. If this continues, the right to use the bus is not granted to other peripherals. This can be avoided by avoiding continuously issuing emergency acquisition requests on the peripheral A side.

EmReq*Aのネゲートからアサートまでの間隔が所定期間以上になるような回路を構成することは、当業者に容易である。この問題は、装置の制御に用いる事象をどのように選択するかという設計思想の問題といえる。合理的な設計により、EmReq*Aの連続発生が回避できる。   It is easy for a person skilled in the art to configure a circuit in which the interval from the EmReq * A negation to the assertion is equal to or longer than a predetermined period. This problem can be said to be a problem of the design concept of how to select an event to be used for controlling the apparatus. With rational design, continuous generation of EmReq * A can be avoided.

優先順位判定回路の構成
図1は、この発明の優先順位判定回路11の構成例を示すブロック図である。周辺が、A,B,C,Dの4つの場合を示している。図1で、回転優先判定回路31は、公知のラウンドロビン方式の優先順位判定回路である。回転優先判定回路31は、前回の優先順位(前優先状態)に基づいて、今回の判定の優先順を決定し、「現優先状態」として出力する。現優先状態は、A,B,C,D4つの周辺に対応する4ビットのデータであるが、図面の表記を簡略化するために「4」と信号線上の「/」とで4ビットの2値信号を示している。図1の他の信号も同様の表記方法を採用している。そのような明記のない信号は、1ビットの2値信号である。周辺の数が4以外の場合の構成は、図1から容易に類推できる。
Configuration of Priority Determination Circuit FIG. 1 is a block diagram showing a configuration example of a priority determination circuit 11 according to the present invention. The periphery shows four cases of A, B, C, and D. In FIG. 1, a rotation priority determination circuit 31 is a known round-robin priority determination circuit. The rotation priority determination circuit 31 determines the priority order of the current determination based on the previous priority order (previous priority state) and outputs it as the “current priority state”. The current priority state is 4-bit data corresponding to the four A, B, C, and D peripherals, but in order to simplify the notation of the drawing, “4” and “/” on the signal line are 4-bit 2 A value signal is shown. The other notation of FIG. 1 adopts the same notation method. Such unspecified signals are 1-bit binary signals. The configuration in the case where the number of surroundings is other than 4 can be easily inferred from FIG.

また、回転優先判定回路31は、いずれの周辺にバス使用権を付与するかを示す「バス使用権付与」信号を出力する。Ack生成回路39は、前記信号を受けて、信号をアサートするタイミングを整え、Ack*信号を出力する。また、Ack生成回路39には、Abt_end信号が入力される。Abt_end信号は、バス使用権を獲得した周辺がデータ転送を終了したことを知らせる信号である。回転優先判定回路31は、請求項にいう要求判定部に相当する。   Further, the rotation priority determination circuit 31 outputs a “bus usage right grant” signal indicating to which periphery the bus usage right is granted. The Ack generation circuit 39 receives the signal, adjusts the timing for asserting the signal, and outputs an Ack * signal. Further, an Abt_end signal is input to the Ack generation circuit 39. The Abt_end signal is a signal notifying that the peripheral having acquired the bus use right has finished the data transfer. The rotation priority determination circuit 31 corresponds to a request determination unit described in the claims.

Req受付許可回路41は、Abt_end信号がアサートされている間、回転優先判定回路31へReq*信号をゲートする回路である。即ち、Abt_end信号がネゲートされている間、回転優先判定回路31へのReq*信号は、すべてネゲートされる。Req*信号が全てネゲートされている間、回転優先判定回路31は、「現優先状態」を保持する。換言すれば、「現優先状態」が変化するのは、Abt_end信号がアサートされている間に限られる。Req受付回路41は、請求項にいう要求受領部に相当する。   The Req reception permission circuit 41 is a circuit that gates the Req * signal to the rotation priority determination circuit 31 while the Abt_end signal is asserted. In other words, while the Abt_end signal is negated, all Req * signals to the rotation priority determination circuit 31 are negated. While all the Req * signals are negated, the rotation priority determination circuit 31 holds the “current priority state”. In other words, the “current priority state” changes only while the Abt_end signal is asserted. The Req reception circuit 41 corresponds to a request reception unit described in the claims.

回転優先判定回路31から出力される「現優先状態」は、イネーブル入力付きDフリップフロップ33のD入力と接続されている。フリップフロップ33には、一定周期のクロックが供給され、クロックに同期して内部の状態が更新される。イネーブル入力Eへの信号がアサートされているとき、出力Qからは、前記クロックに同期して入力Dの状態と一致する信号(「状態ラッチ」信号)が出力される。イネーブル入力Eへの信号がネゲートされた状態では、Qの状態が更新されず、直前の「現優先状態」を保持する。イネーブル入力Eへは、EmReq*Aの状態に等しい信号em_onが反転された信号が入力される。従って、em_on信号(即ち、EmReq*A)がアサートされている間、Dフリップフロップ33からは、直前の「現優先状態」が保持された信号Qが出力される。em_on信号がネゲートされている間、Dフリップフロップ33からは、現優先状態に追従した信号Qが出力される。Dフリップフロップ33は、請求項にいう優先状態保持部に相当する。   The “current priority state” output from the rotation priority determination circuit 31 is connected to the D input of the D flip-flop 33 with enable input. The flip-flop 33 is supplied with a clock having a fixed period, and the internal state is updated in synchronization with the clock. When the signal to the enable input E is asserted, the output Q outputs a signal (“state latch” signal) that matches the state of the input D in synchronization with the clock. In a state where the signal to the enable input E is negated, the state of Q is not updated, and the previous “current priority state” is maintained. A signal obtained by inverting the signal em_on equal to the state of EmReq * A is input to the enable input E. Therefore, while the em_on signal (that is, EmReq * A) is asserted, the D flip-flop 33 outputs the signal Q holding the immediately preceding “current priority state”. While the em_on signal is negated, the D flip-flop 33 outputs a signal Q that follows the current priority state. The D flip-flop 33 corresponds to the priority state holding unit described in the claims.

Dフリップフロップ33の出力Qは、セレクタ35の一方の入力(0で選択される入力)に接続されている。他方の入力には、EmReq*Aがアサートされたときに、周辺Aに最高優先順位を与えるため、「前優先状態」を周辺Dにする信号pre_portが入力される。この信号は、レジスタ37に保持されている。セレクタ35は、EmReq*Aの状態に等しい信号em_on応じて切り替わる。em_onがアサートされると、セレクタ35は、pre_port信号を選択する。em_onがネゲートされているとき、セレクタ35は、「状態ラッチ」信号を選択する。セレクタ35は、請求項にいう切替部に相当する。また、「状態ラッチ」信号、pre_port信号は、請求項にいう第1識別信号、第2識別信号にそれぞれ相当する。   The output Q of the D flip-flop 33 is connected to one input (input selected by 0) of the selector 35. The other input receives a signal pre_port that sets the “pre-priority state” to the peripheral D in order to give the peripheral A the highest priority when EmReq * A is asserted. This signal is held in the register 37. The selector 35 switches in response to a signal em_on that is equal to the state of EmReq * A. When em_on is asserted, the selector 35 selects the pre_port signal. When em_on is negated, the selector 35 selects the “status latch” signal. The selector 35 corresponds to a switching unit referred to in the claims. Further, the “state latch” signal and the pre_port signal respectively correspond to the first identification signal and the second identification signal described in the claims.

優先順位判定回路の動作
図4は、図3の優先順位判定回路11の信号の状態を時系列的に示す説明図である。図4の横軸は時間の経過であり、縦方向には各信号を示す。各信号がアサートされた状態をハイレベルで示している。以下、図4に沿って、優先順位判定回路11の動作を説明する。
Operation of Priority Determination Circuit FIG. 4 is an explanatory diagram showing the signal states of the priority determination circuit 11 of FIG. 3 in time series. The horizontal axis in FIG. 4 represents the passage of time, and each signal is shown in the vertical direction. The state in which each signal is asserted is indicated by a high level. Hereinafter, the operation of the priority determination circuit 11 will be described with reference to FIG.

1.第1回目のバス調停(時刻t0〜t2)
まず、優先順位判定回路11は、時刻t0で図中第1回目のバス調停を行う。このとき、Req*A、Req*B、Req*Dがアサートされており、EmReq*Aはネゲートされている。「前優先状態」は0b1000、即ち、周辺Dが前回判定時に最優先であったとする。なお、ここでは4ビットの信号の状態を表記するために前記したような二進表記を用いる。ビット0〜3の順に、周辺A,B,C,Dに対応しているものとする。
1. First bus arbitration (time t0 to t2)
First, the priority determination circuit 11 performs the first bus arbitration in the figure at time t0. At this time, Req * A, Req * B, and Req * D are asserted, and EmReq * A is negated. The “previous priority state” is 0b1000, that is, the periphery D has the highest priority at the time of the previous determination. Here, the binary notation as described above is used to indicate the state of the 4-bit signal. Assume that bits 0 to 3 correspond to peripherals A, B, C, and D in this order.

このとき、回転優先順位判定回路31は、「前優先状態」の状態から、周辺Aに最高優先順位を与える(図3および表1参照)。即ち、「現優先状態」として、0b0001、が出力される。その優先順位に従って、Req*Aが最初に判定される。Req*Aがアサートされているので、時刻t1において回転優先順位判定回路31は、バス使用権付与0b0001を出力する。それに応じて、Ack生成回路39からAck*Aが出力される。さらに、em_onがネゲートされているので、「状態ラッチ」として「現優先状態」と同じ信号0b0001が出力され、さらに、それが「前優先状態」としてセレクタ35から出力される。Ack*Aの出力に応答して、周辺Aは時刻t2でReq*Aをネゲートする。また、獲得したバスを介してデータの転送を開始する。   At this time, the rotation priority determination circuit 31 gives the highest priority to the periphery A from the “previous priority state” (see FIG. 3 and Table 1). That is, 0b0001 is output as the “current priority state”. According to the priority order, Req * A is determined first. Since Req * A is asserted, the rotation priority determination circuit 31 outputs the bus use right grant 0b0001 at time t1. In response to this, Ack * A is output from the Ack generation circuit 39. Furthermore, since em_on is negated, the same signal 0b0001 as the “current priority state” is output as the “state latch”, and further, it is output from the selector 35 as the “previous priority state”. In response to the output of Ack * A, peripheral A negates Req * A at time t2. Also, data transfer is started via the acquired bus.

2.第2回目のバス調停(時刻t3〜t5)
時刻t3で周辺Aのデータの転送が終了すると、バス使用権を獲得していた周辺Aは、Abt_endをアサートする。Ack生成回路39は、Abt_end信号がアサートされると、それに応答してAck*A信号をネゲートする。また、Abt_end信号がアサートされると、Req受付許可回路41のゲートが開き、回転優先順位判定回路31に各Req*信号の状態が入力される。いずれかのReq*信号がアサートされていると、回転優先順位判定回路31は、バス調停の動作を行う。
2. Second bus arbitration (time t3 to t5)
When the transfer of data of peripheral A is completed at time t3, peripheral A that has acquired the bus use right asserts Abt_end. When the Abt_end signal is asserted, the Ack generation circuit 39 negates the Ack * A signal in response thereto. When the Abt_end signal is asserted, the gate of the Req reception permission circuit 41 is opened, and the state of each Req * signal is input to the rotation priority determination circuit 31. When any Req * signal is asserted, the rotation priority determination circuit 31 performs a bus arbitration operation.

図4では、Req*BとReq*Dがアサートされている。そこで、優先順位判定回路11は、第2回目のバス調停を行う。このとき、前優先状態が0b0001即ち周辺Aであるので、周辺Bに最高優先順位を与える。即ち、「現優先状態」として0b0010が出力される。その優先順位に従って、Req*Bが最初に判定される。Req*Bがアサートされているので、バス使用権付与として0b0010が出力され、Ack生成回路39からAck*Bが出力される。さらに、em_onがネゲートされているので、「現優先状態」と同じ信号0b0010が「状態ラッチ」として出力され、さらに、それが「前優先状態」としてセレクタ35から出力される。Ack*Bの出力に応答して、周辺Bは時刻t5でReq*BとAbt_end信号をネゲートする。また、獲得したバスを介してデータの転送を開始する。   In FIG. 4, Req * B and Req * D are asserted. Therefore, the priority determination circuit 11 performs the second bus arbitration. At this time, since the pre-priority state is 0b0001, that is, peripheral A, the highest priority is given to peripheral B. That is, 0b0010 is output as the “current priority state”. According to the priority order, Req * B is determined first. Since Req * B is asserted, 0b0010 is output as the right to use the bus, and Ack * B is output from the Ack generation circuit 39. Furthermore, since em_on is negated, the same signal 0b0010 as the “current priority state” is output as the “state latch”, and further, it is output from the selector 35 as the “previous priority state”. In response to the output of Ack * B, peripheral B negates Req * B and the Abt_end signal at time t5. Also, data transfer is started via the acquired bus.

3.第3回目のバス調停(時刻t7〜t9)
時刻t7で周辺Bのデータの転送が終了すると、バス使用権を獲得していた周辺Bは、Abt_endをアサートする。Ack生成回路39は、Abt_end信号がアサートされると、それに応答してAck*B信号をネゲートする。また、Abt_end信号がアサートされると、Req受付許可回路41のゲートが開き、回転優先順位判定回路31に各Req*信号の状態が入力される。いずれかのReq*信号がアサートされていると、回転優先順位判定回路31は、バス調停の動作を行う。このとき、EmReq*A、Req*AおよびReq*Dがアサートされている。Req*Aは、EmReq*Aと同時に、時刻t6でアサートされたものである。
3. Third bus arbitration (time t7 to t9)
When the transfer of data of peripheral B is completed at time t7, peripheral B that has acquired the right to use the bus asserts Abt_end. When the Abt_end signal is asserted, the Ack generation circuit 39 negates the Ack * B signal in response thereto. When the Abt_end signal is asserted, the gate of the Req reception permission circuit 41 is opened, and the state of each Req * signal is input to the rotation priority determination circuit 31. When any Req * signal is asserted, the rotation priority determination circuit 31 performs a bus arbitration operation. At this time, EmReq * A, Req * A, and Req * D are asserted. Req * A is asserted at time t6 simultaneously with EmReq * A.

ここで時間を遡り、時刻t6でEmReq*Aがアサートされたときの事象を説明する。特に、Dフリップフロップ33とセレクタ35の動作を説明する。EmReq*Aがアサートされると、em_on信号がアサートされる。すると、Dフリップフロップ33のイネーブル入力Eへの信号がネゲートされる。その結果、出力Q(「状態ラッチ」信号)は、入力Eがネゲートされた時点の「現優先状態」、00b0010を保持する。イネーブル入力Eが再びアサートされるまで出力Qが保持される。また、em_on信号がアサートされると、セレクタ35は、pre_port信号を選択するように切替わる。その結果、セレクタ35からの出力、即ち「前優先状態」は、pre_port信号に等しくなる。ここで、pre_port信号は、周辺Dに対応する値0b1000としてレジスタ37に保持されている。EmReq*Aがネゲートされるまで、Dフリップフロップ33とセレクタ35の状態は変わらない。   Here, going back in time, the event when EmReq * A is asserted at time t6 will be described. In particular, the operation of the D flip-flop 33 and the selector 35 will be described. When EmReq * A is asserted, the em_on signal is asserted. Then, the signal to the enable input E of the D flip-flop 33 is negated. As a result, the output Q (“state latch” signal) holds the “current priority state”, 00b0010, when the input E is negated. Output Q is held until enable input E is asserted again. Further, when the em_on signal is asserted, the selector 35 switches to select the pre_port signal. As a result, the output from the selector 35, that is, the “pre-priority state” is equal to the pre_port signal. Here, the pre_port signal is held in the register 37 as a value 0b1000 corresponding to the periphery D. Until EmReq * A is negated, the states of the D flip-flop 33 and the selector 35 do not change.

再び、時刻t7に戻る。時刻t7では前優先状態が0b1000即ち周辺Dであるので、優先順位判定回路11は、周辺Aに最高優先順位を与える。その優先順位に従って、Req*Aが最初に判定される。Req*Aがアサートされているので、時刻t8においてバス使用権付与として0b0001が出力される。また、Ack生成回路39からAck*Aが出力される。さらに、「現優先状態」として0b0001が出力される。em_onがアサートされているので、「状態ラッチ」として以前の状態0b0010が保持され、セレクタ35からは、「前優先状態」として、pre_portの値、0b1000が出力される。   Again, return to time t7. Since the previous priority state is 0b1000, that is, peripheral D at time t7, the priority determination circuit 11 gives the peripheral A the highest priority. According to the priority order, Req * A is determined first. Since Req * A is asserted, 0b0001 is output as the right to use the bus at time t8. In addition, Ack * A is output from the Ack generation circuit 39. Further, 0b0001 is output as the “current priority state”. Since em_on is asserted, the previous state 0b0010 is held as the “state latch”, and the value of pre_port, 0b1000, is output as the “pre-priority state” from the selector 35.

時刻t9で、周辺AはAck*Aの出力に応答して、EmReq*AとReq*AとAbt_end信号とをネゲートする。また、獲得したバスを介してデータの転送を開始する。EmReq*Aがネゲートされると、em_onがネゲートされ、Dフリップフロップ33の出力Q(「状態ラッチ」信号)は、そのときの「現優先状態」に等しい0b0010になるが、これは結局前の状態と同じである。また、セレクタ35は、「状態ラッチ」を選択するように切り替わる。従って、「前優先状態」は0b0010になる。   At time t9, the peripheral A negates EmReq * A, Req * A, and Abt_end signal in response to the output of Ack * A. Also, data transfer is started via the acquired bus. When EmReq * A is negated, em_on is negated, and the output Q (“status latch” signal) of the D flip-flop 33 becomes 0b0010, which is equal to the “current priority state” at that time. It is the same as the state. The selector 35 switches to select “status latch”. Therefore, the “pre-priority state” is 0b0010.

4.第4回目のバス調停(時刻t10〜t12)
時刻t10で周辺Aのデータの転送が終了すると、バス使用権を獲得していた周辺Aは、Abt_endをアサートする。Ack生成回路39は、Abt_end信号がアサートされると、それに応答してAck*A信号をネゲートする。また、Abt_end信号がアサートされると、Req受付許可回路41のゲートが開き、回転優先順位判定回路31に各Req*信号の状態が入力される。いずれかのReq*信号がアサートされていると、回転優先順位判定回路31は、バス調停の動作を行う。
4). 4th bus arbitration (time t10 to t12)
When the transfer of data of peripheral A is completed at time t10, peripheral A that has acquired the bus use right asserts Abt_end. When the Abt_end signal is asserted, the Ack generation circuit 39 negates the Ack * A signal in response thereto. When the Abt_end signal is asserted, the gate of the Req reception permission circuit 41 is opened, and the state of each Req * signal is input to the rotation priority determination circuit 31. When any Req * signal is asserted, the rotation priority determination circuit 31 performs a bus arbitration operation.

時刻t10では、Req*Dがアサートされている。そこで、優先順位判定回路11は、第4回目のバス調停を行う。このとき、前優先状態が0b0010即ち周辺Bであるので、周辺Cに最高優先順位を与え、周辺C→周辺D→周辺A→周辺Bの優先順位に従って、Req*信号の有無を調べる。その結果、Req*Dをアサートしている周辺Dにバス使用権与えられる。時刻t11で、優先順位判定回路11は、バス使用権付与として0b1000を出力する。それに応じて、Ack生成回路39からAck*Dが出力される。また、「現優先状態」として0b1000を出力する。さらに、em_onがネゲートされているので、「状態ラッチ」として「現優先状態」と同じ信号0b1000が出力される。さらに、それが「前優先状態」としてセレクタ35から出力される。周辺Dは、Ack*Dの出力に応答し、時刻t11でReq*DとAbt_end信号をネゲートする。また、獲得したバスを介してデータの転送を開始する。   At time t10, Req * D is asserted. Therefore, the priority determination circuit 11 performs the fourth bus arbitration. At this time, since the previous priority state is 0b0010, that is, peripheral B, the highest priority is given to peripheral C, and the presence / absence of the Req * signal is checked according to the priority of peripheral C → peripheral D → peripheral A → peripheral B. As a result, the right to use the bus is granted to the peripheral D asserting Req * D. At time t11, the priority determination circuit 11 outputs 0b1000 as granting the right to use the bus. In response to this, Ack * D is output from the Ack generation circuit 39. Also, 0b1000 is output as the “current priority state”. Further, since em_on is negated, the same signal 0b1000 as the “current priority state” is output as the “state latch”. Further, it is output from the selector 35 as “pre-priority state”. In response to the output of Ack * D, the peripheral D negates Req * D and the Abt_end signal at time t11. Also, data transfer is started via the acquired bus.

5.第5回目のバス調停(時刻t13〜t15)
時刻t13で周辺Dのデータの転送が終了すると、バス使用権を獲得していた周辺Dは、Abt_endをアサートする。Ack生成回路39は、Abt_end信号がアサートされると、それに応答してAck*D信号をネゲートする。また、Abt_end信号がアサートされると、Req受付許可回路41のゲートが開き、回転優先順位判定回路31に各Req*信号の状態が入力される。いずれかのReq*信号がアサートされていると、回転優先順位判定回路31は、バス調停の動作を行う。
5). 5th bus arbitration (time t13 to t15)
When the transfer of data of peripheral D is completed at time t13, peripheral D that has acquired the right to use the bus asserts Abt_end. When the Abt_end signal is asserted, the Ack generation circuit 39 negates the Ack * D signal in response thereto. When the Abt_end signal is asserted, the gate of the Req reception permission circuit 41 is opened, and the state of each Req * signal is input to the rotation priority determination circuit 31. When any Req * signal is asserted, the rotation priority determination circuit 31 performs a bus arbitration operation.

前述した手順と同様にして、優先順位判定回路11は、バス調停を行う。このとき、前優先状態が0b1000即ち周辺Dであるので、周辺Aに最高優先順位を与え、周辺A→周辺B→周辺C→周辺Dの優先順位に従って、Req*信号の有無を調べる。その結果、Req*Cをアサートしている周辺Cにバス使用権与えられる。時刻t14で、優先順位判定回路11は、バス使用権付与として0b1000を出力する。それに応じて、Ack生成回路39からAck*Cが出力される。また、「現優先状態」として0b1000を出力する。周辺Cは、Ack*Cの出力に応答し、時刻t15でReq*CとAbt_end信号をネゲートする。また、獲得したバスを介してデータの転送を開始する。   Similar to the procedure described above, the priority determination circuit 11 performs bus arbitration. At this time, since the previous priority state is 0b1000, that is, peripheral D, the highest priority is given to peripheral A, and the presence / absence of the Req * signal is checked according to the priority of peripheral A → peripheral B → peripheral C → peripheral D. As a result, the right to use the bus is granted to the peripheral C asserting Req * C. At time t14, the priority determination circuit 11 outputs 0b1000 as granting the right to use the bus. In response to this, Ack * C is output from the Ack generation circuit 39. Also, 0b1000 is output as the “current priority state”. In response to the output of Ack * C, the peripheral C negates Req * C and the Abt_end signal at time t15. Also, data transfer is started via the acquired bus.

優先順位判定回路の詳細
図5は、図1の優先順位判定回路11のより詳細な回路構成を示す説明図である。図5中で、図1の各ブロックに対応する部分には、対応する符号を付している。図1のブロックが複数の素子で構成されるものには、それらを破線で囲み符号を付している。図5の回路図を参照すれば、優先順位判定回路の動作がより明確に理解できるであろう。
図5の回路は、半導体装置上に集積される回路の一部であってもよい。
Details of Priority Determination Circuit FIG. 5 is an explanatory diagram showing a more detailed circuit configuration of the priority determination circuit 11 of FIG. In FIG. 5, parts corresponding to the respective blocks in FIG. The block of FIG. 1 is composed of a plurality of elements, and these are enclosed by broken lines and attached with symbols. The operation of the priority determination circuit can be understood more clearly with reference to the circuit diagram of FIG.
The circuit in FIG. 5 may be part of a circuit integrated on a semiconductor device.

なお、図5に図示していないが、Dフリップフロップ等のクロック入力端子には、システムクロックが供給されて動作する。また、図5で、信号線状の「/」とその付近の数(4または1)は、信号のビット数を示している。   Although not shown in FIG. 5, a clock input terminal such as a D flip-flop is operated by being supplied with a system clock. In FIG. 5, the signal line “/” and the number in the vicinity thereof (4 or 1) indicate the number of bits of the signal.

図5に示すように、回転優先順位判定回路31は、複数のセレクタから構成される。そのうち、4入力のセレクタ31aは、その出力が「現優先状態」である。「前優先状態」は、セレクタ31aの選択信号である。例えば、「前優先状態」が、0b1000(周辺Dに対応)の場合、セレクタ31aは、Req*A優先回路からの入力を選択する。Req*A優先回路は、Req*A→Req*B→Req*C→Req*Dの優先順位で、最初にアサートされている信号がのビットが1、他のビットが0の信号を出力する回路である。また、いずれのReq*信号もアサートされていなければ、そのときのAck*信号を出力する。   As shown in FIG. 5, the rotation priority determination circuit 31 is composed of a plurality of selectors. Among them, the output of the 4-input selector 31a is “current priority state”. The “pre-priority state” is a selection signal of the selector 31a. For example, when the “previous priority state” is 0b1000 (corresponding to peripheral D), the selector 31a selects an input from the Req * A priority circuit. The Req * A priority circuit outputs a signal in which the first asserted signal bit is 1 and the other bits are 0 in the priority order of Req * A → Req * B → Req * C → Req * D Circuit. If no Req * signal is asserted, the Ack * signal at that time is output.

回転優先順位判定回路31に入力されるReq*信号は、Req受付許可回路41でAbt_end信号によってゲートされている。いずれかのReq*信号がアサートされるのは、Abt_end信号がアサートされたときに限られる。従って、Abt_end信号がネゲートされている間、セレクタ31aへの4つの入力は、いずれもそのときのAck*信号である。即ち、Abt_endがネゲートされている間、「現優先状態」は、Ack*信号の状態を保持する。   The Req * signal input to the rotation priority determination circuit 31 is gated by the Req reception permission circuit 41 by the Abt_end signal. Any Req * signal is asserted only when the Abt_end signal is asserted. Therefore, while the Abt_end signal is negated, all four inputs to the selector 31a are the Ack * signals at that time. That is, while Abt_end is negated, the “current priority state” holds the state of the Ack * signal.

前述した実施の形態の他にも、この発明について種々の変形例があり得る。それらの変形例は、この発明の範囲に属さないと解されるべきものではない。この発明には、請求の範囲と均等の意味および前記範囲内でのすべての変形とが含まれるべきである。   In addition to the embodiments described above, there can be various modifications of the present invention. These modifications should not be construed as not belonging to the scope of the present invention. The present invention should include the meaning equivalent to the scope of the claims and all modifications within the scope.

この発明の優先順位判定回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the priority determination circuit of this invention. この発明のバス調停回路が用いられる装置のバスとその周辺の構成例を示すブロック図である。It is a block diagram which shows the example of a structure of the bus | bath of the apparatus by which the bus arbitration circuit of this invention is used, and its periphery. この発明の優先順位判定回路が最優先の周辺を判定する際のルールを示す説明図である。It is explanatory drawing which shows the rule at the time of the priority determination circuit of this invention determining the periphery of the highest priority. この発明の優先順位判定回路の信号の状態を時系列的に示す説明図である。It is explanatory drawing which shows the state of the signal of the priority determination circuit of this invention in time series. 図1の優先順位判定回路のより詳細な回路構成を示す説明図である。FIG. 2 is an explanatory diagram showing a more detailed circuit configuration of the priority determination circuit of FIG. 1.

符号の説明Explanation of symbols

1 装置
11 優先順位判定回路
13 バス・インターフェース部
15A、15B、15C、…15n バッファ
21 CPU
23 メモリ
24 緊急取得要求許可/禁止フラグ
25 システムバス・インターフェース部
27 バス変換部
29 周辺
31 回転優先順位判定回路
33 イネーブル入力付きDフリップフロップ
35 セレクタ
37 レジスタ
39 Ack生成回路
41 Req受付許可回路
DESCRIPTION OF SYMBOLS 1 Apparatus 11 Priority determination circuit 13 Bus interface part 15A, 15B, 15C, ... 15n Buffer 21 CPU
23 Memory 24 Emergency acquisition request permission / prohibition flag 25 System bus interface section 27 Bus conversion section 29 Peripheral 31 Rotation priority determination circuit 33 D flip-flop with enable input 35 Selector 37 Register 39 Ack generation circuit 41 Req reception permission circuit

Claims (5)

複数のバスマスタの少なくとも一つからバス使用権取得の要求を受けたとき、所定の優先順位で各バスマスタからの要求の有無を判定し、要求をしたバスマスタの一つにバス使用権を与えるバス調停用の回路であって、
各バスマスタからバス取得要求を受ける要求受領部と、
前記バス取得要求を単独で発するか、または前記バス取得要求に優先する緊急取得要求をバス取得要求と共に発する所定のバスマスタからその緊急取得要求を受ける緊急取得要求受領部と、
前回のバス調停でバス使用権を取得したバスマスタを示す第1識別情報を次回のバス調停時に供給すべく保持する優先状態保持部と、
第1識別情報を取得し、それに基づき回転優先順位方式で各バスマスタからの前記バス取得要求の有無を判定し、バス使用権を与えるバスマスタを決定し得る要求判定部と、
前記所定のバスマスタから発せられた緊急取得要求を受けたとき、その緊急取得要求に対応する第2識別情報を第1識別情報に代えてバス要求判定部へ供給する切替部とを備え、
各部が回路で構成され、
前記要求判定部は、供給された第1または第2識別情報が示すバスマスタを最低順位とする回転優先順位方式で各バスマスタからのバス取得要求の有無を判定し、
第2識別情報は、その緊急取得要求を発したバスマスタが最高優先順位になるように予め設定されてなることを特徴とするバス調停回路。
When receiving a request to acquire the right to use the bus from at least one of the bus masters, the bus arbitration determines whether or not there is a request from each bus master with a predetermined priority, and grants the right to use the bus to one of the requested bus masters. Circuit for
A request receiving unit that receives a bus acquisition request from each bus master; and
An emergency acquisition request receiving unit that issues the bus acquisition request alone or receives an emergency acquisition request from a predetermined bus master that issues an emergency acquisition request with priority to the bus acquisition request ,
A priority state holding unit that holds first identification information indicating the bus master that has acquired the right to use the bus in the previous bus arbitration to be supplied at the next bus arbitration;
A request determination unit that acquires first identification information, determines whether or not there is a bus acquisition request from each bus master based on the rotation priority method, and can determine a bus master to which a bus use right is given;
A switching unit that, when receiving an emergency acquisition request issued from the predetermined bus master , supplies second identification information corresponding to the emergency acquisition request to the bus request determination unit instead of the first identification information;
Each part consists of a circuit,
The request determination unit determines whether or not there is a bus acquisition request from each bus master in a rotation priority method in which the bus master indicated by the supplied first or second identification information is the lowest priority,
The bus identification circuit is characterized in that the second identification information is preset so that the bus master that issued the emergency acquisition request has the highest priority.
前記切替部は、緊急取得要求を発したバスマスタにバス使用権が与えられた後、第1識別情報をバス要求判定部へ供給し
優先状態保持部は、第2識別情報がバス要求判定部に供給されている間、第1識別情報を保持する請求項1記載のバス調停回路。
The switching unit supplies the first identification information to the bus request determining unit after the bus use right is given to the bus master that issued the emergency acquisition request, and the priority state holding unit transfers the second identification information to the bus request determining unit. The bus arbitration circuit according to claim 1, wherein the first identification information is held while being supplied.
前記バスマスタは、メモリから読み出されたデータを転送し、および/または、メモリへ格納するデータを転送するためのものである請求項1記載のバス調停回路。   2. The bus arbitration circuit according to claim 1, wherein the bus master is for transferring data read from a memory and / or transferring data to be stored in the memory. 転送されるデータは、ページ単位の画像のデータであり、緊急取得要求は、各ページのデータ転送に対応して発せられる請求項3記載のバス調停回路。   4. The bus arbitration circuit according to claim 3, wherein the transferred data is image data in units of pages, and the emergency acquisition request is issued corresponding to the data transfer of each page. 請求項1記載のバス調停回路を含んでなる半導体装置。   A semiconductor device comprising the bus arbitration circuit according to claim 1.
JP2007026939A 2007-02-06 2007-02-06 Bus arbitration circuit Active JP4832327B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007026939A JP4832327B2 (en) 2007-02-06 2007-02-06 Bus arbitration circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007026939A JP4832327B2 (en) 2007-02-06 2007-02-06 Bus arbitration circuit

Publications (2)

Publication Number Publication Date
JP2008191987A JP2008191987A (en) 2008-08-21
JP4832327B2 true JP4832327B2 (en) 2011-12-07

Family

ID=39752023

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007026939A Active JP4832327B2 (en) 2007-02-06 2007-02-06 Bus arbitration circuit

Country Status (1)

Country Link
JP (1) JP4832327B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07219887A (en) * 1994-01-28 1995-08-18 Nec Eng Ltd Dma transfer controller
JP3809284B2 (en) * 1998-11-06 2006-08-16 キヤノン株式会社 Image generating apparatus, control method therefor, and printing apparatus
KR100475735B1 (en) * 2002-07-12 2005-03-10 삼성전자주식회사 Method and device for arbitrating common bus by using urgent channel
JP4572064B2 (en) * 2003-08-01 2010-10-27 Necエンジニアリング株式会社 Occupation Rights Arbiter
JP2005071049A (en) * 2003-08-22 2005-03-17 Murata Mach Ltd Data transfer control device

Also Published As

Publication number Publication date
JP2008191987A (en) 2008-08-21

Similar Documents

Publication Publication Date Title
JP4480427B2 (en) Resource management device
US7349424B2 (en) On-chip inter-subsystem communication including concurrent data traffic routing
JP4485574B2 (en) Access control device, access control integrated circuit, and access control method
JP2006221611A (en) Resource management device
US6304923B1 (en) Method for prioritizing data transfer request by comparing a latency identifier value received from an I/O device with a predetermined range of values
JP2007026021A (en) Bus control system and bus control method
KR100480605B1 (en) Method of controlling transmitting buffer and receiving buffer of network controller, and the network controller
TW200400438A (en) Bus arbiter for integrated circuit systems
JP4832327B2 (en) Bus arbitration circuit
JP6036806B2 (en) Bus access arbitration circuit and bus access arbitration method
JPH09153009A (en) Arbitration method for hierarchical constitution bus
JP2000132505A (en) Bus access method and device therefor, and device and system using the bus access method and device
KR100389030B1 (en) High speed direct memory access controller with multiple channels
KR100451722B1 (en) apparatus for controlling direct memory access
JP2006277363A (en) Information transfer system, and image forming device
JP5332692B2 (en) Data transfer control device, data transfer control method, data transfer control program, and recording medium
JPS63175964A (en) Shared memory
JP4862593B2 (en) Data transfer apparatus and image forming apparatus
JP2005316621A (en) Bus arbitration device and image processor
KR100263791B1 (en) Method for bus arbitration using priority
JP2006053613A (en) Data transfer controller and data transfer control method
JPH06243093A (en) Bus control system
JP2005025670A (en) Bus control system, bus master, and bus arbitor
JP2002049581A (en) Bus arbitration method and bus controller
JPH10214252A (en) Bus arbitrating system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110512

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110524

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110714

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: 20110906

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110920

R150 Certificate of patent or registration of utility model

Ref document number: 4832327

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140930

Year of fee payment: 3