Abstract:
Arbitration between collisions is performed by means of a special arbitration path ARB conveying access requests expressed in the form of arbitration frames ARB %. An arbitration frame includes a priority field defining different classes of traffic, and a numerical field identifying each station, together with bits that relax priority constraints. The application of arbitration frames is subordinate to recognizing that a delimiter channel of the data path DATA is in an active state. The invention is applicable to industrial networks or buses.

Description:
The present invention relates in general to transmitting data on a serial line between a plurality of originating and/or receiving stations, particularly, but not exclusively, for industrial local networks or buses, or the like. 
     BACKGROUND OF THE INVENTION 
     Networks or buses are already known in which the physical connection between stations is provided by a serial line for serial transmission with random access and collision detection, and they are referred to as &#34;CSMA/CD&#34; (Carrier-Sense Multiple-Access/Collision-Detection) networks or buses. Such networks control allocation of the serial line by arbitration means designed to resolve conflicts between a plurality of stations requesting the line substantially at the same instant. Thus, the &#34;Ethernet&#34; CSMA/CD network uses a common line both for line arbitration and for conveying data. 
     That system and similar systems nevertheless suffer from the major drawback of losing time in the event of a collision between two stations that have both attempted to send data at the same moment. It is then necessary to discard frames that have been disturbed by the collision and to allocate the network to one of the stations before data interchange can be restarted, and then all of the discarded frames must be retransmitted. The overall bit rate at which digital data is effectively interchanged thus drops sharply when conflicts of access are numerous. 
     An object of the present invention is to control allocation of the serial line in time that is masked from the interchanges of data that are performed on said line, thereby avoiding the need, in the event of a collision, to discard interfering frames or to repeat an interchange that has been disturbed. 
     The invention also seeks to coordinate in simple manner the transfer of data and the arbitration process, and to guarantee that the serial line is allocated quickly to all stations requesting it. 
     SUMMARY OF THE INVENTION 
     To this end, the present invention provides an arbitration method for access to a serial line for interchanging data and having a plurality of stations connected thereto. The method is implemented on a special arbitration path in the form of a serial arbitration line with collision which interconnects the various stations and which defines a dominant state and a recessive state. Each station desiring to obtain access to the data interchange line (including, where applicable, a station having access and desiring to retain it in the presence of an access request from another station) applies an arbitration frame to the arbitration path in synchronous mode, said frame including items that define access priority, e.g. a priority field which defines a priority level and a numerical field which identifies each station, each of said fields being constituted by one or more bits. After a predetermined time delay following the application of each bit, the station reads the value of the bit present on the arbitration path and then ceases to apply its arbitration frame as soon as the value of the bit read in the priority field (and in the event of equal priority levels, in the numerical field) differs from the value of the corresponding bit it is applying such that at the end of the arbitration frame, only one station has not ceased to apply its arbitration frame and is thus authorized to access the data interchange line. 
     Preferably, the applications of arbitration frames by requesting stations in collision are mutually synchronized by the beginning of the first frame to be applied by one of the stations; in addition, the beginning of an arbitration frame is synchronized relative to the beginning of data interchange activity on the line by a channel delimiting the data path. 
     Rotating priority may advantageously be established between different categories of traffic on the data line by means of a signal that may be generated in each station to change the priority field in the arbitration frame. 
     In order to avoid access to the bus always being given to the same station in the event of repeated conflicts between stations having the same priority level, the arbitration field may further include, between the priority field and the numerical field, a repeat field which enables a station temporarily to increase its priority level. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Other aspects, objects, and advantages of the present invention appear more clearly on reading the following detailed description of a preferred implementation of the invention, given by way of non-limiting example and made with reference to the accompanying drawings, in which: 
     FIG. 1 is a diagram of a bus of the present invention having a plurality of stations connected thereto; 
     FIGS. 2a and 2b show a first aspect of the arbitration mechanism of the invention; 
     FIG. 3 shows a second aspect of the arbitration mechanism of the invention; and 
     FIG. 4 shows an example of the contents of an arbitration frame as used in the invention. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 shows a plurality of stations ST 1 , ST 2 , . . . , ST N  for interchanging digital data between one another, for example variables and/or messages, by means of a bus. The stations may be connected to the bus via integrated gate arrays defining the required interface logic. 
     Physically, the bus comprises an arbitration line LA and a data line LD, thus constituting two distinct but coordinated serial paths referred to as the arbitration path referenced ARB and the data path referenced DATA. Three physical channels are implemented on these two functional paths, namely an arbitration channel on the path ARB, and both a delimiter channel and a data channel on the path DATA. 
     The delimiter channel has two physical states: &#34;high&#34; and &#34;low&#34;, for conveying two logic states, namely and respectively a rest state and an active state. It provides the envelope for elementary data sequences (where each sequence is constituted by a succession of frames) for the purpose of synchronizing the paths ARB and DATA and for providing the bus with good immunity. In addition, in the active state, it transmits a clock generated by the master station on the bus to enable the stations that receive the sequences to sample the data channel. 
     The path ARB conveys frames, each of which represents a request by a station for bus allocation. The bits of arbitration frames are transmitted in non-coded form, with a zero or low voltage representing a low or &#34;0&#34; logic signal while a voltage of +5 volts, or more generally a high voltage represents a high or &#34;1&#34; logic signal. 
     The bit rate on the path DATA may typically be 12 Mbits/second. A high bit rate is not necessary on the path ARB. In addition, the mechanism described below for controlling collisions requires each bit to be applied during a minimum duration that is tied to the propagation time of signals over the path. 
     Arbitration of access to the bus is performed in parallel with the flow of data, without requiring a special bus controller circuit, but with collisions being controlled within each station. That is why the arbitration is referred to below as being &#34;dispersed&#34;. 
     The path ARB has two physical states: a recessive state and a dominant state. The rest position (station not transmitting) corresponds to the recessive state. As soon as a single module is transmitting a dominant state, that state propagates over the path ARB at the signal propagation velocity. By convention, it is assumed herein that a low physical level on the arbitration line constitutes the dominant state, while the high physical level constitutes the recessive state. This is achieved easily, e.g. using open-collector outputs at each station. 
     when logic inverters are provided in the interfaces between the stations and the bus, then the dominant state corresponds to a logic level &#34;1&#34; at the station while the recessive state corresponds to a logic level &#34;0&#34;. 
     For each bit in an arbitration frame for which the collision mechanism is operative, the originating station compares the state it is applying with the state it reads from the path at a later instant. This instant is determined as a function of the maximum propagation time of signals on the path, which is itself a function of the physical line length. Similarly, the time interval between applying two consecutive bits is selected as a function of said propagation time. 
     Two possible cases of conflict between stations A and B are described below with reference to FIGS. 2a and 2b. t e  designates the instant at which A applies a bit to the bus, and t l  designates the instant at which the state of the bus is read by the same station. t e  &#39; and t l  &#39; designate the instants at which the station B applies a bit to the bus and at which it reads the bus. In these figures, it is assumed that A is the first to apply a frame and that B applies its frame as soon as it has observed that A is doing so, i.e. after a delay dt that is tied to the propagation velocity on the line. B thus applies all of its bits with a delay dt relative to A. For each station, solid lines represent the signals as applied and dashed lines represent the signals as received. 
     In FIG. 2a, both stations apply a dominant low level. The bus is in the dominant state at station A at instant t l , and at station B at instant t l  &#39;, so both stations detect identity between the state applied and the state read. The same situation would apply if both stations were the only two stations transmitting and both were applying a high level: the bus would remain in the recessive state. 
     In FIG. 2b, A begins by applying a high level, and after the time interval dt, B applies a low level. At instant t l , the bus has switched to the low level, since the low level applied by B has propagated as far as A, as represented by the dashed lines. At station B, the level read is low because the same station is applying a low level. Thus station B observes that the state it reads is identical to the state it is applying, whereas station A observes that there is a difference between the state it is applying and the state it reads. 
     Station A which observes this difference immediately ceases to apply its arbitration frame, whereas station B continues to apply its frame for so long as the above-mentioned identity continues to be true, bit after bit. Any station which ceases to apply its frame has lost the right to take charge of the bus and must renew its request. In contrast, a station which observes agreement between the states it applies and the states it reads all the way to the last bit of the frame in collision takes charge of the bus. 
     To sum up, any station that finds itself applying a high bit to the bus while at least one other station is applying a low bit, withdraws from the competition. 
     By using this deterministic mechanism for detecting collisions, the arbitration path can settle problems of bus allocation between the various requesting stations without requiring a special bus controller. 
     FIG. 3 shows how the flow of data sequences on the path DATA is parallel with the flow of arbitration frames on the path ARB. A station A begins by applying an arbitration frame referenced ARB % A at an instant t 0  to the path ARB. Assuming that no other station requests the bus, A takes charge of the data path since the state of each of the bits it reads from the bus is identical to the state it applies thereto. Thereafter, from instant t 1 , it transmits successive data sequences referenced DATA % A, without needing to apply new frames ARB % A. 
     Subsequently, at an instant t 2  while A is transmitting a sequence DATA % A, a station B requests the line by applying an arbitration frame ARB % B (where synchronization between the flow of data on the paths ARB and DATA is described below), and several sets of circumstances can be envisaged: 
     a) If A wishes to keep charge of the bus, as soon as it detects the beginning of the arbitration frame as applied by B, it applies a new arbitration frame ARB % A. The two frames ARB % A and ARB % B confront each other and the station having the highest priority wins. 
     b) If A has no more data to transmit it does not apply a new arbitration frame. B takes charge of the bus and can be begin transmitting its own sequences DATA % B (starting from instant t3) once the last sequence DATA % A has terminated, which happens while arbitration is taking place. 
     It can be observed that the arbitration process does not require any data frame to be discarded nor does it require any data interchange to be repeated. 
     FIG. 4 shows an arbitration frame ARB %. This frame comprises in succession: a start bit START, a priority field PRIO comprising three bits PRIO2 to PRIO0, a repeat bit REP, a numerical field NUM comprising seven bits NUM6 to NUM0, and a bit EVT representing a global variable for allocating priority to cyclical data or to event data. Naturally, the numbers of bits and the way they are distributed can vary without going beyond the ambit of the invention. The duration of each bit and the time delay dt mentioned above with reference to FIGS. 2a and 2b are appropriately selected as a function of the propagation velocity on the line and of the length of the line. For a bus that is several tens of meters long, the duration of each bit may be about 850 ns, thus giving an arbitration frame a duration of about 12 μs. The data sequences may have a duration of about 10μ to 40 μs, such that collision control can take place practically without overflowing a data sequence, and thus without disturbing the data bit rate. 
     The field PRIO specifies a priority level attributable to the type of traffic requested, and it is generated by the station itself on a case-by-case basis as a function of a priority value V PRIO  desired for the data interchange to be performed and as a function of the parameter EVT. The field NUM serves to identify the station, e.g. topologically. 
     As a preamble to describing the fields PRIO and EVT, it is specified that, in the present example, interchanges over the bus are divided into three categories: 
     priority interchanges (traffic class T0, e.g. having four levels of priority T00 to T03) corresponding to a certain number of connections for which it is desired that access time to the bus should be quick and deterministic; 
     cyclical interchanges (traffic class T1 or T2, selected depending on the value of the parameter EVT, with each class having two priority levels, for example: T10, T11 or T20, T21) which correspond to all of the accesses that are regularly requested (for example regular interchanges of variables); and 
     event interchanges (traffic class T2 or T1 selected as a function of the value of the parameter EVT) which occur randomly. They may relate, for example, to a bulletin board service. 
     Rotating priority for bus access is provided in order to ensure that: 
     when a station makes a request to take charge of the bus for a priority interchange, it always overrides other types of interchange; 
     when the only interchanges that are requesting use of the bus are cyclical interchanges, then the full passband of the bus is made available to them; and 
     when stations are requesting access both for cyclical interchanges and for event interchanges, then each category of interchange has up to one-half of the passband of the bus made available thereto. 
     This rotating priority is governed by the global binary variable EVT which always changes state from one arbitration to the next. Depending on whether EVT is in the recessive state or the dominant state (EVT=0 or EVT=1), priority is given either to cyclical interchanges or else to event interchanges. 
     Each frame applied by a winning station must be such that its EVT field has the opposite value to the immediately preceding winning frame. To this end, all of the stations connected to the bus possess a bistable B EVT  which generates a priority level change signal whose state is required permanently to mirror the global variable EVT. To this end, each station connected to the bus reads the contents of the field EVT in each winning arbitration frame and causes its bistable to take up the inverse binary state. 
     When a station needs to transmit data, it declares a priority value V PRIO  lying in the range 0 to 7, with the following meanings: 
     0 to 3: the four higher priority levels, where 0 represents the highest priority level; and 
     4 to 7, the four priority levels for cyclical and event interchanges, split up into two levels 4 and 5 for cyclical interchanges and two levels 6 and 7 for event interchanges. In practice, levels 4 and 6 may be allocated to normal traffic, while levels 5 and 7 are allocated to batch type traffic. 
     The relationships between V PRIO , the class of traffic determined by the contents of bistable B EVT , and the effective value of the field PRIO in the arbitration frame to be applied are the following: when EVT=0 (cyclical traffic has priority): 
     
         ______________________________________V.sub.PRIO  Class of traffic                   PRI02-PRIO0______________________________________0           T00         0001           T01         0012           T02         0103           T03         0114           T10         1005           T11         1016           T20         1107           T21         111______________________________________ 
    
     
         ______________________________________VRPRIO      Class of traffic                   PRI02-PRIO0______________________________________0           T00         0001           T01         0012           T02         0103           T03         011______________________________________ 
    
     EXAMPLE 1 
     station A requests a cyclical interchange (e.g. V PRIO  =4), a module B requests a normal type event interchange (V PRIO  =6), and a module C requests a batch type event interchange (V PRIO  =7). On the first frame collision, cyclical interchanges have priority (EVT=0). 
     Modules B and C must therefore repeat their requests. 
     During the following collision between the frames originating from B and C, event interchanges have priority (EVT =1), so B wins. 
     Cyclical interchanges then have priority again. C, now the only station originating a frame, takes charge of the bus. 
     The function of the bit REP is now described in detail, with the level thereof serving to request either normal mode access or else repeat mode access. The object of repeat mode is to guarantee access to the bus for all stations having the same level of priority. Implementing this bit in repeat mode is equivalent to temporarily increasing the priority level of a losing station compared with other stations having the same level of priority. 
     The rules governing this bit are the following: 
     at rest, the bit REP is in normal mode in all stations; 
     the bit REP in a station goes to repeat mode as soon as a station has failed to gain access to the bus because of an unfavorable collision with other stations having the same level of priority, and the bit REP read from the bus was in the inactive state (REP=0); and 
     the bit REP of a station returns to normal mode as soon as the station takes charge of the bus. 
     The numerical field NUM serves to identify each station for the purpose of distinguishing between stations having the same priority PRIO and REP. For example, when the bus interconnects modules received in boxes, the more significant bits of NUM may represent the box number while the less significant bits represent the number of the module within the box. 
     When the fields PRIO and REP are identical in two conflicting frames applied simultaneously by two stations, the bits NUM6-NUM0 distinguish between the stations, with the winning station being the station having the lower identifier NUM. Since all of the stations have different identifiers NUM, each collision gives rise to one winner only. 
     EXAMPLE 2 
     To illustrate a conflict between stations, assume that priority is being given to cyclical traffic (EVT=0) and that four stations numbered 0, 1, 2, and 3 in decimal notation all desire simultaneously to take charge of the bus, with station No. 2 having priority level 4 while stations Nos. 0, 1 and 3 all have the same priority level 5. 
     On the initial collision, station No. 2 wins. The other stations must repeat their requests, and they do so in normal mode (REP=1). 
     On the next conflict, EVT=1 and all three frames on the bus have the same priority; the bus is allocated on the basis of the field NUM, with priority going to the lowest identifier, and thus to station No. 0. Since the priority level is the same for all of the frames, stations Nos. 1 and 3 go to repeat mode (REP=0). If some other station should then request access having the same priority, station No. 1 will win over that other station because of its dominant bit REP which precedes the field NUM, and it will win over the station No. 3 because of the lower value in its field NUM. 
     Within the data frames themselves, conventional data interchange techniques may be used, in particular variables and/or messages which associate the data per se, in an appropriate preamble either with a data identifier (for a variable), or else with an address field which includes the address of the originator and the address of the destination (for a message). 
     Synchronization between the paths ARB and DATA is described briefly below. 
     A station connected to the bus must be able to recognize quickly and reliably the frames ARB and DATA of interchanges that are taking place. 
     It is preferable for all interchanges to be synchronized by the signals on the path DATA which is listened to on a permanent basis by all of the stations. This synchronization is performed by detecting activity on the delimiter channel. When the delimiter channel is inactive, the path DATA is at rest. Synchronization is based on the principle that, between two consecutive data sequences, the delimiter channel must pass through the inactive state for a period of time that is sufficient to allow all of the stations to detect said state. 
     In addition, a station seeking to take charge of the bus must also be capable of synchronizing itself on the path ARB so as to know when to begin applying an arbitration frame. To this end, the rule consists in that an arbitration frame must not be applied while a data sequence is beginning on the path DATA. Consequently, on detecting the beginning of a sequence on the path DATA, the path ARB is necessarily at rest. 
     The station which takes charge of the bus must ensure that the path ARB is at rest before it begins sending a data sequence over the path DATA. In each of the other stations, if the beginning of a data sequence is detected on the path DATA while that other station is applying an arbitration frame, then it immediately stops applying said frame and it repeats its request at a later time. 
     Although the word &#34;bus&#34; has been used herein to designate the line interconnecting the various stations, it is clear that this term is not to be interpreted restrictively, and the invention is applicable both to buses and to networks. It applies in general to any environment in which physically separate stations need to be able to interchange digital data over lines of moderate length.