CN104052615A - Master-slave detection method and master-salve detection circuit - Google Patents

Master-slave detection method and master-salve detection circuit Download PDF

Info

Publication number
CN104052615A
CN104052615A CN201310084423.1A CN201310084423A CN104052615A CN 104052615 A CN104052615 A CN 104052615A CN 201310084423 A CN201310084423 A CN 201310084423A CN 104052615 A CN104052615 A CN 104052615A
Authority
CN
China
Prior art keywords
pseudorandom code
subordinate
master control
signal
principal
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.)
Granted
Application number
CN201310084423.1A
Other languages
Chinese (zh)
Other versions
CN104052615B (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.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor 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 Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN201310084423.1A priority Critical patent/CN104052615B/en
Publication of CN104052615A publication Critical patent/CN104052615A/en
Application granted granted Critical
Publication of CN104052615B publication Critical patent/CN104052615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a master-slave detection method and a master-salve detection circuit. The master-slave detection method comprises: in every period, determining whether a first apparatus transmits a specific pulse signal to a second apparatus through a random mode; in every period, determining whether the second apparatus transmits the specific pulse signal to the first apparatus through a random mode; when the first apparatus receives at least a part of the specific pulse signal easily than the second apparatus, setting the first apparatus to be a master control apparatus, and enabling the master control apparatus to stop transmitting the specific pulse signal and begin to transmit a specific sequence; and when the second apparatus receives the specific sequence, setting the second apparatus to be a slave apparatus. The at least one part of the specific pulse signal comprises a continuous single pulse.

Description

Principal and subordinate's detection method and principal and subordinate's testing circuit
Technical field
The disclosed embodiment of the present invention includes principal and subordinate's detection method and the interlock circuit of line transmission system, espespecially a kind of principal and subordinate's detection method and interlock circuit that is applied to the line transmission system of Ethernet (Ethernet).
Background technology
In traditional line transmission system, in order to increase transmission range and speed, often need expensive wire rod to alleviate the design difficulty of receiving terminal, optical fiber (Fiber Optical) network for example, yet, also there is the more cheap wire rod of use to transmission range and speed, to have required standard to a certain degree to exist again, for example Ethernet simultaneously.
For example, at traditional Fast Ethernet (100BASE-T, 1000BASE-T), use two pairs of nothings to cover twisted-pair feeder (Un-shield Twisted Pair, UTP) carry out wire transmission, in line, for the device at Fast Ethernet two ends, there is a pair of nothing that is used for specially transmitting data simultaneously and cover twisted-pair feeder, and a pair of nothing that is used for specially receiving data is covered twisted-pair feeder.And recently at some, for cost and weight, require in more harsh application, Dan Dui Ethernet alliance (OPEN Alliance) for example, wish to reduce significantly network complexity and cable cost, and maintain the characteristic of high bandwidth, therefore use is single to carrying out wire transmission without covering twisted-pair feeder, yet, single, nothing is covered to two devices in twisted pair system, in the cable connecting at the beginning each other, can cause being suitable for because of the problem of collision (collision) auto negotiation (auto-negotiation) mechanism of traditional Fast Ethernet, in other words, cannot by single, to two devices without covering in twisted pair system, be assigned as master control (master) device and subordinate (slave) device by the Automatic Negotiation Mechanism of traditional Fast Ethernet.
Therefore,, in order to solve the above problems, need a kind of principal and subordinate's detection method of innovation, by single, two devices without covering in twisted pair system are assigned as to master control set and slave unit.
Summary of the invention
One of object of the present invention is to provide a kind of principal and subordinate's detection method and interlock circuit that two devices are assigned as to master control set and slave unit.
According to one first embodiment of the present invention, disclose a kind of principal and subordinate's detection method, include: periodically determine whether a first device transmits certain pulses signal to one second device; Periodically determine whether this second device transmits this certain pulses signal to this first device; When this first device is first received at least a portion signal of this certain pulses signal than this second device, this first device is set as to a master control set, and makes this master control set stop transmitting this certain pulses signal and start to transmit a particular sequence; And when this second device is received this particular sequence, this second device is set as to a slave unit.
According to one second embodiment of the present invention, disclose a kind of principal and subordinate's detection method, include: with a first device, periodically transmit one first pseudorandom code to the second device, wherein this first pseudorandom code is one first master control pseudorandom code or one first subordinate pseudorandom code, when this first device transmits this first master control pseudorandom code, this first device carries out a specific comparison calculation with the signal receiving with this first subordinate pseudorandom code and one second subordinate pseudorandom code respectively, and when this first device transmits this first subordinate pseudorandom code, this first device carries out this specific comparison calculation with the signal receiving with this first master control pseudorandom code and one second master control pseudorandom code respectively, with this second device, periodically transmit one second pseudorandom code to this first device, wherein this second pseudorandom code is this first master control pseudorandom code or this first subordinate pseudorandom code, when this second device transmits this first master control pseudorandom code, this second device carries out this specific comparison calculation with the signal receiving with this first subordinate pseudorandom code and one second subordinate pseudorandom code, and when this second device transmits this first subordinate pseudorandom code, this second device carries out this specific comparison calculation with the signal receiving with this first master control pseudorandom code and one second master control pseudorandom code, when this first device first obtains the matching result of this specific comparison calculation than this second device, according to this first device, carry out this first pseudorandom code that this specific comparison calculation uses this first device is set as to a master control set or a slave unit, and make this first device transmit one the 3rd pseudorandom code to this second device, and when this second device is received the 3rd pseudorandom code, according to the 3rd pseudorandom code, this second device is set as to this master control set or this slave unit.
According to of the present invention 1 the 3rd embodiment, disclose a kind of principal and subordinate's testing circuit, include a transfer control circuit, a reception control circuit and a control circuit.This transfer control circuit is used for periodically determining whether a device transmits a certain pulses signal and install to another.This reception control circuit is used for judging whether this device receives at least a portion signal of this certain pulses signal.This control circuit is used for when this device receives at least a portion signal of this certain pulses signal, this device is set as to a master control set, and make this master control set stop transmitting this certain pulses signal and start to transmit a particular sequence, or when this device receives this particular sequence, this device is set as to a slave unit.
The present invention can make the list of Fast Ethernet overcome the problem of collision and carry out automatic principal and subordinate's testing mechanism two devices without covering in twisted pair system, in other words, the present invention proposes a kind of automatic principal and subordinate's testing mechanism, by single, two devices without covering in twisted pair system is assigned as to master control set and slave unit, thus, list is significantly improved the availability without covering twisted pair system, and alleviated cable cost and the weight of system.
Accompanying drawing explanation
Fig. 1 is the flow chart of an one exemplary embodiment of principal and subordinate's detection method of the present invention.
Fig. 2 is the schematic diagram of an one exemplary embodiment of principal and subordinate's testing circuit of the present invention.
Fig. 3 is the schematic diagram of the certain pulses signal that uses of principal and subordinate's testing circuit of the present invention.
Fig. 4 is an exemplary sequential operation figure of the principal and subordinate's testing circuit shown in Fig. 2.
Fig. 5 is the flow chart of another one exemplary embodiment of principal and subordinate's detection method of the present invention.
Fig. 6 is the schematic diagram of another one exemplary embodiment of principal and subordinate's testing circuit of the present invention.
Fig. 7 is an exemplary sequential operation figure of the principal and subordinate's testing circuit shown in Fig. 6.
[symbol description]
100~106,500~506 steps
200,600 principal and subordinate's testing circuits
202,602 transfer control circuit
204,604 reception control circuits
206,606 control circuits
208 echo preventing circuits
212 pseudorandom generators
Embodiment
Please refer to Fig. 1, Fig. 1 is the flow chart of an one exemplary embodiment of principal and subordinate's detection method of the present invention.If can reach identical result substantially, do not need necessarily in accordance with the step order in the flow process shown in Fig. 1, to carry out, and the step shown in Fig. 1 not necessarily will be carried out continuously, also be that other steps also can be inserted wherein, in addition, some step in Fig. 1 also can be omitted it according to different embodiment or design requirement.The method mainly can include following steps:
Step 100: at interval of a period, decide a first device whether to transmit a certain pulses signal to this second device with random fashion;
Step 102: at interval of a period, decide one second device whether to transmit this certain pulses signal to this first device with random fashion;
Step 104: when this first device is first received at least a portion signal of this certain pulses signal than this second device, this first device is set as to a master control set, and makes this master control set stop transmitting this certain pulses signal and start to transmit a particular sequence; And
Step 106: when this second device is received this particular sequence, this second device is set as to a slave unit.
Please also refer to Fig. 1 and Fig. 2, Fig. 2 is the schematic diagram of an one exemplary embodiment of principal and subordinate's testing circuit of the present invention.For example, each device in a plurality of devices (first device DUT and the second device LP) is provided with principal and subordinate's testing circuit 200.In the present embodiment, principal and subordinate's testing circuit 200 includes a transfer control circuit 202, a reception control circuit 204, a control circuit 206 and an echo preventing circuit 208.When first device DUT not yet completes the flow process of principal and subordinate's detection with other devices, as shown in step 100, transfer control circuit 202 is used for periodically with random fashion, deciding first device DUT whether to transmit certain pulses signal LPB to a second device LP, and transfer control circuit 202 is coupled to control circuit 206.In the present embodiment, transfer control circuit 202 is at interval of a period T, just with pseudorandom generator 212, produce a random signal RND to determine whether to send certain pulses signal LPB, for instance, can use a pseudorandom sequence multinomial (pseudo-random sequence polynomial) with specific initial value to produce random signal RND, for example this pseudorandom sequence multinomial can be X 10+ X 8+ 1, and first value of making of setting pseudorandom sequence multinomial be 00A9H(, 00010101001), in addition, transfer control circuit 202, when RND=1, just can transmit certain pulses signal LPB, in other words, transfer control circuit 202, when RND=0, can't transmit certain pulses signal LPB.Yet above are only the exemplary illustrated of the present embodiment, the generation mechanism of random signal is not defined as the producing method of above-mentioned pseudorandom, in fact can use any random signal generation mechanism that can reach identical or similar object, these designs all belong to category of the present invention.
On the other hand, because the second device LP also can be provided with principal and subordinate's testing circuit 200, therefore the second device LP similarly can, at interval of period T, determine whether transmitting certain pulses signal LPB to first device DUT, i.e. step 102 with random fashion.Please note, for fear of with cable on noise aliasing, reduce the chance of erroneous judgement signal, certain pulses signal LPB in the present embodiment includes a plurality of Sing plus P, for instance, Fig. 3 is the schematic diagram of the certain pulses signal that uses of principal and subordinate's testing circuit of the present invention, wherein between a plurality of Sing plus P, has the interval of a period t, and between certain pulses signal LPB, has the interval of period T.Yet above are only the exemplary illustrated of the present embodiment, certain pulses signal is not defined as above-mentioned form, in fact can use any certain pulses signal that can reach identical or similar object, wherein can comprise the Sing plus of arbitrary number, these designs all belong to category of the present invention.
The reception control circuit 204 being positioned on first device DUT is used for judging whether first device DUT receives at least a portion signal of the certain pulses signal LPB transmitting from the second device LP, and reception control circuit 204 is coupled to respectively control circuit 206 and echo preventing circuit 208.Echo preventing circuit 208 is coupled between reception control circuit 204 and control circuit 206, is used for, after first device DUT transmits certain pulses signal LPB to the second device LP, controlling first device DUT in a period T round_trip_delayin stop receiving signal, to avoid receiving a rebounded echo (echo) signal of returning and this echo-signal is used as to the signal that the second device LP is sent mistakenly of signal that first device DUT sends out itself, be even mistaken for qualified certain pulses signal LPB.It should be noted period T round_trip_delaycan set according to actual state, for example the length of cable or material.After first device DUT transmits certain pulses signal LPB to the second device LP and through period T round_trip_delayafterwards, if on first device DUT is that reception control circuit 204 judgements receive the reception signal RXDATA from the second device LP, for instance, receive three continuous Sing plus P, reception control circuit 204 can now receive the certain pulses signal LPB that the second device LP transmits by judgement first device DUT, in addition, if only received two continuous Sing plus P, reception control circuit 204 can be regarded as underproof signal, and can not notify control circuit 206.Control circuit 206 is used for when reception control circuit 204 indication first device DUT have received at least a portion signal of the certain pulses signal LPB transmitting from the second device LP, first device DUT is set as to a master control set, and make this master control set (being first device DUT) stop transmitting certain pulses signal LPB and start to transmit particular sequence IDLE to the second device LP, namely a step 104.Yet if there is contrary situation, also when first device DUT receives particular sequence IDLE, control circuit 206 can be set as a slave unit, i.e. step 106 by first device DUT.
In order to illustrate in greater detail operating process of the present invention, below the situation of utilizing actual capabilities to occur is used as to the illustrative example of the present embodiment.Please refer to Fig. 4, Fig. 4 is the sequential operation figure of an embodiment of principal and subordinate's testing circuit of the present invention.Wherein there are respectively two vertical lines the below of literal symbol DUT and literal symbol LP, it represents respectively the time shaft of first device DUT and the time shaft of the second device LP, represent from top to bottom the carrying out of time, and there is the time point of particular event in the representative of stain above time shaft.First device DUT and the second device LP are respectively arranged with the principal and subordinate's testing circuit 200 shown in Fig. 2.In the time of at the beginning, (for example the cable between first device DUT and the second device LP just just connects in not yet completing the state of principal and subordinate's testing mechanism for first device DUT and the second device LP, therefore, between first device DUT and the second device LP, not yet determine the distribution of master control set and slave unit), and the random signal RND=1 that the transfer control circuit 202 of the second device LP is used pseudorandom generator 212 to produce at time point t1, determine to send certain pulses signal LPB, and in order to prevent that the echo of reflection from causing the erroneous judgement of the reception control circuit 204 of the second device LP, therefore can make the reception control circuit 204 of the second device LP stop receiving signal (for example closing reception control circuit 204), until through period T round_trip_delayafter, just again make the reception control circuit 204 of the second device LP start to receive signal.In addition, the transfer control circuit 202 of first device DUT is also compared with time point t 1time point t a little later 2use pseudorandom generator 212 to produce random signal RND=1, determine to send certain pulses signal LPB, and similarly in order to prevent that the echo of reflection from causing the erroneous judgement of the reception control circuit 204 of first device DUT, therefore can make the reception control circuit 204 of first device DUT stop receiving signal, until through period T round_trip_delayafter, just again make the reception control circuit 204 of first device DUT start to receive signal.At time point t 3time, the certain pulses signal LPB that the second device LP sends arrives first device DUT, but now the reception control circuit 204 of first device DUT is not yet enabled, in other words, time point t 3time apart from the last transmission of first device DUT certain pulses signal LPB (is time point t 2) interval time not yet meet and be more than or equal to period T round_trip_delayrequirement, even if the certain pulses signal LPB that therefore the second device LP sends arrives first device DUT, the judgement of echo preventing circuit 208 that also can be based on first device DUT and being left in the basket.Similarly, at time point t 4time, the certain pulses signal LPB that first device DUT sends arrives the second device LP, but now the reception control circuit 204 of the second device LP is not yet enabled, in other words, time point t 4the second last time of transmitting certain pulses signal LPB of device LP of distance (is time point t 1) interval time not yet meet and be more than or equal to period T round_trip_delayrequirement, even so the certain pulses signal LPB that sends of first device DUT arrive the second device LP, the judgement of echo preventing circuit 208 that also can be based on the second device LP and being left in the basket.
Next, at time point t 5time, 208 the second last times of transmitting certain pulses signal LPB of device LP of judging distance of echo preventing circuit of the second device LP (are time point t 1) interval time met and be more than or equal to period T round_trip_delayrequirement, the reception control circuit 204 that now just starts the second device LP starts to analyze and receives signal RXDATA.Similarly, at time point t 6time, the last time of transmitting certain pulses signal LPB of echo preventing circuit 208 judging distance first device DUT of first device DUT (is time point t 2) interval time met and be more than or equal to period T round_trip_delayrequirement, the reception control circuit 204 that now just starts first device DUT starts to analyze and receives signal RXDATA.At time point t 7time, 202 the second last times of transmitting certain pulses signal LPB of device LP of judging distance of transfer control circuit of the second device LP (are time point t 1) interval time met the requirement equal period T, therefore at time point t 7use pseudorandom generator 212 to produce random signal RND=0, therefore determine not send certain pulses signal LPB, and because this second device LP does not send certain pulses signal LPB, just need to not make the reception control circuit 204 of the second device LP stop receiving signal in order to prevent the echo of reflection, in other words, the reception control circuit 204 of the second device LP state in being enabled and allow to carry out signal reception still now.On the contrary, at time point t 8time, the last time of transmitting certain pulses signal LPB of transfer control circuit 202 judging distance first device DUT of first device DUT (is time point t 2) interval time met the requirement equal period T, therefore at time point t 8use pseudorandom generator 212 to produce random signal RND=1, thus determine to send certain pulses signal LPB, and similarly can make the reception control circuit 204 of first device DUT stop receiving signal, until again pass through period T round_trip_delayafter, just again make the reception control circuit 204 of first device DUT start to receive signal.
At time point t 9time, the certain pulses signal LPB that first device DUT sends arrives the second device LP, the state of reception control circuit 204 in enabling of the second device LP now, and reception control circuit 204 receives 3 (or more than 3) Sing plus P continuously, now the control circuit 206 of the second device LP can be set as master control set by the second device LP, and require transfer control circuit 202 to transmit particular sequence IDLE, and the second device LP entered for the first adjustment stage.On the other hand, first device DUT is at time point t 11time receive particular sequence IDLE(now the reception control circuit 204 of first device DUT passed through period T round_trip_delay(time point t 11) and start to receive signal), and passed through a period T idle(time point t 12), the reception control circuit 204 of confirming first device DUT continues to receive particular sequence IDLE, now the control circuit 206 of first device DUT can be set as slave unit by first device DUT, and entered for the first adjustment stage, for instance, first device DUT can carry out at the particular sequence IDLE that the first adjustment stage utilized the second device LP to transmit regularly replying the flow process of (timing recovery).At time point t 13time, first device DUT has completed all flow processs that should carry out in the first adjustment stage, therefore entered for the second adjustment stage, now the transfer control circuit 202 of first device DUT can transmit particular sequence IDLE to the second device LP, and the second device LP is at time point t 13after receiving the particular sequence IDLE from first device DUT, also can enter for the second adjustment stage.
Please refer to Fig. 5, Fig. 5 is the flow chart of another embodiment of principal and subordinate's detection method of the present invention.If can reach identical result substantially, do not need necessarily in accordance with the step order in the flow process shown in Fig. 5, to carry out, and the step shown in Fig. 5 not necessarily will be carried out continuously, also be, other steps also can be inserted wherein, in addition, some step in Fig. 5 also can be omitted according to different embodiment or design requirement.The method mainly can include following steps:
Step 500: at interval of a period, with random fashion, decide a first device to transmit one first master control pseudorandom code or one first subordinate pseudorandom code to the second device, when this first device transmits this first master control pseudorandom code, this first device carries out a specific comparison calculation with the signal receiving with this first subordinate pseudorandom code and one second subordinate pseudorandom code respectively, and when this first device transmits this first subordinate pseudorandom code, this first device carries out this specific comparison calculation with the signal receiving with this first master control pseudorandom code and one second master control pseudorandom code respectively,
Step 502: at interval of a period, with random fashion, decide this second device this first master control pseudorandom code of transmission or this first subordinate pseudorandom code to this first device, when this second device transmits this first master control pseudorandom code, this second device carries out a specific comparison calculation with the signal receiving with this first subordinate pseudorandom code and this second subordinate pseudorandom code respectively, and when this second device transmits this first subordinate pseudorandom code, this second device carries out this specific comparison calculation with the signal receiving with this first master control pseudorandom code and this second master control pseudorandom code respectively,
Step 504: when this first device first obtains the matching result of this specific comparison calculation than this second device, according to this first device, carry out this first master control pseudorandom code or this first subordinate pseudorandom code that this specific comparison calculation uses this first device is set as to a master control set or a slave unit, and make this first device transmit one the 3rd pseudorandom code to this second device; And
Step 506: when this second device is received the 3rd pseudorandom code, according to the 3rd pseudorandom code, this second device is set as to this master control set or this slave unit.
Please also refer to Fig. 5 and Fig. 6, Fig. 6 is the schematic diagram of another one exemplary embodiment of principal and subordinate's testing circuit of the present invention.For example, each device in a plurality of devices (first device DUT and the second device LP) is provided with principal and subordinate's testing circuit 600.In the present embodiment, principal and subordinate's testing circuit 600 includes a transfer control circuit 602, a reception control circuit 604 and a control circuit 606.When first device DUT not yet completes the flow process of principal and subordinate's detection with other devices, as shown in step 500, the transfer control circuit 602 of first device DUT is at interval of a period T, can produce one first pseudorandom code to the second device LP, wherein this first pseudorandom code is one first master control pseudorandom code M1PN or one first subordinate pseudorandom code S1PN.Specifically, the transfer control circuit 602 of first device DUT will produce random signal RND with pseudorandom generator 212 at interval of a period T, to decide first device DUT to transmit one first master control pseudorandom code M1PN or the first subordinate pseudorandom code S1PN to the second device LP by random signal RND, wherein the detailed operating instruction relevant for pseudorandom generator 212 please refer to above-mentioned paragraph, at this, seldom repeats.And when first device DUT transmits the first master control pseudorandom code M1PN based on random signal RND, the reception control circuit 604 of first device DUT carries out a specific comparison calculation with a reception signal RXDATA who receives with the first subordinate pseudorandom code S1PN and one second subordinate pseudorandom code S2PN respectively, yet, when first device DUT transmits the first subordinate pseudorandom code S1PN based on random signal RND, the reception control circuit 604 of first device DUT can carry out this specific comparison calculation with the reception signal RXDATA receiving with the first master control pseudorandom code M1PN and one second master control pseudorandom code M2PN respectively.For instance, can use the result of intercorrelation computing (cross correlation) whether to reach the foundation that a critical value is used as this specific comparison calculation, and because the intercorrelation operation values between the first subordinate pseudorandom code S1PN and the first master control pseudorandom code M1PN is very low, similarly, intercorrelation operation values between the second subordinate pseudorandom code S2PN and the first master control pseudorandom code M1PN is also very low, in other words, the pseudorandom code that this first pseudorandom code that first device DUT transmits must be used for the reception control circuit 604 of first device DUT carrying out this specific comparison calculation belongs to variety classes, therefore the pseudorandom code that this first pseudorandom code and being used for carries out this specific comparison calculation intercorrelation computing meeting each other approaches zero, that is to say, even if can receive the echo-signal that this first pseudorandom code rebounds and, can not cause erroneous judgement yet, therefore just do not need as in previous embodiment of the present invention yet, for avoiding receiving signal that first device DUT the sends out echo-signal of returning that rebounds itself, cause erroneous judgement, therefore after first device DUT transmits signal, control first device DUT and within a period, stop receiving signal.
In brief, the first master control pseudorandom code M1PN, the first master control pseudorandom code M1PN, the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN are the pseudorandom code determining in advance, and very low to guarantee the intercorrelation operation values between the first master control pseudorandom code M1PN and first subordinate pseudorandom code S1PN/ the second subordinate pseudorandom code S2PN via suitable design, and the intercorrelation operation values between the first subordinate pseudorandom code S1PN and first master control pseudorandom code M1PN/ the second master control pseudorandom code M2PN is very low, in addition, the random signal RND that first device DUT can produce according to pseudorandom generator 212 own optionally transmits the first master control pseudorandom code M1PN or the first subordinate pseudorandom code S1PN is used as the first above-mentioned pseudorandom code.
On the other hand, because the second device LP also has the principal and subordinate's testing circuit 600 shown in the 6th figure, therefore, the second device LP is similarly at interval of period T, can produce one second pseudorandom code to first device DUT, wherein this second pseudorandom code is the first master control pseudorandom code M1PN or the first subordinate pseudorandom code S1PN.Specifically, the transfer control circuit 202 of the second device LP will produce random signal RND with pseudorandom generator 212 at interval of a period T, and decides the second device LP to transmit the first master control pseudorandom code M1PN or the first subordinate pseudorandom code S1PN to first device DUT according to random signal RND.When the second device LP transmits the first master control pseudorandom code M1PN, the second device LP comes to carry out this specific comparison calculation with a reception signal RXADTA who receives with the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN respectively, yet, when the second device LP transmits the first subordinate pseudorandom code S1PN, the second device LP comes to carry out this specific comparison calculation, i.e. step 502 with the reception signal RXDATA receiving with the first master control pseudorandom code M1PN and the second master control pseudorandom code M2PN respectively.In brief, via suitable design, intercorrelation operation values between the first master control pseudorandom code M1PN and first subordinate pseudorandom code S1PN/ the second subordinate pseudorandom code S2PN is very low, and the intercorrelation operation values between the first subordinate pseudorandom code S1PN and first master control pseudorandom code M1PN/ the second master control pseudorandom code M2PN is very low, in addition, the random signal RND that the second device LP can produce according to pseudorandom generator 212 own optionally transmits the first master control pseudorandom code M1PN or the first subordinate pseudorandom code S1PN is used as the second above-mentioned pseudorandom code.
In step 504, if first device DUT first obtains the matching result of this specific comparison calculation than the second device LP, the control circuit 606 of first device DUT can carry out the first master control pseudorandom code M1PN or the first subordinate pseudorandom code S1PN that this specific comparison calculation is used according to first device DUT, first device DUT is set as to a master control set or a slave unit, and make first device DUT transmit one the 3rd pseudorandom code to the second device LP, wherein the 3rd pseudorandom code is the second master control pseudorandom code M2PN or the second subordinate pseudorandom code S2PN.For instance, when reception control circuit 604 is to obtain the matching result (first device DUT transmits the first master control pseudorandom code M1PN to the second device LP) of this specific comparison calculation with the first subordinate pseudorandom code S1PN, control circuit 606 can be set as a master control set by first device DUT, and follow-up the 3rd the transmitted pseudorandom code of this master control set is the second master control pseudorandom code M2PN; Yet, when reception control circuit 604 is while obtaining the matching result (first device DUT transmits the first subordinate pseudorandom code S1PN at present) of this specific comparison calculation with the first master control pseudorandom code S1PN, control circuit 606 can be set as a slave unit by first device DUT, and follow-up the 3rd the transmitted pseudorandom code of this slave unit is the second subordinate pseudorandom code S2PN.
Finally in step 506, when the second device LP receives the 3rd pseudorandom code, according to the 3rd pseudorandom code, the second device LP is set as to this master control set or this slave unit, when the 3rd pseudorandom code of wherein receiving as the second device LP is the second master control pseudorandom code M2PN, the control circuit 606 of the second device LP can be set as this slave unit by the second device LP; Yet when the 3rd pseudorandom code of receiving as the second device LP is the second subordinate pseudorandom code S2PN, the control circuit 606 of the second device LP can be set as this master control set by the second device LP.
For more detailed description operating process of the present invention, below the situation of utilizing actual capabilities to occur is used as to the illustrative example of the present embodiment.Please refer to Fig. 7, Fig. 7 is the sequential operation figure of another embodiment of principal and subordinate's testing circuit of the present invention.Wherein there are respectively two vertical lines the below of literal symbol DUT and literal symbol LP, it represents respectively the time shaft of first device DUT and the time shaft of the second device LP, represent from top to bottom the carrying out of time, and there is the time point of particular event in the representative of stain above time shaft.At the beginning, (for example the cable between first device DUT and the second device LP just just connects in not yet completing the state of principal and subordinate's testing mechanism for first device DUT and the second device LP, therefore, between first device DUT and the second device LP, not yet determine the distribution of master control set and slave unit), and the random signal RND=0 that the transfer control circuit 602 of first device DUT is used pseudorandom generator 212 to produce at time point t1, determine to send the first master control pseudorandom code M1PN, and the reception control circuit 604 of first device DUT can utilize the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN to come the signal RXDATA coming in reception to carry out respectively intercorrelation computing.In addition, the transfer control circuit 602 of the second device LP is also compared with time point t 1time point t a little later 2use pseudorandom generator 212 to produce random signal RND=0, decision sends the first master control pseudorandom code M1PN, and the reception control circuit 604 of the second device LP similarly can utilize the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN to come the signal RXDATA coming in reception to carry out respectively intercorrelation computing.At time point t 3time, the first master control pseudorandom code M1PN that first device DUT sends arrives the second device LP, but now the reception control circuit 604 of the second device LP is to utilize the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN to carry out respectively intercorrelation computing with the first master control pseudorandom code M1PN being received into, thereby can not obtain an intercorrelation operation values that is greater than critical value, in other words, this represents the first master control pseudorandom code M1PN that the second device LP receives into ignoring.Similarly, at time point t 4time, the first master control pseudorandom code M1PN that the second device LP sends arrives first device DUT, but now the reception control circuit 604 of first device DUT is to utilize the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN to carry out respectively intercorrelation computing with the first master control pseudorandom code M1PN being received into, thereby can not obtain an intercorrelation operation values that is greater than critical value, in other words, this represents the first master control pseudorandom code M1PN that first device DUT receives into ignoring.
Next, at time point t 5time, the last time of transmitting the first master control pseudorandom code M1PN of transfer control circuit 602 judging distance first device DUT of first device DUT (is time point t 1) interval time met the requirement equal period T, therefore at time point t 5use pseudorandom generator 212 to produce random signal RND=0, determine to send the first master control pseudorandom code M1PN, and the reception control circuit 604 of first device DUT can utilize the first subordinate pseudorandom code S1PN and the second subordinate pseudorandom code S2PN to come the signal RXDATA coming in reception to carry out respectively intercorrelation computing.On the contrary, at time point t 6time, the 602 last times of transmitting the first subordinate pseudorandom code S1PN of judging distances second device LP of transfer control circuit of the second device LP (are time point t 2) interval time met the requirement equal period T, therefore at time point t 6use pseudorandom generator 212 to produce random signal RND=1, decision sends the first subordinate pseudorandom code S1PN, and the reception control circuit 604 of the second device LP can utilize the first master control pseudorandom code M1PN and the second master control pseudorandom code M2PN to come the signal RXDATA coming in reception to carry out respectively intercorrelation computing.
At time point t 7time, the first master control pseudorandom code M1PN that first device DUT sends arrives the second device LP, and the reception control circuit 604 of the second device LP is at time point t 9time utilize intercorrelation computing to compare out one higher than the intercorrelation operation values of critical value, in other words, the reception control circuit 604 of the second device LP finds to receive the first master control pseudorandom code M1PN, now the control circuit 606 of the second device LP can be set as the second device LP slave unit (because now that the second device LP transmission is the first subordinate pseudorandom code S1PN), and require transfer control circuit 602 to change into and transmit the second subordinate pseudorandom code S2PN, in addition and stop with pseudorandom generator 212, producing the signal that random signal RND come stochastic transformation to transmit every period T.And first device DUT is at time point t 11time receive the second subordinate pseudorandom code S2PN, and the reception control circuit 604 of first device DUT is at time point t 13time utilize intercorrelation computing to compare out one higher than the intercorrelation operation values of critical value, in other words, the reception control circuit 604 of first device DUT finds to receive the second subordinate pseudorandom code S2PN, now the control circuit 606 of first device DUT can be set as first device DUT master control set (because that now first device DUT transmission is the first master control pseudorandom code M1PN), and require transfer control circuit 602 to change into and transmit the second master control pseudorandom code M2PN, in addition and stop with pseudorandom generator 212, producing the signal that random signal RND come stochastic transformation to transmit every period T.Finally, at first device DUT and the second device LP, respectively after definite master control set or slave unit, passed through a period T 2PNobservation, just can confirm that line is in stable state, and by continuing, carry out the transmission of follow-up particular sequence IDLE, relevant for the detailed description of particular sequence IDLE, because the operating principle in the paragraph with is before identical, therefore seldom repeat at this.
The present invention also can be via simple setting, and automatic principal and subordinate's testing mechanism is originally changed into hand-operated forced setting.For instance, can force the transfer control circuit of first device DUT not send certain pulses LPB, therefore the second device LP can receive certain pulses LPB scarcely, in this case, if the second device LP has normal principal and subordinate's measuring ability, first device DUT can receive qualified continuous 3 certain pulses LPB sooner or later and first device DUT is set as to master control set, in other words, forcing the transfer control circuit of first device DUT not send certain pulses LPB namely forces first device DUT to be set as master control set.Or be, can force the reception control circuit of first device DUT not check certain pulses LPB, therefore first device DUT can receive certain pulses LPB scarcely, in this case, if the second device LP has normal principal and subordinate's measuring ability, the second device LP can receive qualified continuous 3 certain pulses LPB sooner or later and the second device LP is set as to master control set, in other words, force the reception control circuit of first device DUT not check that certain pulses LPB namely forces first device DUT to be set as slave unit.Give one example again, if force respectively the transfer control circuit of first device DUT and the second device LP not send certain pulses LPB, namely force first device DUT and the second device LP to be set as respectively master control set, well imagine, because first device DUT and the second device LP are forced to be set as master control set, cannot line under this situation.
The present invention can make the list of Fast Ethernet overcome the problem of collision (collision) and carry out automatic principal and subordinate's testing mechanism two devices without covering in twisted pair system, in other words, the present invention proposes a kind of automatic principal and subordinate's testing mechanism, by single, two devices without covering in twisted pair system is assigned as to master control set and slave unit, thus, list is significantly improved the availability without covering twisted pair system, and alleviated cable cost and the weight of system.
The foregoing is only the preferred embodiments of the present invention, all equalizations of doing according to the claims in the present invention change and modify, and all should belong to covering scope of the present invention.

Claims (15)

1. principal and subordinate's detection method, includes:
Determine whether a first device transmits certain pulses signal to one second device;
Determine whether described the second device transmits described certain pulses signal to described first device;
When described first device is first received at least a portion signal of described certain pulses signal than described the second device, described first device is set as to a master control set, and makes described master control set stop transmitting described certain pulses signal and start to transmit a particular sequence; And
When described the second device is received described particular sequence, described the second device is set as to a slave unit.
2. principal and subordinate's detection method according to claim 1, wherein, determines that the step whether described first device transmits described certain pulses signal includes:
At interval of a period, with random fashion, decide described first device whether to transmit described certain pulses signal to described the second device; And
Determine that the step whether described the second device transmits described certain pulses signal includes:
At interval of a period, with random fashion, decide described the second device whether to transmit described certain pulses signal to described first device.
3. according to the principal and subordinate's detection method described in claim 2, also include:
After described first device transmits extremely described the second device of described certain pulses signal, in a period, stop described first device and receive signal; And
At described the second device, transmit described certain pulses signal to after described first device, in a period, stop described the second device and receive signal.
4. principal and subordinate's detection method according to claim 1, wherein, described first device and described the second device are arranged in a line transmission system, and described line transmission system is one single to line Ethernet system.
5. principal and subordinate's detection method according to claim 1, wherein, described certain pulses signal includes a plurality of Sing plus, and described at least a portion signal includes continuous Sing plus.
6. principal and subordinate's detection method, includes:
With a first device, periodically transmit one first pseudorandom code to the second device, wherein said the first pseudorandom code is one first master control pseudorandom code or one first subordinate pseudorandom code, when described first device transmits described the first master control pseudorandom code, described first device carries out a specific comparison calculation with the signal receiving with described the first subordinate pseudorandom code and one second subordinate pseudorandom code respectively, and when described first device transmits described the first subordinate pseudorandom code, described first device carries out described specific comparison calculation with the signal receiving with described the first master control pseudorandom code and one second master control pseudorandom code respectively,
With described the second device, periodically transmit one second pseudorandom code to described first device, wherein said the second pseudorandom code is described the first master control pseudorandom code or described the first subordinate pseudorandom code, when described the second device transmits described the first master control pseudorandom code, described the second device carries out described specific comparison calculation with the signal receiving with described the first subordinate pseudorandom code and described the second subordinate pseudorandom code respectively, and when described the second device transmits described the first subordinate pseudorandom code, described the second device carries out described specific comparison calculation with the signal receiving with described the first master control pseudorandom code and described the second master control pseudorandom code respectively,
When described first device first obtains the matching result of described specific comparison calculation than described the second device, according to described first device, carry out described the first pseudorandom code that described specific comparison calculation uses described first device is set as to a master control set or a slave unit, and make described first device transmit one the 3rd pseudorandom code to described the second device; And
When described the second device is received described the 3rd pseudorandom code, according to described the 3rd pseudorandom code, described the second device is set as to described master control set or described slave unit.
7. principal and subordinate's detection method according to claim 6, wherein, the step that periodically transmits described the first pseudorandom code with described first device includes:
At interval of a period, with random fashion, decide described first device to transmit described the first master control pseudorandom code or extremely described the second device of described the first subordinate pseudorandom code; And
By the step that described the second device periodically transmits described the second pseudorandom code, include:
At interval of a period, with random fashion, decide described the second device described the first master control pseudorandom code of transmission or described the first subordinate pseudorandom code to described first device.
8. principal and subordinate's detection method according to claim 6, wherein, described first device and described the second device are arranged in a line transmission system, and described line transmission system is one single to line Ethernet system.
9. principal and subordinate's detection method according to claim 6, wherein, described specific comparison calculation is an intercorrelation computing.
10. according to the principal and subordinate's detection method described in claim 6, wherein, described the 3rd pseudorandom code is described the second master control pseudorandom code or described the second subordinate pseudorandom code; When described first device is set as described master control set, described the 3rd pseudorandom code that described master control set transmits is described the second master control pseudorandom code; When described first device is set as described slave unit, described the 3rd pseudorandom code that described slave unit transmits is described the second subordinate pseudorandom code.
11. principal and subordinate's detection methods according to claim 10, wherein, when described the second described the 3rd pseudorandom code of receiving of device is described the second master control pseudorandom code, described the second device can be set as described slave unit; And when described the second described the 3rd pseudorandom code of receiving of device is described the second subordinate pseudorandom code, described the second device can be set as described master control set.
12. 1 kinds of principal and subordinate's testing circuits, include:
One transfer control circuit, is used for periodically determining whether a device transmits a certain pulses signal and install to another;
One reception control circuit, is used for judging whether described device receives at least a portion signal of described certain pulses signal;
One control circuit, be used for when described device receives at least a portion signal of described certain pulses signal, described device is set as to a master control set, and make described master control set stop transmitting described certain pulses signal and start to transmit a particular sequence, or when described device receives described particular sequence, described device is set as to a slave unit.
13. principal and subordinate's testing circuits according to claim 12, wherein, described transfer control circuit includes:
One pseudorandom generator, was used at interval of a period, decides described device whether to transmit described certain pulses signal install to another with random fashion.
14. principal and subordinate's testing circuits according to claim 13, also include:
One echo preventing circuit, is used for transmitting described certain pulses signal to another device at described device, is installed on described in control and in the period, stops receiving signal.
15. principal and subordinate's testing circuits according to claim 12, wherein, described device is arranged in a line transmission system, and described line transmission system is that a list is to line Ethernet system.
CN201310084423.1A 2013-03-15 2013-03-15 Principal and subordinate's detection method and principal and subordinate's detection circuit Active CN104052615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310084423.1A CN104052615B (en) 2013-03-15 2013-03-15 Principal and subordinate's detection method and principal and subordinate's detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310084423.1A CN104052615B (en) 2013-03-15 2013-03-15 Principal and subordinate's detection method and principal and subordinate's detection circuit

Publications (2)

Publication Number Publication Date
CN104052615A true CN104052615A (en) 2014-09-17
CN104052615B CN104052615B (en) 2017-06-09

Family

ID=51505000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310084423.1A Active CN104052615B (en) 2013-03-15 2013-03-15 Principal and subordinate's detection method and principal and subordinate's detection circuit

Country Status (1)

Country Link
CN (1) CN104052615B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069452A1 (en) * 2004-09-29 2006-03-30 Siemens Aktiengesellschaft Configuration of modules in automation systems
CN101257405A (en) * 2008-04-03 2008-09-03 中兴通讯股份有限公司 Method for implementing double chain circuits among master-salve equipments
US20110289176A1 (en) * 2009-11-27 2011-11-24 Panasonic Corporation Master device, slave device and communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069452A1 (en) * 2004-09-29 2006-03-30 Siemens Aktiengesellschaft Configuration of modules in automation systems
CN101257405A (en) * 2008-04-03 2008-09-03 中兴通讯股份有限公司 Method for implementing double chain circuits among master-salve equipments
US20110289176A1 (en) * 2009-11-27 2011-11-24 Panasonic Corporation Master device, slave device and communication system

Also Published As

Publication number Publication date
CN104052615B (en) 2017-06-09

Similar Documents

Publication Publication Date Title
CN103416035B (en) There is the microcontroller of CAN module and auto-speed detection
CN103414547B (en) A kind of main website controls method, main website and the system of many slave stations
US6530029B1 (en) I2C/SMBus start-stop detecting circuit that reduces the likelihood of stalling the bus due to glitches on the data line
CN102032927B (en) System for testing sensitivity of automobile instrument with controller area network (CAN) bus and testing method thereof
CN101180837A (en) Method and devices for transmitting data to a data line between a control appliance and a decentralised data processing appliance
CN105340223A (en) Apparatus and measurement method for ascertaining the internal delay time of a CAN bus access unit
CN104702598B (en) A kind of intelligent grid distributed networking protocol safety detecting method
TWI492576B (en) Master-slave detection method and master-slave detection circuit
CN102882756A (en) Transmitting-receiving apparatuses and methods for transmitting and receiving data
CN100553256C (en) A kind of monobus communication means of a plurality of node equipment interconnections
CN108293014A (en) Communication network, its operating method and participant in a communication network
CN108140002A (en) The serial peripheral interface generated with the selection of automatic slave unit
KR101669397B1 (en) Distance measurement device and distance measurement method
CN110266568A (en) The method that data are transmitted in the member stations and serial bus system of serial bus system
CN104734900B (en) A kind of sending control method of communication protocol test
CN107102637B (en) The method that bus signals failure simulation device based on CAN generates fault-signal
CN104052615A (en) Master-slave detection method and master-salve detection circuit
CN107294762B (en) Telecommunication system for programmable logic controller
JP2013093827A (en) Communication system, communication device, communication method, and communication parameter determining method
US10361838B2 (en) Two-wire communication interface system
US11610034B2 (en) Method and device for synchronizing a simulation with a real-time system
CN104615573A (en) Communication method and device
CN109672998A (en) Bluetooth online building method
US7844751B2 (en) Data transmission and processing system with reliable acquisition of critical states
CN109313616A (en) Asynchronous feedback training

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant