1. Field of the Invention
The present invention relates to a remote control method and related device, and more particularly, to a method of remotely controlling or negotiating with a remote physical layer device.
2. Description of the Prior Art
Based on the specifications defined by the international organization for standard (ISO), the open system interconnection (OSI) model divides network architecture into seven layers which, from top to bottom, are an application layer, a presentation layer, a session layer, a transport layer, a network layer, link layer and a physical layer. In a communication device, the physical layer detects and receives packets. Then an upper layer, such as the link layer or the network layer, interprets the contents included in the packet. Generally, packets contain user data and parameters for each layer.
In a packet, controlling parameters, corresponding to the link layer (e.g. a media access control (MAC) layer), is used for controlling functions of the physical layer and detecting devices from a network, for example, rewriting data stored in a register of the physical layer or changing functions of the physical layer. However, the physical layer and the link layer usually are implemented in different chips. Moreover, even in the same communication device, parameters (e.g. chip identification number) are set in different ways since physical layer chips and link layer chips are manufactured by different manufacturers. In this situation, the link layer chips are not able to decode the packet received from the physical layer chips. This, therefore, is an obstacle to developments on communication products.
For example, communication devices A and B use the physical layer chips manufactured by company C and the link chips manufactured by D. When the communication device A sends the communication device B a packet, the sent packet includes the physical layer parameter settings from the company C. After the physical layer chip in the communication device B receives and detects the packet, the link layer chip in the communication device B starts decoding the packet. Since the link layer chip, manufactured by the company D, can not recognize the physical layer parameter settings from the company C, the packet sent by the communication device A, will be discarded.
According to the prior art, the physical layer only detects, receives, and uploads packets. After decoding the packets, upper layers command the physical layer to control corresponding functions of the physical layer. Thus, the local physical layer is not able to communicate with the remote physical layer directly. Controlling the physical layers can be achieved only by taking orders from upper layers.
It is therefore an objective of the present invention to provide a method to control or negotiate with a remote physical layer for a local physical layer and provide a related physical layer device.
The present invention discloses a remote control method for a local physical layer to control or negotiate with a remote physical layer. The remote control method includes receiving a packet, determining a coding of the packet to generate a first determining result according to a packet format, determining an identification of the packet to generate a second determining result according to the packet format, discarding the packet according to the first determining result and the second determining result or decoding the packet to generate a decoding result according to a packet format, and controlling or negotiating with a remote physical layer according to the decoding result.
The present invention further discloses a physical layer device with function of controlling or negotiating with a remote physical layer. The physical layer device includes a receiver, a first determining unit, a second determining unit, a processing unit, and a control unit. The receiver is used for receiving a packet. The first determining unit is used for determining a coding of the packet to generate a first determining result. The second determining unit is used for determining an identification of the packet to generate a second determining result. The processing unit is used for discarding the packet according to the first determining result and the second determining result, or decoding the packet to generate a decoding result according to a packet format. The control unit is used for controlling or negotiating with a remote physical layer according the decoding result.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Please refer to
According to one of embodiments of the present invention, the physical layer device 10 is applied to an Ethernet. In this situation, the packet format PKFT is an Ethernet packet format. Regarding the coding determination, the first determining unit 102 checks if a cyclical redundancy check (CRC) code included in the packet PK_rcv is correct and generates the first determining result DRE1, according to the packet format PKFT. As for the identification determination, the second determining unit 103 checks an ether type of the packet PK_rcv to generate the second determining result DRE2, according to the packet format PKFT. When the first determining result DRE1 and the second determining result DRE2 both indicate that the coding and the identification of the packet PK_rcv are correct, this means that the packet PK_rcv can be decoded by the local physical layer. Then the processing unit 105 decodes the packet PK_rcv to generate the decoding result INTDATA according to the packet format PKFT. On the contrary, when either the first determining result DRE1 or the second determining result DREZ indicates that the coding or the identification of the packet PK_rcv is incorrect, the processing unit 105 discards the packet PK_rcv. Besides, the controlling signals are included in the other addresses of the packet format. For example, one specific bit denotes a signal to noise ration (SNR) information request and another specific bit denotes a SNR information response.
Please note that, the first determining unit 102, the second determining unit 103 and the control unit 104 can be realized by a hardware approach or a microprocessor, and not restricted herein. According to an embodiment of the present invention, the receiver 101 comprises a register for storing the packet PK_rcv.
The physical device 10 also receives packets sent by an upper layer device, such as a MAC layer device, and stores the packets in the receiver 101. According to an embodiment of the present invention, the physical layer device 10 takes actions corresponding to the packets sent from the remote physical layer, without interrupting the upper layer device to access the receiver 101. Right after the function of controlling or negotiating with a remote physical layer is completed, the packets stored in the receiver 101 are cleared.
Please refer to
Furthermore, operations of the physical layer device 10 can be described in a process 30 shown in
Step 300: Start.
Step 302: Receive a packet PK_rcv.
Step 304: Determine a coding of the packet PK_rcv to generate a first determining result DRE1 according to a packet format PKFT.
Step 306: Determine an identification of the packet PK_rcv to generate a second result DRE2 according to the packet format PKFT.
Step 308: Discard the packet PK_rcv according to the first determining result DRE1 and the second determining result DRE2, or decode the packet PK_rcv to generate a decoding result INDATA according to the packet format PKFT.
Step 310: Control or negotiate with a remote physical layer according to the decoding result INDATA.
Step 312: End.
The process 30 states operations of the physical layer device 10. The detailed description is described above and thus not narrated herein. Hence, apart from receiving the packet, the local physical layer is able to decode controlling parameters included in the packet and control or negotiate with a remote physical layer directly.
In an embodiment of the present invention, functions of controlling or negotiating with a remote physical layer include a data swapping function and a management information of SNR. The control of the data swapping function is used for swapping data between a remote physical layer device and the physical layer device. The data swapping function includes: (1) replying to the remote physical layer device with register data of the physical layer device. (2) replying to the remote physical layer device that the register data of the physical layer device has been changed cannot be changed. (3) replying to the remote physical layer device that the register data of the physical layer device cannot be changed. (4) requesting the remote physical layer device to change its register data. (5) requesting the remote physical layer device to reply with its register data. The management information of SNR is described as follows: (1) requesting the remote physical layer device to reply with a SNR of the remote physical layer device. (2) replying to the remote physical layer device with a SNR of the physical layer device. In addiction, functions of controlling or negotiating with a remote physical layer further include: (1) requesting the remote physical layer device to reply with abilities of the remote physical layer device. (2) replying to the remote physical layer device with abilities of the physical layer device itself. (3) requesting the remote physical layer device to reduce abilities of the remote physical layer device. (4) requesting the remote physical layer device to enhance abilities of the remote physical layer device. (5) requesting the remote physical layer device to shut down. For example, when a transmission line is short, the physical layer device can request the remote physical layer device to close the channel coding for reduction of abilities of the physical layer. On the contrary, when the transmission line is long, the local physical layer can request the remote physical layer to perform higher linearity for enhancement of abilities of the physical layer. Moreover, when the local physical layer enters a standby mode with no data transmission, the remote physical layer may shut down for power saving.
Please refer to
Step 400: Start.
Step 402: Send a request packet PK_rq.
Step 404: Wait for a wait time WT.
Step 406: Receive a response packet PK_rps.
Step 408: Determine “Is there a next PK_rq?”, If yes, then go to step 402. Otherwise, go to Step 410.
Step 410: End.
When receiving a packet from the remote physical layer, the local physical layer determines the coding and the identification of the packet PK_rcv according to the packet format PKFT. When the coding and the identification both are correct, the local physical layer is able to decode the packet PK_rcv and accordingly make a response based on decoded data. For example, the remote physical layer sends the request packet PK_rq, requesting the local physical layer to reply with data stored in the register. When the local physical layer receives the packet and determines the coding and the identification are valid, the local physical layer starts decoding and sends the remote physical layer a response packet PK_rps for data swapping, after decoding. The process 50 states the local physical layer accordingly takes some actions to respond to the remote physical layer after receiving the packet PK_rcv. The process 50 includes the following steps:
Step 500: Start.
Step 502: Receive a packet PK_rcv.
Step 504: Determine a coding of the packet PK_rcv to generate a first result DRE1 according to the packet format PKFT.
Step 506: Determine an identification of the packet PK_rcv to generate a second result DRE2 according to the packet format PKFT.
Step 508: Discard the packet PK_rcv according to the first determining result DREZ and the second determining result DRE2, or decode the packet PK_rcv to generate a decoding result INDATA according to the packet format PKFT.
Step 510: According to the decoding result INDATA, determine “Is there a need to reply to the remote physical layer?” If yes, then go to Step 512. Otherwise, go to Step 514.
Step 512: Send a response packet PK_rps back, to reply to the remote physical layer.
Step 514: End.
Thus, according to the processes 40 and 50, the remote physical layer requests the local physical layer to reply with corresponding information or controls functions of the local physical layer, by sending the request packet. The local physical layer accordingly responds by sending the response packet as well.
According to the prior art, the physical layer can detect and receive packets only. The received packet must be decoded by upper layers. That is, functions of the physical layer can be controlled only via upper layers. According to an embodiment of the present invention, apart from packet detection and reception, the physical layer is able to obtain control parameters related to functions of the remote physical layer. Therefore, the present invention can realize a remote control between the physical layers.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.
Number | Date | Country | Kind |
---|---|---|---|
097145890 | Nov 2008 | TW | national |