Field of the Invention
The present invention relates to circuits for detecting data collisions in a communication network, and a method therefor.
Background of the Invention
In a communication network which is operated with a plurality of terminal units connected to a host computer and to each other, data sometimes collide with each other in the communication line, thereby causing illegible errors.
In order to detect data collisions in a communication system, there is a method of detecting the edges of received pulses for the detection of data collisions; a method of detecting the height of the threshold amplitude of transmitted signals for detection of data collisions; a method of checking the transmission and receiving CRC (cyclic redundancy check) codes for detecting data collisions; and a method of detecting the violation of the code rule of the Manchester code for detecting data collisions.
Among these methods for detecting data collisions, the most widely used one at present is the technique in which the violation of the code rule of the Manchester code is detected, which is used for detecting data collisions, and this technique is disclosed in U.S. Pat. No. 5,012,467.
In this method, a checking is made as to whether a transition occurs within a pre-set time window, and whether a next transition occurs in the same time window. If no transition occurs, there is output a signal which notifies an occurrence of a collision between signals.
That is, transitions at the center of a bit cell of the Manchester code is detected so as to output a trigger signal. This trigger signal is supplied to a pulse generator which has a certain pulse width and which is capable of re-triggering, thereby setting a time window. If the trigger signal does not appear within the time window, then a data collision detection signal is output.
However, in such conventional methods and circuits in which a violation of the code rule of the Manchester code is detected for detecting data collisions, an edge trigger detecting circuit is not used. Therefore, a relatively long delay (88-1100 .mu. seconds) is required for setting the time window. For this reason, an RC analog circuit is additionally required, with the result that the integration density and reliability worsen, and the manufacturing cost is increased.
Summary of the Invention
The present invention is intended to overcome the above described disadvantages of the conventional techniques.
Therefore, it is an object of the present invention to provide a method for detecting data collisions in a communication network, and a circuit therefor, in which, in detecting data collisions during a communication, a pulse having a certain width is generated upon occurrence of a transition at the center of a data bit cell, and this pulse is compared with a variation of clock signals having a certain frequency synchronized with data signals.
In achieving the above and other objects, the circuit for detecting data collisions in a communication network according to the present invention includes data transition detecting section 1 for receiving data signals RXD encoded based on the Manchester code, to detect a transition at the center of the bit cell of the encoded data signals, and to output transition detecting signal Z having a certain pulse width; delayer 2 for delaying received clock signals RXC having a certain cycle synchronized with received data signals RXD, to output delayed clock signals DRXC; and data collision detecting section 3, which enters an active mode in accordance with data receiving status signal CRS illustrating the receiving status of the received data signals, and shifts the status of output signals in accordance with transition detecting signal Z upon clocking of delayed clock signal DRXC.
Data transition detecting section 1 includes: a delaying means for delaying the received data for a certain period of time; and a logic circuit for processing logically the delayed signals and undelayed signals.
Data collision detecting section 3 includes one or more D flip-flops for receiving transition detecting signals Z of the data transition detecting section into data input terminal D, and for receiving delayed clock signals DRXC of the delayer into clock input terminal CK to output an output having the same status as the data input status at a rising edge of the clock signal, and to output a data collision signal through output terminal Q.
In another aspect of the present invention, the method for detecting data collisions of received data RXD encoded based on the Manchester code according to the present invention includes the steps of: receiving data signals RXD encoded based on the Manchester code, and detecting a transition at a center of a bit cell of the encoded data to form transition detecting signal Z, which is a pulse signal existing for a certain period of time from the transition; delaying received clock signals RXC having a certain cycle in synchronization with received data signals RXD, to form delayed clock signal DRXC; and recognizing a data collision upon finding that a rising edge of delayed clock signal DRXC does not appear within a pulse width of the transition detecting signal only when the received signals exist, thereupon outputting a data collision signal.
The step of forming the data transition detecting signal is carried out in such a manner that the received data signals are delayed for a certain period of time to form delayed data signals, and the delayed data signals and undelayed data signals are logic-processed, whereby the data transition detecting signal existing for a certain period of time from the data transition is generated through a logic circuit.
The step of outputting the data collision signal is carried out in such a manner that, if a pulse in data transition detecting signal Z does not exist at a rising edge of the delayed clock signal, by using a D flip-flop, output terminal Q is shifted to a low state to recognize an occurrence of data collision, and for a packet transmission network, the outputting the data collision signal is canceled, if within a certain time period carrier sense signal CRC makes the D type flip flop inactive.
Brief Description of the Drawings
The above objects and other advantages of the present invention will become more apparent by describing in detail the preferred embodiment of the present invention with reference to the attached drawings in which:
FIG. 1 illustrates the circuit for detecting data collisions in a short distance communication system according to the present invention;
FIGS. 2A to 2D illustrate wave patterns for respective portions of FIG. 1;
FIGS. 3A to 3C illustrate receiving timing charts for the rising edges of packets; and
FIGS. 4A to 4C illustrate receiving timing charts for the trailing edges of the packets.
Description of the Preferred Embodiments
As illustrated in FIG. 1, the circuit for detecting data collisions in a communication network according to the present invention includes data transition detecting section 1, clock delaying section 2 and collision detecting section 3.
Data transition detecting section 1 receives data signal RXD encoded based on the Manchester coding method, and detects a transition at the center of a bit cell of the encoded data signal, to generate transition detecting signal Z having a proper pulse width.
Data transition detecting section 1 includes delaying means 12 for delaying the received data for a certain period of time, and a logic circuit for logic-processing the delayed signals and undelayed signals. Delaying means 12 may be composed of either an R-C circuit or a plurality of serially connected inverters, buffers, etc.
The logic circuit includes: first NAND gate (ND.sub.1) 13 having two input terminals, a first input terminal of which receives data signal RXD, and a second input terminal of which receives the output of delaying means 12; first inverter (I.sub.1) 11 for receiving data signal RXD to supply an inverted output to delaying means 12; second inverter (I.sub.2) 15 for receiving an output from delaying means (1A) 12 to output an inverted output; third inverter 17 for receiving data signal RXD to output an inverted output; second NAND gate (ND.sub.2) 16 for receiving outputs from the second and third inverters into its two input terminals; and third NAND gate (ND.sub.3) 14 for receiving outputs from first and second NAND gates ND.sub.1 and ND.sub.2 into its two input terminals to output transition detecting signal Z. In other embodiments, inverters I.sub.1 and I.sub.3 may constitute a single inverter.
Clock delaying section (delayer) 2 delays for a certain period of time received clock signal RXC having a certain cycle in synchronization with received data signal RXD, to output delayed clock signal DRXC. Like delaying means 12, clock delayer 2 is composed of an RC analog circuit or a plurality of serially connected inverters, buffers, etc.
Data collision detecting section 3 is turned to an active mode in accordance with data receiving status signal CRS illustrating the receiving status of the received data signal, to shift the status of output signals in accordance with transition detecting signal Z upon clocking of delayed clock signal DRXC.
Collision detecting section 3 may be composed of a D flip-flop which receives transition detecting signal Z from data transition detecting section 1 into its data input terminal D, and receives delayed clock signal DRXC from clock delayer 2 into its clock input terminal CK, and outputs an output having a status the same as that of the data input at a rising edge of the clock signal through an output terminal Q.
Further, collision detecting section 3 may comprise three (or some other number) D flip-flops connected in series, with the output terminal Q of the preceding stage connected to the input terminal D of the following stage, while the output terminal Q of the final stage outputs data collision signal COL. In this way, data collisions can be detected, such as in a packet network.
The circuit of the present invention constituted as above will be described as to its operations referring to FIGS. 2 to 4.
First, a checking is made as to whether received data signal RXD and received clock signal RXC exist. If they exist, then carrier sense signals CRS having a high signal state are supplied externally.
When receiving data signal RXD encoded based on the Manchester coding method as illustrated in FIG. 2A are input, it is supplied to data transition detecting section 1 to be input into one of the input terminals of first NAND gate ND.sub.1. The signal is inverted and delayed while passing through first inverter I.sub.1 and delaying means 12 (1A) so as to be supplied to the other input terminal of first NAND gate ND.sub.1. The signal passes through the output terminal of delaying means 12 and second inverter I.sub.2 to be supplied to one of the input terminals of second NAND gate ND.sub.2. Received data signal RXD passes through third inverter I.sub.3 to be supplied to the other input terminal of second NAND gate ND.sub.2. The output signals of first and second NAND gates ND.sub.1 and ND.sub.2, are NAND-combined during the passage through third NAND gate ND.sub.3, so as to output pulse signal Z having a certain pulse width as illustrated in FIG. 2B. Pulse signal Z is maintained at a high level for an interval as long as the delay interval of delaying means 12, when the received data signal is transmitted, i.e., shifted from a high level to a low level or from a low level to a high level.
Meanwhile, received clock signal RXC which has a certain cycle and which is synchronized with received data signal RXD is delayed by delayer 2 for a certain time period to be output as illustrated in FIG. 2C and to be supplied as clock signals CK.sub.1 -CK.sub.3 for data collision detecting section 3. The time period delayed by delayer 2 is about 1/2 that of delaying means 12 in the preferred embodiment. Thus, delayed clock signal DRXC is made to rise at a middle time of the high pulse duration of transition detecting signal Z.
Therefore, first D flip-flop FF.sub.1 of data collision detecting section 3 receives transition detecting signal Z from data transition detecting section 1. Thus, the output can vary in synchronization with delayed received clock signal DRXC from delayer 2.
If received data signal RXD exists, carrier sensing signal CRS is generated, and supplied to an SDN terminal of the D flip-flops for placing the flip-flops in an active mode or inactive mode. If the carrier, i.e., received data signal, exists, the signal CRS becomes high, and if there is none, then becomes low. Therefore, if signal CRS is low, the output of the D flip-flop becomes high regardless of the input D. If signal CRS is high, output Q can be varied in accordance with the rising edge timing of the clock pulse and in accordance with input D.
At the moment when delayed clock signal DRXC becomes high, the signal state of input D of D flip-flop FF.sub.1 appears at the output signal Q.sub.1 so as to be input into second D flip-flop FF.sub.2. At the next moment when delayed clock signal DRXC becomes high, the output signal Q.sub.1 which is the input D of second D flip-flop FF.sub.2 appears at the output signal Q.sub.2 of second D flip-flop FF.sub.2 so as to be supplied to an input terminal of third D flip-flop FF.sub.3. At the rising edge of the delayed clock signal DRXC, an output Q.sub.3 is output as data collision detecting signal COL.
For example, as in cycles T.sub.1 and T.sub.2 of FIG. 2, if transition detecting signal Z which is supplied as input data for D flip-flop FF.sub.1 maintains a high state for a "delay I" at the rising edge of the clock signal, then the clock signal which is delayed as much as a "delay II" rises to make the output Q of the flip-flop high. This is a case in which a data collision has not occurred, and therefore, the data collision detecting signal COL is output with a high level.
However, like in a cycle T.sub.5 of FIG. 2, if transition detecting signal Z which is supplied to D flip-flop FF.sub.1 is low at the rising edge of delayed clock signal DRXC (this being a state in which a data collision has occurred.), the low signal state of input D of first D flip-flop FF.sub.1 appears in output signal Q.sub.1 at the moment when a first pulse of the delayed clock signal DRXC become high, and thus may be supplied to second D flip-flop FF.sub.2. The output signal Q.sub.2 of the second D flip-flop FF.sub.2 is shifted to a low state in the second pulse of delayed clock signal DRXC (T7), and output signal Q.sub.3 of third D flip-flop FF.sub.3 is shifted to a low state at the rising edge (T9) of third delayed clock signal DRXC. Thus the data collision detecting signal is made to be low so as to inform of the occurrence of a data collision. That is, at the moment when pulses of delayed clock signal DRXC are generated three times, i.e., at a cycle T.sub.9, the data collision detecting signal COL is output with a low level. At the next cycle T.sub.11 signal COL becomes high again.
FIG. 3 is a timing chart illustrating the method of detecting data collisions in a packet transmission network. FIG. 3A illustrates preamble signals of the packet transmission starting portion, and also illustrates a wave pattern of encoded received data signal RXD which sends a certain pulse repeatedly. FIG. 3B illustrates a wave pattern of the carrier sense signals which are shifted from low to high. FIG. 3C illustrates a wave pattern of the received clock signal DRXC which occurs with a certain time delay TDAT. Therefore, the first to third flip flops do not generate any errors, and as long as data are not collided, the signal COL is never shifted to a low state.
FIG. 4 is a timing chart illustrating wave patterns of the signals to illustrate that the operation does not generate errors even at the trailing end of data transmission in a packet transmission network. FIG. 4A illustrates a wave pattern of received data signal RXD, i.e., the trailing portion of the packet transmission, which are encoded based on the Manchester coding rule, and in which the last pulse descends slowly from high to low. FIG. 4B illustrates a wave pattern of the carrier sensing signal which is shifted from high to low because of the disappearance of the received data signal. FIG. 4C illustrates a wave pattern of the received clock signals which are continued for a certain period of time and disappear.
In this case also, carrier signal CRS has become low, and therefore, signal Z is maintained high until the first to third flip-flops are inactivated. If there is no received data, signal CRS is shifted to a low state, so that the flip-flops would be set to a high state. Consequently, an erroneous signal is not generated as if a data collision has occurred, in spite of the fact that there is none.
According to the present invention as described above, a edge trigger detecting circuit is used., and, therefore, a relatively short delay time is required, so that an analogue circuit can be replaced with a digital circuit. Further, the existing signals such as CRS and RXD, which are already made in another part of the receiving circuitry and the like, can be used as they are, so that the integrity and reliability can be improved.
Although various preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and/or substitutions are possible without departing from the scope and spirit of the present invention as disclosed in the claims.