Electronic device with enhanced management data input/output control
09852101 · 2017-12-26
Assignee
Inventors
- Shin-Shiun Chen (Taipei, TW)
- Chen-Hao Chang (Taipei, TW)
- Hong-Ching Chen (Kao-Hsiung, TW)
- Yao-Chun Su (Hsinchu, TW)
Cpc classification
G06F13/364
PHYSICS
International classification
G06F13/00
PHYSICS
G06F12/00
PHYSICS
G06F13/28
PHYSICS
G06F3/00
PHYSICS
G06F13/364
PHYSICS
Abstract
An electronic device has a management data input/output (MDIO) bus, a control unit, and an MDIO master. The control circuit receives a host command from a host device, and outputs a plurality of MDIO commands in response to the host command. The MDIO master receives the MDIO commands from the control circuit, and transmits the MDIO commands to the MDIO bus.
Claims
1. An electronic device, comprising: a management data input/output (MDIO) bus; a control circuit, configured to receive a host command from a host device, and output a plurality of MDIO commands in response to the host command; and an MDIO master, configured to receive the MDIO commands from the control circuit, and transmit the MDIO commands to the MDIO bus; wherein the MDIO commands are configured to be executed by a same MDIO slave on the MDIO bus; wherein the host command is an MDIO write command, and the MDIO commands comprise an MDIO write command and an MDIO read command.
2. The electronic device of claim 1, wherein the MDIO mater is further configured to transmit a write data to the MDIO slave according to the MDIO write command, and receive a read data from the MDIO slave according to the MDIO read command; and the control unit is further configured to compare the write data and the read data for write verification.
3. An electronic device, comprising: a management data input/output (MDIO) bus; a control circuit, configured to receive a host command from a host device, and output a plurality of MDIO commands in response to the host command; and an MDIO master, configured to receive the MDIO commands from the control circuit, and transmit the MDIO commands to the MDIO bus; wherein the MDIO commands are configured to be executed by a same MDIO slave on the MDIO bus; wherein the host command is an MDIO read command, and the MDIO commands comprise a plurality of MDIO read commands having a same read address in said same MDIO slave.
4. The electronic device of claim 3, wherein the MDIO mater is further configured to receive a plurality of read data from the MDIO slave according to the MDIO read commands; and the control circuit is further configured to compare the plurality of read data for read deglitch.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
DETAILED DESCRIPTION
(13) Certain terms are used throughout the following description and claims, which refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not in function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
(14) MDIO as originally defined in Clause 22 of IEEE 802.3 standard enables an STA (e.g., an MDIO master) to access up to 32 registers in 32 different PHY devices (e.g., MDIO slaves). More specifically, up to 32 PHY devices are supported per Clause 22 STA, and up to 32 registers are supported per Clause 22 PHY device. The STA initializes an MDIO command by using an MDIO frame, and provides PHY (port) address and register address to perform register read or write operation.
(15) To address the limitations of Clause 22 of IEEE 802.3 standard, the Clause 45 is added to IEEE 802.3 standard for extending the existing frame format to give provision to access 32 PHY devices, 32 different device types, and 64K registers in each of these PHY devices. More specifically, up to 32 PHY devices are supported per Clause 45 STA, up to 32 devices are supported per Clause 45 PHY device, and up to 65536 registers are supported per Clause 45 device.
(16) Based on the MDIO frame structures defined in Clause 22 and Clause 45 of IEEE 802.3 standard, a host device needs to send a plurality of write commands to an MDIO master, and the MDIO master has to sequentially send write commands, so as to write the same data into registers of different MDIO slaves. The present invention therefore proposes an electronic device with enhanced MDIO control to achieve the multicast/broadcast function.
(17)
(18) The control circuit 304 receives a host command CMD (such as a single command) generated from the host device 301 and transmitted via the bus 302. Next, the control circuit 304 parses the host command CMD, translates it into several MDIO commands such as write commands CMD.sub.W.sub._1, CMD.sub.W.sub._2, . . . CMD.sub.W.sub._N, and outputs the write commands CMD.sub.W.sub._1-CMD.sub.W.sub._N to the MDIO mater 306 via the internal bus 305. The MDIO master 306 receives the write commands CMD.sub.W.sub._1-CMD.sub.W.sub._N from the control circuit 304, and transmits the write commands CMD.sub.W.sub._1-CMD.sub.W.sub._N to the MDIO bus 307, where the transmission of each write command has a corresponding MDIO frame structure defined by Clause 22/Clause 45 of IEEE 802.3 standard.
(19) In one exemplary design, the host command CMD is a broadcast command for writing the same write data into registers of all MDIO slaves 308_1-308_N on the same MDIO bus 307 controlled by the MDIO master 306. Hence, the write commands CMD.sub.W.sub._1-CMD.sub.W.sub._N are configured to be executed by the MDIO slaves 308_1-308_N, respectively. It should be noted that the host device 301 only needs to generate and transmit one broadcast command CMD to the electronic device 300. In this way, the bandwidth of the bus 302 and the computing resource of the host device 301 can be saved greatly. Though the host device 301 only generates one broadcast command CMD, the broadcast function for MDC/MDIO protocol is achieved through the control circuit 304 that is capable of automatically generating needed write commands (e.g., CMD.sub.W.sub._1-CMD.sub.W.sub._N) based on a parsing result of the single broadcast command CMD.
(20)
(21) In one exemplary design, the host command CMD′ is a multicast command for writing the same write data into registers of some of the MDIO slaves 308_1-108_N on the same MDIO bus 307 controlled by the MDIO master 306. In this example, the write commands CMD.sub.W.sub._1 and CMD.sub.W.sub._2 are configured to be executed by the MDIO slaves 308_1 and 308_2, respectively. It should be noted that the host device 401 only needs to generate and transmit one multicast command CMD′ to the electronic device 400. In this way, the bandwidth of the bus 302 and the computing resource of the host device 401 can be saved. Though the host device 401 only generates one multicast command CMD′, the multicast function for MDC/MDIO protocol is achieved through the control circuit 404 that is capable of automatically generating needed write commands (e.g., CMD.sub.W.sub._1 and CMD.sub.W.sub._2) based on a parsing result of the single multicast command CMD′.
(22) In above examples shown in
(23)
(24) In this embodiment, each of the MDIO slaves 504_1-504_3 is configured to have a designated physical layer address PHYAD (or called a port address PRTAD) and a pre-defined address setting, where the pre-defined address setting is a special physical layer (port) address acting as a group identifier (GID) used to define which MDIO slaves belong to the same group. As shown in
(25) In this example shown in
(26) Consider another case where the write command CMD.sub.W has a physical layer (port) address set by 0x1d that is different from the designated physical layer (port) addresses possessed by the MDIO slaves 504_1-504_3. In accordance with a conventional design, none of the MDIO slaves 504_1-504_3 is activated to execute the write command CMD.sub.W. However, in accordance with the proposed design of the present invention, the physical layer (port) address included in the write command CMD.sub.W matches a pre-defined address setting (i.e., GID=0x1d) possessed by the MDIO slave 504_2. Hence, the MDIO slave 504_2 is activated to execute the write command CMD.sub.W.
(27)
(28) In accordance with a conventional design, none of the MDIO slaves 504_1-504_3 is activated to execute the write command CMD.sub.W. Since the reserved physical layer (port) address (e.g., 0x1f) does not match any of the pre-defined address settings (e.g., GID=0x1e and GID=0x1d), the aforementioned multicast function will not be enabled. However, in accordance with the proposed design of the present invention, the broadcast function of the write command CMD.sub.W′ is enabled due to the reserved physical layer (port) address (e.g., 0x1f) included in the write command CMD.sub.W′. That is, the reserved physical layer (port) address acts as a broadcast identifier, and all of the MDIO slaves 504_1-504_3 on the MDIO bus 501 are activated to execute the same write command CMD.sub.W′ That is, the reserved physical layer (port) address acts as a broadcast identifier, and all have a reserved physical layer (port) address, the broadcast function of the MDIO command is enabled.
(29) In above examples shown in
(30)
(31) In this embodiment, each of the MDIO slaves 704_1-704_3 is configured to have a designated physical layer address (or called a port address PRTAD) and a 32-bit pre-defined address setting BCAST_DEV.sub.1 [31:0], BCAST_DEV.sub.2 [31:0], BCAST_DEV.sub.3 [31:0]. In this embodiment, the pre-defined address setting may be regarded as a group identifier used to define which MDIO slaves belong to the same group. As shown in
(32) Consider a case where all of the MDIO slaves 704_1-704_3 on the same MDIO bus 701 have the same pre-defined address setting BCAST_DEV [31:0], i.e., BCAST_DEV [31:0]=BCAST_DEV.sub.1 [31:0]=BCAST_DEV.sub.2 [31:0]=BCAST_DEV.sub.3 [31:0]. Hence, the MDIO slaves 704_1-704_3 are categorized into the same group due to having the same group identifier BCAST_DEV [31:0]. Assume that the physical layer (port) address PRTAD [4:0] is set by 0x1e that is different from the designated physical layer (port) addresses possessed by the MDIO slaves 704_1-704_3, and the device address DEVAD [4:0] is set by BCAST_DEV [31:0] that is identical to pre-defined address settings possessed by the MDIO slaves 704_1-704_3. In accordance with a conventional design, none of the MDIO slaves 704_1-704_3 is activated to execute the write command CMD.sub.W because the physical layer (port) address PRTAD [4:0] included in the write command CMD.sub.W does not match any of the designated physical layer (port) addresses possessed by the MDIO slaves 704_1-704_3.
(33) However, in accordance with the proposed design of the present invention, all of the MDIO slaves 704_1-704_3 are activated to execute the write command CMD.sub.W because the device address DEVAD [4:0] included in the write command CMD.sub.W matches each of the pre-defined address settings possessed by the MDIO slaves 704_1-704_3, thus achieving the multicast function. Specifically, the number of MDIO slaves, each coupled to the MDIO bus 701 and having the same pre-defined address setting, is equal to the number of all MDIO slaves 704_1-704_3 on the same MDIO bus 701 controlled by the MDIO master 702. When an MDIO command is controlled to have a device address set by the pre-defined address setting used by all of the MDIO slaves on the MDIO bus 701, the multicast function of the MDIO command is enabled.
(34)
(35) When the physical layer (port) address PRTAD [4:0] does not match the designated physical layer (port) address PRTAD=0x1, the comparator 802 outputs a logic low value “0” to the OR logic gate 808. As shown in
(36) However, when the device address DEVAD [4:0] does not match the pre-defined address setting BCAST_DEV.sub.1 [31:0], the multiplexer 804 selects and outputs the logic low value “0”. Hence, when the MDIO command is the write command CMD and the device address DEVAD [4:0] included in the write command CMD matches the pre-defined address setting BCAST_DEV.sub.1 [31:0], the AND logic gate 806 outputs a logic high value “1” to the OR logic gate 808. No matter whether the physical layer (port) address PRTAD [4:0] matches the designated physical layer (port) address PRTAD=0x1 or not, the enable signal MDIO_LANE_EN is set by the logic high value “1” generated from the AND logic gate 806 for activating the MDIO slave 704_1 to execute the MDIO command (e.g., write command CMD.sub.W) on the MDIO bus 701.
(37) Consider another case where not all of the MDIO slaves 704_1-704_3 on the MDIO bus 701 have the same pre-defined address setting. For example, the MDIO slaves 704_1 and 704_3 may have the same pre-defined address setting BCAST_DEV [31:0], i.e., BCAST_DEV [31:0]=BCAST_DEV.sub.1 [31:0]=BCAST_DEV.sub.3 [31:0], while the MDIO slave 704_2 may have a different pre-defined address setting, i.e., BCAST_DEV.sub.3 [31:0]≠BCAST_DEV [31:0]. Hence, the MDIO slaves 704_1 and 704_3 are categorized into the same group due to having the same group identifier BCAST_DEV [31:0]. Assume that the physical layer (port) address PRTAD [4:0] is set by 0x1e that is different from the designated physical layer (port) addresses possessed by the MDIO slaves 704_1-704_3, and the device address DEVAD [4:0] is set by BCAST_DEV [31:0] that is identical to pre-defined address settings possessed by the MDIO slaves 704_1 and 704_3. In accordance with a conventional design, none of the MDIO slaves 704_1-704_3 is activated to execute the write command CMD.sub.W because the physical layer (port) address PRTAD [4:0] included in the write command CMD.sub.W does not match any of the designated physical layer (port) addresses possessed by the MDIO slaves 704_1-704_3.
(38) However, in accordance with the proposed design of the present invention, the MDIO slaves 704_1 and 704_3 are activated to execute the write command CMD.sub.W because the device address DEVAD [4:0] included in the write command CMD.sub.W matches the pre-defined address settings possessed by the MDIO slaves 704_1 and 704_3. In this way, the multicast function is achieved. Specifically, the number of MDIO slaves, each coupled to the MDIO bus 701 and having the same specific pre-defined address setting, is smaller than the number of all MDIO slaves 704_1-704_3 on the same MDIO bus 701 controlled by the MDIO master 702. When an MDIO command is controlled to have a device address set by a pre-defined address setting used by some of the MDIO slaves on the MDIO bus 701, the multicast function of the MDIO command is enabled.
(39) To enhance the robustness of MDC/MDIO protocol, the present invention further proposes a write verification procedure for a write operation and a deglitch procedure for a read operation. Further details are described as below.
(40)
(41) The control circuit 904 receives a host command (e.g., a single command such as an MDIO write command CMD.sub.W) and its associated write data D.sub.W generated from the host device 901 and transmitted via the bus 902. Next, the control circuit 904 outputs a plurality of MDIO commands in response to the MDIO write command CMD.sub.W. In this embodiment, the control unit 904 automatically appends an MDIO read command CMD.sub.R to the MDIO write command CMD.sub.W, and then transmits the MDIO write command CMD and the MDIO read command CMD.sub.R to the internal bus 905. Hence, the MDIO master 906 receives the MDIO write command CMD and the MDIO read command CMD.sub.R from the control unit 904, and transmits the MDIO write command CMD.sub.W and the MDIO read command CMD.sub.R to the MDIO bus 307, where the transmission of each of the MDIO write command CMD.sub.W and the MDIO read command CMD.sub.R follows a corresponding MDIO frame structure defined by Clause 22/Clause 45 of IEEE 802.3 standard.
(42) Specifically, the MDIO master 906 transmits the write data D.sub.W to the MDIO slave 908 according to the MDIO write command CMD.sub.W. When the MDIO bus 907 is designed based on Clause 22 of IEEE 802.3 standard, a write address is embedded in the MDIO write command CMD.sub.W. When the MDIO bus 907 is designed based on Clause 45 of IEEE 802.3 standard, a write address is included in an additional set-address command (not shown) preceding the MDIO write command CMD.sub.W. Further, the MDIO master 906 receives a read data D.sub.R from the MDIO slave 908 according to the MDIO read command CMD.sub.R. When the MDIO bus 907 is designed based on Clause 22 of IEEE 802.3 standard, a read address is embedded in the MDIO read command CMD.sub.R. When the MDIO bus 907 is designed based on Clause 45 of IEEE 802.3 standard, a read address is included in an additional set-address command (not shown) preceding the MDIO read command CMD.sub.R. It should be noted that the read address (i.e., a register address) is intentionally set by the write address (i.e., a register address) of the write data D.sub.W. Hence, after the write data D.sub.W is stored into the write address, the MDIO read command CMD.sub.R is executed by the MDIO slave 908 to read a stored data from the write address to output the read data D.sub.R. After receiving the read data D.sub.R through the MDIO master 906, the control unit 904 compares the write data D.sub.W and the read data D.sub.R for write verification.
(43)
(44) The control circuit 1004 receives a host command (e.g., a single command such as an MDIO read command CMD.sub.R.sub._1) generated from the host device 1001 and transmitted via the bus 1002. Next, the control circuit 1004 outputs a plurality of MDIO commands in response to the MDIO read command CMD.sub.R.sub._1. In this embodiment, the control unit 1004 automatically appends at least one MDIO read command to the MDIO read command CMD.sub.R.sub._1, and then transmits the MDIO read command CMD.sub.R.sub._1-CMD.sub.R.sub._M to the internal bus 1005, where M is a positive integer equal to or larger than 2. Hence, the MDIO master 1006 receives the MDIO read command CMD.sub.R.sub._1-CMD.sub.R.sub._M from the control unit 1004, and transmits the MDIO read command CMD.sub.R.sub._1-CMD.sub.R.sub._M to the MDIO bus 1007, where the transmission of each of MDIO read command CMD.sub.R.sub._1-CMD.sub.R.sub._M follows a corresponding MDIO frame structure defined by Clause 22/Clause 45 of IEEE 802.3 standard.
(45) When the MDIO bus 1007 is designed based on Clause 22 of IEEE 802.3 standard, a read address is embedded in each of the MDIO read command CMD.sub.R.sub._1-CMD.sub.R.sub._M. When the MDIO bus 1007 is designed based on Clause 45 of IEEE 802.3 standard, a read address is included in an additional set-address command (not shown) preceding each of the MDIO read commands CMD.sub.R.sub._1-CMD.sub.R.sub._M. Further, the MDIO master 1006 receives a plurality of read data D.sub.R1-D.sub.R.sub._M from the MDIO slave 1008 according to the MDIO read commands CMD.sub.R.sub._1-CMD.sub.R.sub._M. It should be noted that the read addresses corresponding to the MDIO read commands CMD.sub.R.sub._1-CMD.sub.R.sub._M are the same. Hence, the read data D.sub.R1-D.sub.R.sub._M are obtained by repeatedly reading a stored data from the same read address in the MDIO slave 1008. After receiving the read data D.sub.R1-D.sub.R.sub._M through the MDIO master 1006, the control unit 1004 compares the read data D.sub.R1-D.sub.R.sub._M for read deglitch. For example, a majority vote method may be employed by the control unit 1004 to determine a final read data D.sub.F from the read data D.sub.R.sub._1-D.sub.R.sub._M. That is, when most of the read data D.sub.R1-D.sub.R.sub._M are the same, this read data that is a majority of the read data D.sub.R1-D.sub.R.sub._M is selected as the final read data D.sub.F. However, this is for illustrative purposes only, and is not meant to be a limitation of the present invention.
(46) As mentioned above, the MDIO commands defined by Clause 45 of IEEE 802.3 standard include a set-address command, a read command, a write command, and a post-read-increment-address command. For a burst write operation for writing data into continuous write addresses (i.e., register addresses), the conventional MDIO master needs to send one set-address command before each write command. To increase the bus utilization, the present invention therefore proposes a write-incremental function. For example, the aforementioned MDIO masters and MDIO slave may be configured to support the proposed write-incremental function.
(47)
(48)
(49) 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. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.