JP4282297B2 - Device having bus arbitration function and numerical control device - Google Patents
Device having bus arbitration function and numerical control device Download PDFInfo
- Publication number
- JP4282297B2 JP4282297B2 JP2002295691A JP2002295691A JP4282297B2 JP 4282297 B2 JP4282297 B2 JP 4282297B2 JP 2002295691 A JP2002295691 A JP 2002295691A JP 2002295691 A JP2002295691 A JP 2002295691A JP 4282297 B2 JP4282297 B2 JP 4282297B2
- Authority
- JP
- Japan
- Prior art keywords
- bus
- priority
- time
- bus use
- bus arbitration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、バスマスタとなり得る複数のデバイスがバスに接続されるマルチマスタバスにおいて、各デバイスのバス使用の調停を行うバス調停機能を備える装置、特に該バス調停機能を備える数値制御装置に関する。
【0002】
【従来の技術】
バスに複数のデバイスが接続され、複数のデバイスからのバス使用要求が出された場合、どちらのデバイスを優先して使用させるか決定しなければならない。通常、このバス使用の優先権を決定する方法は、予め決められた優先順位に基づいて決定するようになされたものが多い。この場合、優先順位が高いデバイスからバス使用の要求が次々と出されるような場合、これら優先順位の高いデバイスにバス使用権が次々と与えられ、優先順位が低いデバイスにバス使用権が与えられる場合が少なくなるという問題がある。
【0003】
そのため、バスの使用権を得たデバイスはその優先順位を一時的に下げ、1つのデバイスが連続してバスの使用権を取得することを回避するような方法も公知である。しかし、通信系のデバイスのような、ある特定のデバイスにおいては、必ず一定時間内にバスが取得できるような制御が必要な場合がある。このような場合、上述した従来の調停方法では、バス使用権取得の優先度を変更できるが、一定時間内のバス使用権の取得が保証できないという問題がある。
【0004】
又、デバイスからのバス使用要求信号に基づいて計時を開始し、設定された時間経過した後は、該デバイスのバス使用の優先度を上げて、予め設定されているバス使用の優先度の低いデバイスに対してもバス使用ができるようにした調停方法も公知である(例えば、特許文献1参照)。
又、各デバイス(バスマスタ)毎にタイマを設け、該タイマにそれぞれ設定されている許容時間を設定し、デバイスからバス使用要求が出されると、ダウンカウントして、バスが使用可能になったとき、前記タイマの計時値が小さいデバイスにバス使用許可を与え、かつダウンカウンタを停止し、タイマを初期値に戻すようにしたバス調整方法も公知である(例えば、特許文献2参照)。
【0005】
【特許文献1】
特開平2−27461号公報
【特許文献2】
特開平3−263158号公報
【0006】
【発明が解決しようとする課題】
タイマでバス使用要求信号発生時から計時を開始し、この計時時間に基づいて、優先度を決定したとしても、デバイスがバス使用要求信号を発生してからタイマでの計時を開始するので、当該デバイスがバス使用を要求してから、バス使用の優先順位が上がるまで時間がかかり、タイムロスが生じる。又、一定時間内にバスを使用させるようにすることも難しい。
【0007】
そこで、本発明の目的は、デバイスのバス使用の間隔を一定値以下に抑制できるようにすることにある。
【0008】
【課題を解決するための手段】
本発明は、1つのバスに複数のデバイスが接続されていると共に、前記各デバイスからのバス使用要求信号を受け付けて各デバイスのバス使用権取得の優先順位に基づいてバス使用許可信号を各デバイスに付与するバス調停手段が接続されることによりバス調停機能を備える装置において、前記バス調停手段に前記複数のデバイスの内の1以上の特定デバイスに対して、前記バス使用許可信号を付与してから所定時間経過すると該特定デバイスのバス使用権取得の優先順位を上げる手段を設けてバス調停を行うようにした。また、前記特定デバイスに対して前記所定時間を設定記憶する手段は、前記バス調停手段に設けるか、又は、前記特定デバイスに設けるようにした。
【0009】
特に、前記バス調停手段は、前記特定デバイスにバス使用許可信号を付与してから前記所定時間経過し、かつ、該特定デバイスのバス使用要求信号が出力されている場合、該特定デバイスに優先してバスを取得させるようにした。又、バスを介して割り込み信号を伝達するよう構成され、前記所定時間を、割り込み機能を達成する時間に設定することにより、割り込み機能も実施できるようにした。さらに、数値制御装置にこのバス調停機能を備えるようにした。
【0010】
【発明の実施の形態】
図1は、本発明の一実施形態の要部ブロック図である。バス3には、バスを制御する機能を備えたマスタデバイス2-0,2-1,2-2,…2-nが接続され、さらに、該バス3には、調停ユニット1が接続されている。
又、調停ユニット1と各マスタデバイス2-0,2-1,…2-nは、それぞれ通信線で接続され、各マスタデバイス2-0,2-1,…2-nからバス使用要求信号S10,S11,…S1nが調停ユニット1に出力され、調停ユニット1からは、各マルチデバイス2-0,2-1,…2-nにバス使用許可信号S20,S21,…S2nがそれぞれ出力されるようになっている。
【0011】
図2は、上述した調停ユニット1の詳細ブロック図である。調停ユニットは、各マスタデバイス2-0,2-1,…2-n毎のバス使用の優先を判定する優先判定回路4-0,4-1,…4-nと優先順位決定回路5で構成されている。
各優先判定回路4-0,4-1,…4-nは、マスタデバイス2-0に対応する優先判定回路4-0に詳述されているように、時間設定レジスタ41、タイマ42、比較回路43、アンドゲート44で構成されている。各優先判定回路4-0,4-1,…4-nは同一構成であるので、他の優先判定回路4-1,…4-nはマスタデバイス2-0に対応する優先判定回路4-0と同一構成になっている。
【0012】
比較回路43は、時間設定レジスタ41に設定されている時間とタイマ42で計時した時間を比較し、タイマ42での計時時間が時間設定レジスタ41に設定されている時間より大きくなると出力信号を出す。
各マスタデバイス2-0,2-1,…2-nから調停ユニット1に入力される各バス使用要求信号S10,S11,S1nは、優先順位決定回路5に入力されると共に、各対応する優先判定回路4-0,4-1,…4-nのアンドゲート44に入力されている。又、優先順位決定回路5から出力されるバス使用許可信号S20,S21,…S2nは、対応する優先判定回路4-0,4-1,…4-nのタイマ42にもそれぞれ入力されている。
【0013】
各優先判定回路4-0,4-1,…4-nの時間設定レジスタ41は図示しない設定手段によって任意の時間が設定可能である。この装置全体のシステム構成やマスタデバイスの種類、動作モードに応じて、ある最大サイクル間隔以下で当該マスタデバイスの処理を実行させたいマスタデバイスに対しては、この優先制御機能を実行させるマスタデバイス(例えば、マスタデバイス2-0)に対応する優先判定回路(マスタデバイス4-0)の時間設定レジスタ41に当該マスタデバイス(2-0)に対して所望の最大サイクル間隔の時間より僅か短い時間を設定しておく。すなわち、バス使用許可信号が発生して次のバス使用要求信号によるバス使用が可能とする最大の時間より僅か少ない時間を設定しておく。又、この時間設定レジスタ41に時間を設定しなくてもよい。この場合、後述するように、優先順位決定回路5は優先判定回路4-0,4-1,…4-nからの信号入力されないから、従来の調停ユニットと同様に予め決められた優先順位でバス使用許可信号を出力する。
【0014】
装置の動作を開始して、調停ユニット1は、各マスタデバイス2-0,2-1,…2-nから出力されたバス使用要求信号S10,S11,S1nに対して予め決められた優先順位でバス使用許可信号S20,S21,…S2nを出力する。一方、あるマスタデバイス(例えば、マスタデバイス2-0)へのバス使用許可信号(マスタデバイス2-0へのバス許可信号S20)が、該マスタデバイス(2-0)に対応する優先判定回路(4-0)のタイマ42にも入力され、該タイマ42をリセットしてスタートさせる。比較回路43は、タイマ42の計時時間と時間設定レジスタ41に設定されている時間を比較し、タイマ42の計時時間が大きくなると信号を出力する。なお、時間設定レジスタ41に時間が設定されてなければ、比較回路43からは信号は出力されない。
【0015】
比較回路43の出力と対応するマスタデバイス(例えば、前述の例でマスタデバイス2-0)からのバス使用要求信号(S10)がアンドゲート44で論理和が取られ、バス使用要求信号(S10)があり比較回路43から出力信号がある場合には、アンドゲート44から出力信号が出され優先順位決定回路5に入力される。こうして優先判定回路(前述の例で優先判定回路4-0)のアンドゲート44から信号が出力された場合には、バスの使用が解除され次のバス使用の調停タイミングとなったとき、優先順位決定回路5は、優先判定回路(4-0)からの出力信号が入力されているマスタデバイス(2-0)を優先してバス使用権を与え、バス使用許可信号(S20)を出力する。
【0016】
すなわち、優先順位決定回路5は、各マスタデバイス2-0,2-1,…2-nに対応する優先判定回路4-0,4-1,…4-nから出力信号がいずれも出力されていないときは、予め決められた優先順位に基づいて、バス使用許可信号S20,S21,…S2nを出力し、いずれかのマスタデバイスに対応する優先判定回路から出力信号が出力されている場合(当該優先判定回路のタイマ42での計時時間が時間設定レジスタに設定されている時間を越えている場合)、そのマスタデバイスに対して、他より優先してバス使用許可信号を出力する。又、複数の優先判定回路から出力信号が出ている場合には、予め設定されている優先順位に基づいて調停され、優先順位が高い方のマスタデバイスからバス使用許可信号が出力される。
【0017】
その結果、時間設定レジスタ41に時間を設定して優先制御を実行させるマスタデバイスについては、最大でもこの時間設定レジスタ41に設定した時間より僅か遅れてバス使用許可信号が与えられバス使用が可能となる。最大でもこの設定された時間とほぼ等しい時間の間隔でバス使用権が与えられこのサイクルで動作処理を実行することができるようになる。
【0018】
特に、割り込み信号線を設けずに、バスを使用して割り込み信号を伝達するよう構成された装置においては、装置内の単位時間を通知するタイマ割り込みのように、一定時間間隔毎に優先度の高い処理サイクルを起こすマスタデバイスに対しては、割り込み機能を達成するこの一定時間間隔に対応する時間を時間設定レジスタに設定しておけば、上述したように、このマスタデバイスは優先度が上げられ、時間設定レジスタに設定した一定時間間隔とほぼ一致して、このマスタデバイスにバス使用許可信号が与えられ、該マスタデバイスの動作処理を可能にして、割り込み処理を実行できる。
【0019】
なお、上述した実施形態では、時間設定レジスタ41を調停ユニット1の優先判定回路4-0,4-1,4-nに設けたが、各マスタデバイス2-0,2-1,2-n内に設け、優先判定回路4-0,4-1,4-n内に設けないようにしてもよい。さらには、優先判定回路4-0,4-1,4-n自体をそれぞれ各マスタデバイス2-0,2-1,2-n内に設け、調停ユニット1は優先順位決定回路5のみとしてもよい。
【0020】
【発明の効果】
本発明は、あるデバイスにバス使用許可を与えてから、計時を開始し、この計時時間が設定時間を越えれば、該デバイスに優先してバス使用可能を得ることができるようにしたから、バスが混雑状況にあったとしても、一定時間内にバス使用権を取得可能となる。各デバイス毎に時間設定が可能であるから、デバイスに対して設定する設定値の大小によって、デバイスのバス使用権の差別化を図れる。
【図面の簡単な説明】
【図1】本発明の一実施形態における要部ブロック図である。
【図2】同実施形態の調停ユニットの詳細ブロック図である。
【符号の説明】
1 調停ユニット
2-0,2-1,2-n マスタデバイス
3 バス
4-0,4-1,4-n 優先判定回路
5 優先順位決定回路
S10,S11,S1n バス使用要求信号
S20,S21,S2n バス使用許可信号[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a device having a bus arbitration function for arbitrating bus use of each device in a multi-master bus in which a plurality of devices that can be bus masters are connected to a bus, and more particularly to a numerical control device having the bus arbitration function.
[0002]
[Prior art]
When a plurality of devices are connected to the bus and a bus use request is issued from a plurality of devices, it is necessary to determine which device has priority. Usually, many of the methods for determining the priority for using the bus are determined based on a predetermined priority order. In this case, when bus use requests are issued one after another from devices with high priority, bus use rights are given to these devices with high priority one after another, and bus use rights are given to devices with low priority. There is a problem of fewer cases.
[0003]
Therefore, a method is known in which a device that has obtained the right to use the bus temporarily lowers its priority and avoids that one device continuously obtains the right to use the bus. However, in a specific device such as a communication device, it may be necessary to perform control so that a bus can be acquired within a certain time. In such a case, the prior art arbitration method described above can change the priority of acquiring the bus use right, but there is a problem that the acquisition of the bus use right within a certain time cannot be guaranteed.
[0004]
Also, timing is started based on the bus use request signal from the device, and after the set time has elapsed, the bus use priority of the device is increased and the preset bus use priority is low. An arbitration method is also known in which a bus can be used for a device (see, for example, Patent Document 1).
When a timer is provided for each device (bus master), the allowable time set in each timer is set, and when a bus use request is issued from the device, it counts down and the bus becomes usable A bus adjustment method is also known in which a bus use permission is given to a device having a small timer value, the down counter is stopped, and the timer is returned to the initial value (see, for example, Patent Document 2).
[0005]
[Patent Document 1]
JP-A-2-27461 [Patent Document 2]
Japanese Patent Laid-Open No. 3-263158 [0006]
[Problems to be solved by the invention]
Even if the timer starts timing from the time when the bus use request signal is generated and the priority is determined based on this time, the device starts counting the time after the bus use request signal is generated. It takes time until the priority of bus use increases after a device requests bus use, resulting in a time loss. It is also difficult to use the bus within a certain time.
[0007]
SUMMARY OF THE INVENTION An object of the present invention is to make it possible to suppress the interval of device bus use to a certain value or less.
[0008]
[Means for Solving the Problems]
In the present invention, a plurality of devices are connected to one bus, and a bus use permission signal is received from each device and a bus use permission signal is sent to each device based on the priority of acquiring the bus use right of each device. In the apparatus having the bus arbitration function by connecting the bus arbitration means to be provided to the bus arbitration means, the bus arbitration means is provided with the bus use permission signal to one or more specific devices of the plurality of devices. After a predetermined time has elapsed, a means for raising the priority of acquiring the bus usage right of the specific device is provided to perform bus arbitration. Further, the means for setting and storing the predetermined time for the specific device is provided in the bus arbitration means or in the specific device.
[0009]
In particular, the bus arbitration means gives priority to the specific device when the predetermined time has elapsed since the bus use permission signal was given to the specific device and the bus use request signal of the specific device has been output. I got to get a bus. Further, an interrupt signal is transmitted via the bus, and the interrupt function can be implemented by setting the predetermined time to a time for achieving the interrupt function. Further, the numerical control device is provided with this bus arbitration function.
[0010]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a principal block diagram of an embodiment of the present invention. Master devices 2-0, 2-1, 2-2,..., 2-n having a function of controlling the bus are connected to the
The
[0011]
FIG. 2 is a detailed block diagram of the
Each of the priority determination circuits 4-0, 4-1,..., 4-n has a
[0012]
The comparison circuit 43 compares the time set in the
The bus use request signals S10, S11, S1n input from the master devices 2-0, 2-1,..., 2-n to the
[0013]
The time setting register 41 of each priority determination circuit 4-0, 4-1,..., 4-n can set an arbitrary time by setting means (not shown). Depending on the system configuration of the entire apparatus, the type of master device, and the operation mode, a master device that executes this priority control function for a master device that wants to execute processing of the master device within a certain maximum cycle interval ( For example, the
[0014]
Starting the operation of the apparatus, the
[0015]
The bus use request signal (S10) from the master device (for example, master device 2-0 in the above example) corresponding to the output of the comparison circuit 43 is ORed by the AND gate 44, and the bus use request signal (S10). When there is an output signal from the comparison circuit 43, an output signal is output from the AND gate 44 and input to the priority determination circuit 5. In this way, when a signal is output from the AND gate 44 of the priority determination circuit (priority determination circuit 4-0 in the above example), when the bus use is released and the next bus use arbitration timing is reached, the priority order is determined. The decision circuit 5 gives priority to the bus use right to the master device (2-0) to which the output signal from the priority determination circuit (4-0) is input, and outputs a bus use permission signal (S20).
[0016]
That is, the priority determination circuit 5 outputs all output signals from the priority determination circuits 4-0, 4-1,..., 4-n corresponding to the master devices 2-0, 2-1,. If not, the bus use permission signals S20, S21,... S2n are output based on a predetermined priority order, and an output signal is output from the priority determination circuit corresponding to one of the master devices ( When the time measured by the timer 42 of the priority determination circuit exceeds the time set in the time setting register), a bus use permission signal is output with priority over the master device. When output signals are output from a plurality of priority determination circuits, arbitration is performed based on a preset priority order, and a bus use permission signal is output from the master device with the higher priority order.
[0017]
As a result, for the master device that sets the time in the
[0018]
In particular, in a device configured to transmit an interrupt signal using a bus without providing an interrupt signal line, a priority level is set at regular intervals such as a timer interrupt for notifying a unit time in the device. For a master device that causes a high processing cycle, if the time corresponding to this fixed time interval for achieving the interrupt function is set in the time setting register, as described above, this master device is given higher priority. The bus use permission signal is given to the master device almost coincident with the fixed time interval set in the time setting register, enabling the master device to perform operation processing and interrupt processing.
[0019]
In the above-described embodiment, the
[0020]
【The invention's effect】
The present invention starts the timing after giving the bus use permission to a certain device, and if the measured time exceeds the set time, the bus can be used in preference to the device. Even in a crowded situation, the right to use the bus can be acquired within a certain time. Since the time can be set for each device, the right to use the bus of the device can be differentiated depending on the setting value set for the device.
[Brief description of the drawings]
FIG. 1 is a block diagram of a main part in an embodiment of the present invention.
FIG. 2 is a detailed block diagram of an arbitration unit according to the embodiment.
[Explanation of symbols]
1 Arbitration unit 2-0, 2-1, 2-
Claims (7)
前記バス調停手段は、前記複数のデバイスの内の特定デバイスに対して、前記バス使用許可信号を付与してから所定時間経過すると該特定デバイスのバス使用権取得の優先順位を上げる手段を有することを特徴とするバス調停機能を備える装置。A bus in which a plurality of devices are connected to one bus, a bus use request signal from each device is received, and a bus use permission signal is given to each device based on the priority of acquiring the bus use right of each device. In an apparatus having a bus arbitration function by connecting arbitration means,
The bus arbitration means includes means for raising the priority of acquiring the bus use right of the specific device when a predetermined time has elapsed after the bus use permission signal is given to the specific device of the plurality of devices. A device having a bus arbitration function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002295691A JP4282297B2 (en) | 2002-10-09 | 2002-10-09 | Device having bus arbitration function and numerical control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002295691A JP4282297B2 (en) | 2002-10-09 | 2002-10-09 | Device having bus arbitration function and numerical control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004133572A JP2004133572A (en) | 2004-04-30 |
JP4282297B2 true JP4282297B2 (en) | 2009-06-17 |
Family
ID=32285868
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002295691A Expired - Lifetime JP4282297B2 (en) | 2002-10-09 | 2002-10-09 | Device having bus arbitration function and numerical control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4282297B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010282352A (en) * | 2009-06-03 | 2010-12-16 | Renesas Electronics Corp | Dma transfer control device |
-
2002
- 2002-10-09 JP JP2002295691A patent/JP4282297B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004133572A (en) | 2004-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0867814B1 (en) | System and method for controlling a bus | |
EP0106879B1 (en) | Method and apparatus for limiting bus utilization | |
CN114911727A (en) | Bus arbitration method and device, computer readable storage medium and main control chip | |
US20070067527A1 (en) | Data transfer bus system connecting a plurality of bus masters | |
JP2004005677A (en) | Bus arbiter for integrated circuit device | |
JP4915172B2 (en) | Arbitration circuit | |
JP4282297B2 (en) | Device having bus arbitration function and numerical control device | |
US5450591A (en) | Channel selection arbitration | |
JP2007018280A (en) | Control method and control circuit for bus system | |
JP5677007B2 (en) | Bus arbitration device and bus arbitration method | |
US20070073948A1 (en) | Bus control system | |
JP2006259842A (en) | Data transfer processing device | |
JP2003006139A (en) | Dma transfer apparatus | |
JP2001117860A (en) | Memory access priority switching controller | |
WO2020230413A1 (en) | Information processing device | |
JP2005004563A (en) | Dma transfer controller | |
JPH10334042A (en) | Bus arbitration control device method therefor, and recording medium recorded with bus arbitration control program | |
JP2003006146A (en) | Bus arbitration circuit | |
JPH0660017A (en) | Collision circuit | |
JP2002091903A (en) | Bus system | |
JP3677535B2 (en) | Data transfer control circuit | |
JP2000259548A (en) | Dma bus transfer system | |
KR100694086B1 (en) | Priority Arbitrating Method in a Multi-Master Bus System and a Arbitrator having priority arbitration function | |
JP2004102452A (en) | Memory unit | |
JPH0587647U (en) | Bus arbitration circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050523 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050531 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20060307 |
|
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: 20090317 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4282297 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: 20120327 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130327 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130327 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140327 Year of fee payment: 5 |