Abstract:
A digital switch serves a number of terminal units for switching signal traffic therebetween, the traffic being logically divided into data time slots and control time slots with control packets. It comprises a switch memory for receiving the data time slots, a control memory containing information for facilitating through connection of the data time slots in the switch memory, a control memory terminal for receiving the control time slots and control packets located therein, for writing information into the control memory, and for transmitting acknowledgement packets to called and calling ones of the terminal units, and an occupied/unoccupied memory cooperating with the control memory terminal and storing actual status of each of the terminal units. A queue system is associated with the control memory terminal and the occupied/unoccupied memory, the queue system including memory and control logic for effecting, in case a first terminal unit tries to establish connection to a second terminal unit that is occupied, queueing of a call request and transmission to the first terminal unit of an acknowledgement &#34;request for connection queued&#34; and, at the receipt of a request for disconnection from the second terminal unit, direct connection of the first terminal unit to the second terminal unit, and transmission of acknowledgements to the first and second terminal units with the information &#34;connection effected&#34; and &#34;request effected&#34;, respectively.

Description:
BACKGROUND 
     The present invention relates to a digital switch serving a number of terminal units for switching signal traffic therebetween, said traffic being logically divided into data time slots and control time slots with control packages or packets, comprising 
     a switch memory for receiving said data time slots, 
     a control memory containing information for facilitating through connection of said data time slots in said switch memory, 
     a control memory terminal for receiving said control time slots and control packages located therein, and writing information into the control memory, and for transmitting acknowledgement packages to called and calling ones of said terminal units, 
     an occupied/unoccupied memory cooperating with said control memory terminal and storing actual status of each of said terminal units. 
     For market considerations telephone systems have been costwise orientated towards normal telephony. Today it can be seen how new requirements on data communication services grow increasingly stronger. On the one hand this depends upon the telephone network having become &#34;the biggest distributed computer system of the world&#34; with requirements for integrated signalling system (number 7), and on the other hand upon new services such as e.g. ISDN (Integrated Services Digital Network) now being close to their realisation. To this comes X.25 networks and similar. 
     In order to costwise meet the expected expansion of the data communication services mentioned above in an optimum way and to enable &#34;integrated control routes&#34; in a telephone exchange for communication between internal control processors, it is desirable in the next generation of telecommunication systems to build switches with &#34;Fast-Circuit&#34; properties. By this is meant a switch, where the nodes connected to the switch, independently of whether it is a simple subscriber line card or a powerful processor, with lightning rapidity shall be able to transmit a request for connection to the switch, which performs the required operation and transmits an acknowledgment back. Then a route has been established through the switch. An example of a switch with &#34;Fast-circuit&#34; properties is described in PCT/SE92/00819. Due to its properties this switch can also serve as a data communication switch with high performance. 
     One of the most difficult problems in data communication switching is to achieve a fair distribution when several transmitters want to transmit to a receiver simultaneously in e.g. a star network or correspondingly for buses/rings when all nodes share the same media and want to transmit simultaneously. As examples of solutions for buses, contention detection with &#34;back-off&#34; algorithms for e.g. ETHERNET-networks and &#34;Tokens&#34; can be mentioned, which can be reserved. 
     In star networks the problem is usually solved by buffering the whole message in the star point, which then can be subject to a temporary congestion, with overspill as a consequence. Buffering furthermore works badly in other networks than those having moderate to low transmission rates (around 64 kb/s). 
     For star connected switches, as the one in the PCT patent application mentioned above, the problem also exists, but there it is for cost reasons not possible to buffer the whole data message (cost, volume, power and data rates). 
     This results in that two nodes can outcompete a third node in trying to transmit to the same receiver. 
     SUMMARY 
     The object of the invention is to solve the problem in a simple and cheap way to achieve a fair distribution when several transmitters want to transmit to one receiver simultaneously. 
     According to the invention this object has been achieved, in a digital switch of the kind indicated by way of introduction, by 
     a queue system associated with said control memory terminal and said occupied/unoccupied memory, said queue system including memory means and control logic means for effecting, 
     in case a first terminal unit tries to establish connection to a second terminal unit, which is occupied, 
     queueing of a call request and transmission to said first terminal unit of an acknowledgment &#34;request for connection queued&#34; and, at the receipt of a request for disconnection from said second terminal unit, 
     direct connection of said first terminal unit to said second terminal unit, and 
     transmission of acknowledgements to said first and second terminal units with the information &#34;connection effected&#34; and &#34;request effected&#34; respectively 
     According to one embodiment the switch includes a queue memory, and said occupied/unoccupied memory includes positions for terminal unit status codes &#34;occupied and queued&#34; and an associated first pointer to said queue memory. 
     One or several queue positions can be assigned to each position in said occupied/unoccupied memory and the pointer be realized by an address in said occupied/unoccupied memory. 
     According to a further embodiment the queue memory is used as a common resource. 
     For that purpose a pointer may be allocated to said occupied/unoccupied memory pointing to a next call stored in said queue memory for a receiver of a terminal unit associated with a position in said occupied/unoccupied memory. 
     Preferably the queue memory may be organized as a number of call positions, to which calls are assigned, the assigned positions being linked to each other and to said position in the occupied/unoccupied memory for building queue structures of variable lengths. 
     In accordance with a further very preferable embodiment the queue memory may have a number of call buffers, to each of which are assigned at least two queue positions, and a marker area indicating status of said at least two queue positions. 
    
    
     DESCRIPTION OF THE FIGURES 
     The invention will now be described in some detail with the aid of embodiments and with reference to the enclosed drawings, on which 
     FIG. 1 is a functional block diagram of a digital switch with terminal units connected, 
     FIG. 2 is a logical format for control and acknowledgment packages in the switch according to FIG. 1, 
     FIG. 3 shows the disposition of the occupied/unoccupied memory and the queue memory in a first embodiment of the invention, 
     FIG. 4 shows the disposition of the occupied/unoccupied memory and the queue memory in a second embodiment of the invention, 
     FIG. 5 shows the disposition of the occupied/unoccupied memory and the queue memory in a third embodiment of the invention, 
     FIG. 6 shows a detail of the switch according to FIG. 1, illustrating the internal structure of the control memory terminal with connected occupied/unoccupied memory and queue memory. 
    
    
     DETAILED DESCRIPTION 
     In FIG. 1 a digital switch is generally denoted with 2. To the switch 2 terminal units 4A-M are connected which are shown both from their transmitting side and receiving side, although the transmitting side and the receiving side of the same terminal unit together comprise one physical unit. The switch includes one multiplexor 6 arranged to concentrate traffic physically from the terminal units 4, which e.g. can include processor units. Said traffic is logically divided into data time slots and control time slots, the data time slots still being logically separated after the concentration while the control time slots are combined to form a common resource. 
     A demultiplexor 8 is arranged to separate the data time slots and the control time slots, a switch memory 10 receiving the data time slots. A control memory 12 includes information with the aid of which through connect of the data time slots in the switch memory 10 is effected. A control memory terminal 14 is arranged to receive the control time slots with the control packages, or packets, included therein and to write information into the control memory 12, as well as to transmit acknowledgement packages to the calling terminal unit with information as to whether connection has been accomplished or the receiving terminal unit is occupied. 
     FIG. 2 schematically illustrates the appearance of a control package and an acknowledgement package respectively. 
     The control package includes, according to FIG. 2, &#34;operational code&#34;, which indicates the type of operation (connection or disconnection), &#34;control number&#34;, &#34;logical receiver&#34;, which indicates the addressed receiving terminal unit, &#34;logical transmitter&#34;, which indicates the addressed transmitting terminal unit, and &#34;physical source address&#34; which indicates the physical address of the terminal unit which transmits the control request. 
     The acknowledgement package includes, also with reference to FIG. 2, &#34;physical destination address&#34; which indicates the physical address of the terminal unit which transmitted the original control request, &#34;acknowledgment code&#34;, which indicates the type of acknowledgment (operation accomplished or not accomplished), and &#34;control number&#34;. 
     The control memory terminal 16 picks up the &#34;physical source address&#34; from the control package and uses it as the &#34;physical destination address&#34; in the acknowledgment package. The &#34;control number&#34; is returned with the acknowledgment so that the terminal unit requesting control should know which control is served, if there are several waiting. 
     An occupied/unoccupied memory 16 works together with the control memory terminal 14 and includes stored information related to actual status for each terminal unit receiver. 
     A second multiplexor 18 is arranged to insert control time slots from the control memory terminal 14 and data time slots from the switch memory 10 on the same physical resource. A second demultiplexor 20 is arranged to separate the data time slots to the respective receiving terminal unit while the acknowledgment packages are directed to the addressed terminal unit. 
     What has been described above for the switch according to FIG. 1, as well as the following functional description, also appears from PCT/SE92/00819, which corresponds to allowed U.S. patent application No. 07/990,464 filed Dec. 15, 1992, from which further details can be derived and which is incorporated here by reference. 
     From one of the terminal units, e.g. 4A, a control package is transmitted for connection by means of the switch memory 10. The control package uses the same routes as the through connected data up to the multiplexor 6. There the control package is separated for further transport to the control memory terminal 14. 
     The control package includes an operational code which in this case is a request for connection with associated switching data pointing to a specified link. The control memory terminal 14 compares the operation request and associated switching data with the actual status of the requested connection through the switch memory 10. The actual status of each connection is stored in the occupied/unoccupied memory 16. 
     If the occupied/unoccupied memory 16 at a request for connection states that the addressed receiver, e.g. terminal unit 4M, is unoccupied the control memory terminal changes status &#34;unoccupied&#34; in the occupied/unoccupied memory 16 to the status &#34;occupied&#34;, and writes the new connection into the control memory 12, which in turn affects the reading from the switch memory 10, so that a one way data route from the terminal unit 4A to the terminal unit 4M is established. 
     The control terminal 14 then transmits an acknowledgment package via the multiplexor 18 to the terminal unit 4A, letting the latter know that a request for connection has been acccomplished. 
     If now e.g. the terminal unit 4B wants to connect a link to the terminal unit 4M the control memory terminal 14, via the occupied/unoccupied memory 16, will realize that the terminal unit 4M is occupied. 
     It is this situation and the problems caused thereby that the present invention takes care of. 
     According to PCT/SE92/00819 mentioned above the control memory terminal 14 will transmit an acknowledgment package to the terminal unit 4B with the information that the addressed receiver is occupied. The indirect consequence is that the terminal unit 4B has to try later. 
     This is no ideal solution and it can create injustice by the terminal unit 4M always being occupied just as the terminal unit 4B tries to become connected, e.g. by the terminal unit 4C having managed to get in between. Another negative consequence is that the control memory terminal 14 is being stressed if e.g. the terminal unit 4B repeats its control package with request for connection with a high frequency to insure that it will get through. 
     By introducing, according to the invention, a system for a &#34;fair queue function&#34; described in detail below, these disadvantages with a &#34;Fast Circuit Switch&#34; can be eliminated. The functional additions which are required have been generally denoted 22 in FIG. 1, and comprise by implementation memory and control logic, which can be software or hardware. 
     As will appear from the description below the difference for the terminal unit B is that it gets the message request queued and an acknowledgment &#34;request for connection queued&#34; when it tries to connect to the terminal unit M, which is already connected to the terminal unit A according to the example described above. 
     When the terminal unit M transmits a control package with request for disconnect, the control memory terminal 14 directly connects terminal unit B to terminal unit M and sends an acknowledgment to both M (&#34;request accomplished&#34;) and to B (&#34;queued request for connection established&#34;). 
     This is effected by adding a status code for &#34;occupied and queued&#34; to the occupied/unoccupied memory 16 as well as an associated pointer to a queue memory 24 where waiting messages are stored. 
     To manage this extra function with the speed which is required by a &#34;Fast Circuit Switch&#34; additional logic is also required in the control memory terminal 14. 
     According to a first embodiment one or more queue positions can be assigned to each position in the occupied/unoccupied memory 16. In this case no pointer is required to the queue memory 24, as such a pointer inherently is understood to be present by the address in the occupied/unoccupied memory 16. One position in the occupied/unoccupied memory 16 is also representing a &#34;logical receiver&#34; (according to the definition given above with reference FIG. 2), position 1 then e.g. representing the terminal unit A, position 2 the terminal unit B, and so on. 
     FIG. 3 shows the disposition of the occupied/unoccupied memory 16 and the queue memory 24 for this first embodiment which is functionally simple. 
     The occupied/unoccupied memory 16 includes a number N of positions with each a status code, intimated at 26. These status codes are: &#34;not used&#34;, &#34;unoccupied&#34;, &#34;occupied and queued&#34;, &#34;occupied and not queued&#34;. To state status for &#34;occupied and queued&#34; and &#34;occupied and not queued&#34; directly in code is not necessary, as it can also appear from pointer values in a function &#34;area description&#34; indicated at 31, in the queue memory 24. However, it is an advantage from a management point of view to indicate this in the status code in the occupied/unoccupied memory 16 because one of the operational codes (compare FIG. 2) in a control package can be &#34;connect if unoccupied, queue if nobody in front in queue&#34;. 
     Each position 26 in the occupied/unoccupied memory 16 points, indicated with a pointer 28, to its own &#34;call area&#34; 30, in the queue memory 24, which has a predefined size equally large for all positions 26 in the occupied/unoccupied memory 16. In each &#34;call area&#34; 30 an &#34;area description&#34; 31 and a number of positions for &#34;calls&#34; 32 are included. Each &#34;call area&#34; can store a number of calls 32 each with associated &#34;control number&#34;, &#34;logical transmitter&#34; and &#34;physical destination address&#34; (compare FIG. 2), indicated at 34. 
     In the field 31 for &#34;area description&#34;, &#34;in-pointers&#34; and &#34;out-pointers&#34; are stored at 36 and 38, respectively. 
     In-pointer 36 indicates where a next call shall be stored with respect to its call area 30. The in-pointer 36 is stepped one step after insertion, so that it points to the next unoccupied position. At the insertion of a call a check must be made that the in-pointer 36 does not have the same value as the out-pointer 38. If this is the case write must be prevented so that a call not serviced is not overwritten. The control memory terminal 14 may in this case transmit an acknowledgment which indicates that the receiver is occupied and that no queue positions are available. 
     The out-pointer 38 indicates which message is in turn to be served when the receiver is disconnected. If the control memory terminal 14 detects that the status code is queued at disconnect the switching data of the receiver is read from the part of the call area 30 indicated by the pointer. After establishment of the connection the out-pointer 38 is stepped to the next position. If the in-pointer 36 then equals the out-pointer 38 the control memory terminal 14 will change the status code of the receiver to &#34;occupied but not queued&#34;. The control memory terminal 14 transmits, of course, also an acknowledgment to the queueing terminal unit informing that the requested connection is established. The &#34;physical destination address&#34; (compare FIG. 2) is collected from the call pointed to in the call area 30. 
     A call area is managed as a circulating buffer, implying that when a pointer has reached the last position it will be stepped to the first position. 
     The control memory terminal 14 should include a control logic (software or hardware) for comparing the pointers 36, 38 with each other and with the last possible position in the call area 30 and taking the above described measures. 
     The above described embodiment implying a simpler logical implementation can result in a waste of queue memory by reserving a call area of a given size for all receivers. This is especially true in cases where only a few of the connected terminal units are processor units, of which in turn only some need to use the queueing function. 
     In such cases an embodiment using the queue memory as a common resource can reduce the memory requirement drastically and make the function more practical to implement. FIG. 4 shows the disposition of the occupied/unoccupied memory and the queue memory for such an implementation. 
     In this embodiment a pointer 54 is allocated to the occupied/unoccupied memory 16, which points to a next call stored in the queue memory 24 for the receiver of the terminal unit associated with the position in the occupied/unoccupied memory 16. By organising the queue memory 24 as a number of &#34;call positions&#34; or call buffers, 52 and by assigning these call positions 52 to calls and linking the assigned positions to each other and to the position in the occupied/unoccupied memory, queueing structures can be built of variable length and with considerably less memory consumption than in the functionally simpler implementation, acccording to the preceding embodiment. Of course, other variations of queueing structures can also be built where e.g. a certain number of call positions according to the simpler implementation are assigned to ready made queueing structures. 
     Reference is now made to FIG. 4. When a control package arrives to the control memory terminal 14 with the operational code &#34;connect if unoccupied, queue if a queue position is available&#34;, the control memory terminal 14 reads the occupied/unoccupied memory 16 as usual, and will find that the receiver is occupied. The control memory terminal 14 will then search in markers, in a marker area 50 in the queue memory 24, for an unoccupied one of call buffers 52. In the marker area 50 each bit position represents the address of a call buffer 52 and the content represents either unoccupied or occupied. When an unoccupied buffer 52 has been found the call is stored there and the marker for this buffer is occupied-marked, and an acknowledgment with the information &#34;queued&#34; is transmitted. (If no unoccupied buffer is found an acknowledgment with the information &#34;occupied and no queue positions available&#34; is transmitted.) For linking the buffer into a call list the control memory terminal 14 reads from the occupied/unoccupied memory 16 an in-queue-pointer, at 54 associated with the position in question. The in-queue-pointer 54 indicates the absolute address in the queue memory 24 to the buffer position 52 where the latest stored call for this receiver is to be found. 
     If an earlier stored call exists (the status in the occupied/unoccupied memory 16 is: &#34;occupied and queued&#34;) the control memory terminal 14 writes the absolute address of the buffer position 52, where the new call should be stored, into the very buffer position 52, shown at 56, where the latest call is stored so that its position 56 points to the buffer position 52 of the new call. 
     If an earlier stored call does not exist (the status in the occupied/unoccupied memory 16: &#34;occupied and not queued&#34;) the control memory terminal 14 writes the absolute address of the buffer position 52, where the new call should be stored, into the position for out-queue-pointers connected to the occupied/unoccupied memory 16, likewise at 54. Then the call is written into the assigned buffer, at 52, and its position 56 is cleared. 
     When an unoccupied-marked and queued position in the occupied/unoccupied memory 16 is read in connection with a request for disconnect, the control memory terminal 14 reads an out-queue-pointer belonging to the position, likewise shown at 54, said pointer pointing to the message which is ready to be served for the associated receiver. The out-queue-pointer 54 indicates the absolute address of the call buffer 52 for the call. After disconnect the buffer position in the marker area 50 is unoccupied-marked and the link-pointer, at 56, for the unoccupied-marked buffer position is written as a new out-queue-pointer. If the link pointer 56 is zero or, alternatively, the in-queue-pointer equals the out-queue-pointer, this implies that no more calls are queued. The control memory terminal 14 then also changes the status in the occupied/unoccupied memory 16 to: &#34;occupied and not queued&#34;. 
     To accelerate the control logic in the control memory terminal 14 which manages the queue memory 24 as a common resource, hardware can be added to quickly find unoccupied buffers 52 in the marker area 50. Examples of this are hardware logic which aided by combining methods will find the most significant 1 in a variable. 
     In FIG. 5 an embodiment is shown in which a common queue resource 24&#39; has a certain number of call buffers 52&#39;. To every call buffer two queue positions 52&#39;.1 and 52&#39;.2, respectively, are alloted. At the appearance of a call that needs to be queued, and there is no call before in the queue for the called receiver, an unoccupied call buffer 52&#39; is searched in the marker area 50&#39;. The address to the found call buffer is written as a pointer 54&#39; into the occupied/unoccupied memory 16 in the position of the called receiver and the call is stored in the queue memory 24&#39; in the position associated with the marker position. In the marker position a code is written indicating that only one queue position is occupied. If a new call arrives for the same receiver, the occupied/unoccupied memory 16&#39; indicates that a call is queued earlier. The call is now stored in the other queue position and status in the marker for the call buffer 52&#39; is changed to indicate that both positions 52&#39;.1 and 52&#39;.2 are occupied and that the last used position is last in the queue. The four bits contained in the marker area of each call buffer may be coded as follows as shown in FIG. 5: 
     only queue position 1 occupied; 
     only queue position 2 occupied; 
     both queue positions occupied, queue position 1 last in the queue; 
     both queue positions occupied, queue position 2 last in the queue; 
     Further codes indicate that both positions are unoccupied. Still further codes can be used for expanding the number of queue positions in a call buffer. 
     When the receiver in question becomes unoccupied and status in the occupied/unoccupied memory 16&#39; shows that a queued call exists, the pointer 54&#39; is read, and the call stored on the position indicated by the pointer to be the first one in the queue, is connected. Marker status is thereafter changed to indicate that both positions are unoccupied, or that only one is occupied, as the case may be. If the final result is that both positions become unoccupied, also status in the occupied/unoccupied memory 16&#39; is changed to: &#34;connected and not queued&#34;. 
     FIG. 6 schematically shows how a control memory terminal 14 together with the occupied/unoccupied memory 16 and the queue memory 24 can be designed internally, in accordance with microprocessor architecture known per se, with an arithmetical unit 60 as the central combinational logic unit, and with memories and functional units connected by system buses 62, 64, 66. A program memory 68 with an associated control unit 70 controls the interaction between the units for each program step via a control bus 72. A unit quickly finding the most significant 1 in a variable, as has been described above, is denoted by 74. 
     Call fifo:s for control packages are denoted by 76 and acknowledgment fifo:s for acknowledgment packages are denoted by 78. 
     The flow of operations which are carried out appears from the directions of the arrows. 
     The following operational codes for control operations associated with the queueing function are then feasible: 
     1. Connect if unoccupied, do not queue if occupied, 
     2. Connect if unoccupied, queue if no call before in queue, 
     3. Connect if unoccupied, queue if a queue position is available, 
     4. Disconnect (connect queued calls), 
     5. Remove queued calls. This command is treated in the same way as earlier described when a new connection should be made of a queued call. The only difference is that the connection is not made and that the whole call area and the linked list are cleared before status in the occupied/unoccupied memory 16 is set to: &#34;occupied and not queued&#34;. Then the proper acknowledgment &#34;request accomplished&#34; is transmitted. 
     The following acknowledgments associated with the queueing function are feasable: 
     1. Connection established, 
     2. Request for connection queued, 
     3. Queued request for connection established, 
     4. Request accomplished (disconnect, remove calls in queue), 
     5. Occupied and no queue positions available.