[go: up one dir, main page]

CN101132287B - Method and apparatus for implementing Ethernet link building and package receiving and sending indication - Google Patents

Method and apparatus for implementing Ethernet link building and package receiving and sending indication Download PDF

Info

Publication number
CN101132287B
CN101132287B CN2007101225498A CN200710122549A CN101132287B CN 101132287 B CN101132287 B CN 101132287B CN 2007101225498 A CN2007101225498 A CN 2007101225498A CN 200710122549 A CN200710122549 A CN 200710122549A CN 101132287 B CN101132287 B CN 101132287B
Authority
CN
China
Prior art keywords
led lamp
cpld
link setup
transmitting
receiving
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.)
Active
Application number
CN2007101225498A
Other languages
Chinese (zh)
Other versions
CN101132287A (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.)
ZTE Corp
Original Assignee
ZTE 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 ZTE Corp filed Critical ZTE Corp
Priority to CN2007101225498A priority Critical patent/CN101132287B/en
Publication of CN101132287A publication Critical patent/CN101132287A/en
Application granted granted Critical
Publication of CN101132287B publication Critical patent/CN101132287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Optical Communication System (AREA)

Abstract

This invention discloses a method for realizing set-up of chains of Ethernet and instruction of T-R packets including: CPU determines if it sets up chains based on the information got from the PHY chip and writes the information of setting up chains into a CPLD, which drives lighting a LED based on the information and tests if it has received pulse of the sending-receiving packet and drives glittering of the LED after receiving the pulse and processing time delay and fixed frequency. This invention also discloses a device for setting up chains and realizing instruction of sending-receiving packets.

Description

A kind of method and device of realizing Ethernet link setup and the indication of transmitting-receiving bag
Technical field
The present invention relates to ethernet communication indication technology, particularly relate to a kind of method and device of realizing Ethernet link setup and the indication of transmitting-receiving bag.
Background technology
Along with networks development and universal, Ethernet becomes popular local area network technology with advantages such as its low cost, high reliability, simple installation, the easy and easy expansions of maintenance, and, along with the ether entoilage is updated, improving constantly of speed, its range of application also expands to metropolitan area network from local area network (LAN).
Ethernet physical layer (PHY) chip be in the ethernet device with the chip of external signal interface, being mainly used in provides the access of Ethernet passage.At present, most of Ethernet PHY chips can indicate whether link setup, and can pass through light-emitting diode (LED, Light Emitting Diode) information of transmitting-receiving bag is indicated in the flicker of indicator light, but the mode and the disunity of indication, the different LED lamp of the employing that has is indicated link setup and transmitting-receiving bag respectively, LED lamp indication of the employing that has.In addition, also the Ethernet interface of some Ethernet PHY chip or part private communication chip owing to the problem of Interface design, can not be indicated link setup and transmitting-receiving package informatin, or can not indicate very completely.
On the whole, can existing Ethernet PHY chip exist the main problem of two classes aspect the package informatin indicating link setup and receive and dispatch:
The first, can not meet user operation habits fully.Generally, user's operational requirements is to use a LED lamp, and when the Ethernet link setup, the LED lamp can be bright, and when the transmitting-receiving bag, the LED lamp can glimmer.But in the present practical application, LED lamp indication of the employing that has, a plurality of LED lamp indications of the employing that has, and disunity.
The second, can not be perfect make indication.Though chip itself can provide the user whether link setup and whether the specific indication information of transmitting-receiving bag is arranged, these information can not directly be provided on the user interface by simple circuit.Reason is: on the one hand, owing to there is not dedicated pin, specific indication information can't directly transmit and indicate, for example: the PHY chip BCM8705 of the 10G of BROADCOM company, owing to do not have to indicate by LED specially the pin of link setup and transmitting-receiving bag, when pack receiving and transmitting, can only send the pulse that 100us is logical, 100us breaks by general input and output (GPIO) pin, if adopt such signal driving LED, be difficult to differentiate such flash signal by naked eyes.On the other hand, need read special register, such as: among the BCM8705, link setup has only the internal register that reads chip by software just can know.
Though, also can adopt the mode of sending the driving LED order by software to come the indication of realization information, but do like this, just need CPU to monitor the variation of GPIO pin signal in real time, and the frequency of this variation is very fast, generally may be 100us, this change frequency speed of service basic and CPU is suitable, like this, if CPU will react all pulse change, just can't handle other anything basically, not only expend a large amount of cpu resources, and for the heavier veneer of CPU burden, the cost of paying is bigger.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method and device of realizing Ethernet link setup and the indication of transmitting-receiving bag, can solve some Ethernet PHY chip information indication imperfections, and the indication of LED lamp does not meet the problem of user operation habits.
For achieving the above object, technical scheme of the present invention is achieved in that
The present invention proposes a kind of method that realizes Ethernet link setup and the indication of transmitting-receiving bag, comprising:
CPU determines whether link setup according to the information of obtaining from PHY chip, and when determining link setup, CPU writes programmable logic device (CPLD) with the link setup information of obtaining, and CPLD is bright according to the link setup information-driven LED lamp that obtains;
CPLD detects whether receive that from the PHY chip expression has the transmitting-receiving bag pulse of transmitting-receiving package informatin, when receiving the pulse of transmitting-receiving bag, and through the processing of time-delay or fixed frequency, the flicker of driving LED lamp.
This method further comprises: after the flicker of CPLD driving LED lamp, if do not receive the pulse of transmitting-receiving bag in the setting-up time section, then the driving LED lamp switches to Chang Liang.
This method further comprises: preestablish to be used to detect receive and dispatch and wrap the time period length whether pulse sends continuously.Wherein, described time period length span is 2 seconds to 5 seconds.
In the such scheme, described LED lamp flicker is for the response flicker or be the fixed frequency flicker.
In the such scheme, described driving LED flicker is specially: initialization counter value is 0; Enabling counting when receiving first transmitting-receiving bag pulse, and be flicker cycle length one half at Counter Value, to the negate of LED lamp indicating status; When Counter Value is flicker cycle length, to the negate of LED lamp indicating status, simultaneously to the Counter Value zero clearing.Accordingly, this method further comprises: preestablish the Counter Value of corresponding flicker cycle length, described counter span is 0.2 second to 0.5 second.
The present invention also proposes a kind of device of realizing Ethernet link setup and the indication of transmitting-receiving bag, comprises CPU, PHY chip and a LED lamp; Key is that this device also comprises CPLD, is connected between CPU, PHY chip, the LED lamp, is used for obtaining link setup information from CPU, detect and whether receive that from the PHY chip expression has the transmitting-receiving bag pulse of transmitting-receiving package informatin, and the indicating status of control LED lamp;
Accordingly, CPU is used for reading link setup information from the internal register of PHY chip, and the link setup information of obtaining is write CPLD.
Wherein, the address wire and the data wire of described PHY chip are connected to CPU, and the part address wire of CPU links to each other with the IO pin of CPLD with data wire; Be used to indicate the GPIO pin of receiving and dispatching bag to be connected to the IO pin of CPLD on the described PHY chip; The IO pin of described CPLD links to each other with the LED lamp.
The method and the device of realization Ethernet link setup provided by the present invention and the indication of transmitting-receiving bag, between CPU and GPIO pin, be provided with and be connected programmable logic device (CPLD), CPU only needs to obtain link setup information and write CPLD by the internal register that reads the PHY chip, is come the indication of driving LED lamp by CPLD.And CPLD is shown with the pulse signal of GPIO on the PHY chip of receiving and dispatching bag by direct monitoring form, and handles.So, just can realize the deixis of Ethernet link setup and transmitting-receiving bag, not only remedy the incomplete defective of part communication process chip Ethernet interface LED lamp deixis by CPLD; And, not needing to expend a lot of cpu resources, can meet consumers' demand well again, need not manual intervention, with low cost, and implement simple and convenient relatively.
Description of drawings
Fig. 1 switches schematic diagram for state among the present invention;
Fig. 2 is the realization flow schematic diagram of the inventive method;
Fig. 3 is a flicker control flow schematic diagram in the inventive method.
Embodiment
Basic thought of the present invention is: be provided with between CPU and GPIO pin and be connected CPLD, the internal register of being responsible for reading the PHY chip by CPU obtains information and writes CPLD, be shown with the pulse signal of GPIO on the PHY chip of transmitting-receiving bag by CPLD by direct monitoring form and handle, and the indication that comes the driving LED lamp by CPLD, by the control of CPLD, make a LED lamp that is adopted to indicate link setup and transmitting-receiving package informatin by user operation habits.
The device of realization Ethernet link setup provided by the present invention and the indication of transmitting-receiving bag comprises CPU, PHY chip, CPLD and a LED lamp.Wherein, the PHY chip is used to provide link setup information and transmitting-receiving package informatin; CPU is used for reading link setup information from the internal register of PHY chip, and the link setup information of obtaining is write the internal register of CPLD; CPLD is used for obtaining link setup information from CPU, obtains the transmitting-receiving package informatin from the PHY chip, and the indicating status of control LED lamp.Concrete, the address wire and the data wire of PHY chip are connected to CPU, and the part address wire of CPU links to each other with the IO pin of CPLD with data wire; Be used to indicate the GPIO pin of receiving and dispatching bag to be connected to the IO pin of CPLD on the PHY chip, the IO pin of CPLD links to each other with the LED lamp, and the driving LED lamp is indicated.
In the practical application, for link setup information, the PHY chip is kept in the register of self after receiving link setup information, the internal register that CPU reads the PHY chip obtains this link setup information, again the link setup information of being obtained is write the internal register of CPLD, CPLD can obtain described link setup information, the bright link setup of indicating of CPLD driving LED lamp then, and LED keeps bright state.
For the transmitting-receiving package informatin, when the transmitting-receiving package informatin was arranged, the PHY chip just provided the low level pulse of 100us width for CPLD, after CPLD receives the pulse of transmitting-receiving bag, can control the LED lamp and carry out the light on and off flicker, and expression is just at the transceive data bag.
In fact, LED lamp of the present invention relates generally to three states: the state of turning off the light, blink states and bright lamp hold mode, with these three states one to one information state be: not link setup state, transmitting-receiving bag state and link setup but do not receive and dispatch the bag state.Therefore, the present invention has set three state machines in CPLD, as shown in Figure 1, comprising: the state of turning off the light, bright lamp hold mode and blink states.When CPLD is in that the link setup state is not received link setup information, switch to bright lamp hold mode from the state of turning off the light.When CPLD is in bright lamp hold mode,, then switch to blink states from bright lamp hold mode if receive the pulse of transmitting-receiving bag; If receive chain rupture information, then switch to the state of turning off the light from bright lamp hold mode.When CPLD is in blink states,, then switch to the state of turning off the light from blink states if receive chain rupture information; If do not receive the pulse of transmitting-receiving bag at the appointed time, then switch to bright lamp hold mode from blink states.
Here, can set in advance the timer that duration is M for the described fixed time, this timer starts when entering blink states, initialization timing device when at every turn receiving the pulse of transmitting-receiving bag, if timer expiry was not received transmitting-receiving bag pulse, then switching state in illustrating at the appointed time.The described fixed time also can passing threshold be that the counter of M is finished, this counter begins counting when entering blink states, receive the zero clearing of transmitting-receiving bag pulse hour counter, if counter reaches threshold value at every turn, do not receive transmitting-receiving bag pulse, then switching state in illustrating at the appointed time.
Based on state exchange shown in Figure 1, the present invention realizes the detailed process of Ethernet link setup and the indication of transmitting-receiving bag, as shown in Figure 2, may further comprise the steps:
Step 201: during current not link setup, the LED lamp goes out.
Step 202~203:CPU is by reading the internal register of PHY chip, and whether real-time judge link setup, if do not read link setup information, then link setup not return step 202 and continue to judge, and the LED lamp keeps going out;
If CPU reads link setup information, then represent link setup, CPU output low level then writes the internal register of CPLD with the link setup information of obtaining, and after CPLD obtained link setup information, the driving LED lamp was bright.
Whether the real-time detection of step 204~205:CPLD receives the pulse of transmitting-receiving bag, if having, then the driving LED lamp begins or keeps flicker, and step 204 is returned in the clock zero clearing; Otherwise, execution in step 206.
Step 206~208: judge whether to arrive the fixed time, if then the driving LED lamp switches to Chang Liang, returns step 204; Otherwise, increase timing, return step 204.
Here, the fixed time can be that the timer of M or counter that threshold value is M are used as clock by setting duration, and the value of M is than broad, from 2s to 5s all in the scope of considering.
Among the present invention, need take the rate behavior of Ethernet into consideration to the control of LED lamp flicker frequency, such as: when sending the bag of 10M, 1000M speed, if directly transmitting-receiving bag pulse indication is received on the LED lamp, will be owing to pulse frequency is too high, make the user only see that LED is bright, can't reach the effect of flicker; And when the PC ping Ethernet interface, because the LED pulse is narrow, the user also can't see flickering effect.Therefore, can adopt two kinds of flashing modes among the present invention: a kind of is the response flicker, and a kind of is the fixed frequency flicker.Concrete, can set in advance a speed thresholding, for the bag of the transmitting-receiving at a slow speed situation that is lower than threshold value, can be by the FREQUENCY CONTROL LED lamp flicker of reality transmitting-receiving bag; Two-forty transmitting-receiving bag situation for surpassing thresholding can adopt the fixed frequency flicker, just controls the LED lamp and glimmers by some cycles, as long as the pulse duration of control flicker can the driving LED lamp, and can reach the discernmible scintillation time length of human eye and gets final product.
In order to control flicker frequency, the counter that need to preestablish a numerical value be N goes out at the bright half the time of N value time corresponding section inner control LED lamp half the time, and the N value can be regarded flicker cycle length as.To between the 0.5s, because be generally less than 0.2s, human eye just can't be differentiated the N/2 flicker of 0.1s just to the scope of N value at 0.2s; Will feel that greater than 0.5s flicker is too slow.
As shown in Figure 3, concrete LED lamp flicker control flow may further comprise the steps:
Step 301: to Counter Value N zero clearing, here, the initial indicating status of LED lamp is bright.
Step 302: judge whether to receive the pulse of transmitting-receiving bag, if receive, then execution in step 303; If do not receive, return step 302 and continue to judge.
Step 303~304: judge whether N is 0, if, then enabling counting, the LED lamp maintains the original state, and returns step 302; Otherwise, execution in step 305.
Step 305~306: judge whether Counter Value arrives N/2, if equal N/2, then N continues counting, and the LED negate is bright before the LED lamp that is:, becomes this moment to go out; For going out, brighten this moment, returns step 302 before; If less than N/2, the LED lamp maintains the original state, and returns step 302; If greater than N/2, then execution in step 307.
Step 307~308: judge whether Counter Value arrives N, if step 301 is returned in then LED negate; Otherwise the LED lamp maintains the original state, and returns step 302.
In the flicker control procedure, do not accept the pulse of any transmitting-receiving bag.Generally, if Counter Value N is provided with suitably, also can not distinguish fixed frequency flicker and response flicker, because minimum response flicker cycle is N.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.

Claims (9)

1. realize the Ethernet link setup and receive and dispatch the method that bag is indicated for one kind, it is characterized in that this method comprises:
CPU determines whether link setup according to the information of obtaining from PHY chip, and when determining link setup, CPU writes programmable logic device (CPLD) with the link setup information of obtaining, and CPLD is bright according to the link setup information-driven LED lamp that obtains;
CPLD detects whether receive that from the PHY chip expression has the transmitting-receiving bag pulse of transmitting-receiving package informatin, when receiving the pulse of transmitting-receiving bag, and through the processing of time-delay or fixed frequency, the flicker of driving LED lamp.
2. method according to claim 1 is characterized in that, this method further comprises: after the flicker of CPLD driving LED lamp, if do not receive the pulse of transmitting-receiving bag in the setting-up time section, then the driving LED lamp switches to Chang Liang.
3. method according to claim 2 is characterized in that, this method further comprises: preestablish to be used to detect receive and dispatch and wrap the time period length whether pulse sends continuously.
4. method according to claim 3 is characterized in that, described time period length span is 2 seconds to 5 seconds.
5. method according to claim 1 is characterized in that, described LED lamp flicker is for the response flicker or be the fixed frequency flicker.
6. method according to claim 1 is characterized in that, described driving LED flicker is specially:
Initialization counter value is 0; Enabling counting when receiving first transmitting-receiving bag pulse, and be flicker cycle length one half at Counter Value, to the negate of LED lamp indicating status; When Counter Value is flicker cycle length, to the negate of LED lamp indicating status, simultaneously to the Counter Value zero clearing.
7. method according to claim 6 is characterized in that, this method further comprises: preestablish the Counter Value of corresponding flicker cycle length, described counter span is 0.2 second to 0.5 second.
8. a device of realizing Ethernet link setup and the indication of transmitting-receiving bag comprises CPU, PHY chip and a LED lamp; It is characterized in that this device also comprises CPLD, be connected between CPU, PHY chip, the LED lamp, be used for obtaining link setup information, detect and whether receive that from the PHY chip expression has the transmitting-receiving bag pulse of transmitting-receiving package informatin from CPU, and the indicating status of control LED lamp;
Accordingly, CPU is used for reading link setup information from the internal register of PHY chip, and the link setup information of obtaining is write CPLD.
9. device according to claim 8 is characterized in that, the address wire and the data wire of described PHY chip are connected to CPU, and the part address wire of CPU links to each other with the IO pin of CPLD with data wire;
Be used to indicate the GPIO pin of receiving and dispatching bag to be connected to the IO pin of CPLD on the described PHY chip;
The IO pin of described CPLD links to each other with the LED lamp.
CN2007101225498A 2007-09-26 2007-09-26 Method and apparatus for implementing Ethernet link building and package receiving and sending indication Active CN101132287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101225498A CN101132287B (en) 2007-09-26 2007-09-26 Method and apparatus for implementing Ethernet link building and package receiving and sending indication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101225498A CN101132287B (en) 2007-09-26 2007-09-26 Method and apparatus for implementing Ethernet link building and package receiving and sending indication

Publications (2)

Publication Number Publication Date
CN101132287A CN101132287A (en) 2008-02-27
CN101132287B true CN101132287B (en) 2011-07-13

Family

ID=39129420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101225498A Active CN101132287B (en) 2007-09-26 2007-09-26 Method and apparatus for implementing Ethernet link building and package receiving and sending indication

Country Status (1)

Country Link
CN (1) CN101132287B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102255763A (en) * 2011-08-30 2011-11-23 迈普通信技术股份有限公司 Network communication anomaly alarming method and Ethernet switch equipment
CN104394070B (en) * 2014-11-13 2018-05-18 安徽一拓通信科技集团股份有限公司 Intelligent connection device for short message gateway
CN107729039B (en) * 2017-09-15 2023-05-26 西南电子技术研究所(中国电子科技集团公司第十研究所) Loading mode selection circuit of embedded operating system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6243020B1 (en) * 1997-02-14 2001-06-05 Advanced Micro Devices, Inc. Method and apparatus for programmably driving an LED display
CN2641935Y (en) * 2003-08-18 2004-09-15 华为技术有限公司 Ethernet interface device
CN1553637A (en) * 2003-05-29 2004-12-08 烽火通信科技股份有限公司 Fault indicating technology for Ethernet optical fibre transceiver
CN2697961Y (en) * 2004-04-12 2005-05-04 上海粱江通信软件有限公司 Signalling data processor
CN2831322Y (en) * 2005-08-25 2006-10-25 南京德普达电子技术有限公司 Embedded all-color LED displaying controller

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6243020B1 (en) * 1997-02-14 2001-06-05 Advanced Micro Devices, Inc. Method and apparatus for programmably driving an LED display
CN1553637A (en) * 2003-05-29 2004-12-08 烽火通信科技股份有限公司 Fault indicating technology for Ethernet optical fibre transceiver
CN2641935Y (en) * 2003-08-18 2004-09-15 华为技术有限公司 Ethernet interface device
CN2697961Y (en) * 2004-04-12 2005-05-04 上海粱江通信软件有限公司 Signalling data processor
CN2831322Y (en) * 2005-08-25 2006-10-25 南京德普达电子技术有限公司 Embedded all-color LED displaying controller

Also Published As

Publication number Publication date
CN101132287A (en) 2008-02-27

Similar Documents

Publication Publication Date Title
CN101132287B (en) Method and apparatus for implementing Ethernet link building and package receiving and sending indication
KR102579223B1 (en) Daisy chain two-wire sensor measurement system and method
CN104682214A (en) Intelligent power supply control box
CN101478460A (en) FlexRay-CAN communication gateway and implementing method
CN104750567A (en) Watchdog reset method based on FPGA
CN101971642A (en) Communication system
CN201035559Y (en) Coprocessor condition monitoring apparatus
CN105070019A (en) Remote household monitor system based on power line carriers
CN100596357C (en) Data translation device and system based on ethernet and serial communication technology
CN110069437A (en) RS-485 bus polarity self-adaption method based on response frame validity
CN103825594A (en) Power failure detection circuit based on field programmable gate array (FPGA) network management system and detection method
CN102255763A (en) Network communication anomaly alarming method and Ethernet switch equipment
CN109218005A (en) A kind of parallel detecting method of the ethernet device of no auto-negotiation signal
CN202309712U (en) Optical power monitoring terminal with GPRS (General Packet Radio Service) remote data transmission function
CN106066837A (en) A kind of BISS C agreement general purpose controller based on FPGA
CN104022817B (en) A kind of method and device of ONU equipment registration lighting
CN110136621A (en) The display of reduction central processing unit mouth line resource and key scanning method and device
CN207319048U (en) Pipeline stall positions and remote alarming device
CN203320209U (en) Control circuit of broken-yarn detecting device
CN108011662A (en) An optical module and monitoring method thereof
CN101847132B (en) Method for implementing serial FLASH memory and switch multiplexing I/O line and key device
CN115421801B (en) Method and system for configuring external parameters through serial port
CN102769970B (en) For node apparatus and the LED lamplight network topology structure of LED lamplight net control
CN103529284B (en) An overcurrent detector with master-slave multi-machine communication function based on CPLD
CN102030018A (en) Attached peripheral data acquisition and distribution device for axis counting system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant