1. Field of the Invention
The present invention relates to a method and apparatus for a universal serial bus (USB) physical layer, and more particularly relates to an apparatus to add a queue circuit (First-in First-out, FIFO) and remove a elasticity buffer apparatus on the USB 2.0 physical layer, and the data transmit and receive method on the apparatus.
2. Description of Related Art
Universal Serial Bus (USB) interfaces are currently implemented on personal computer peripheral equipment. The USB interface has many useful features: low cost, hot-plugging and a transmission line power supply. The USB apparatus does not occupy memory, input/output address, direct memory access (DMA) channel or interrupt request (IRQ) line, and execution of a USB also includes an error detect mechanism. These features solve many disadvantages of traditional PC peripheral equipment.
Full-speed USB apparatus operation frequency is 12 Mbps on USB 1.1. When the signal increased to 480 MHz on USB 2.0, using the traditional method to implement a full-speed USB apparatus is very difficult. Intel Corporation has promoted development of USB 2.0 peripheral equipment apparatus, and hence offers USB 2.0 transceiver macrocell interface (UTMI).
The USB 2.0 transmission standard interface processes low-level USB protocol and signal, such as data serialize and de-serialize. It was designed to allow a single interface control unit to use USB transceivers of various speeds.
The analog front-end unit 18 further comprises a high-speed transceiver unit 182 and a full-speed transceiver unit 180. The fill-speed transceiver unit 180 further comprises a receiver 1804, a status/control unit 1802 and a transmitter 1800. The high-speed transceiver unit 182 further comprises a receiver 1824, a status/control unit 1822 and a transmitter 1820.
The operation method of the traditional USB 2.0 transmit/receive unit transmits the transmit data packet 46 from the input of the USB 2.0 transceiver macrocell interface (UTMI) to the transmit hold register 10 and the transmit shift register 12, then queues and serializes the transmit data packet 46. The transmit data packet 46 is processed and combined into a bit stream in the bit stuffer 14 and in the non-return-to-zero inverted encoder 16. The serial data packet is sent to transmitter 1800 of the full-speed transceiver unit 180 of the analog front-end unit 18 or transmitter 1820 of the high-speed transceiver unit 182 of the analog front-end unit 18.
Conversely, the receive data packet is output from the receiver 1824 of the high-speed transceiver unit 182 of the analog front-end unit 18 to the high-speed delay phase locked loop 28 and the elasticity buffer 30, or the receive data packet is output from the receiver 1804 of the full-speed transceiver unit 180 of the analog front-end unit 18 to the full-speed delay phase locked loop and data recovery 26. The data packet of the elasticity buffer 30 is received and synchronized and the data packet of the full-speed delay phase locked loop and data recovery 26 is output to the multiplexer 32. The data packet is sent after synchronization to the non-return-to-zero inverted decoder 38 and decoded. The data packet is transmitted after being decoded to the bit unstuffer 40. The data packet (de-serialize) enters the receive shift register 42 and receive hold register 44 after decoded information. The receive data packet 48 is output to the USB 2.0 transceiver macrocell interface.
The disadvantage of the prior art is the irregular internal clock and complicated circuit design, as well as the addition of a flexible buffer to the circuit. The receive data packet in the receiver thus easily generates overflow and underflow.
The present invention relates to a method and apparatus for a universal serial bus (USB) physical layer. An interface control unit receives a transmit data packet of USB 2.0 transceiver macrocell interface (UTMI). A transmit first-in first-out (FIFO) unit receives the transmit data packet output of the interface control unit. A transmit unit receives the transmit data packet output of the transmit first-in first-out unit. An analog front-end unit receives the transmit data packet output of the transmit unit. A receive unit receives a receive data packet output from the analog front-end unit. A receive first-in first-out (FIFO) unit receives the receive data packet output from the receive unit and connected to the interface control unit, whereby the receive data packet is output to the USB 2.0 transceiver macrocell interface. The present invention also uses the transmit and receive method for an apparatus of the USB physical layer. The present invention is used to resolve flexible buffer overflow and underflow problems, while the circuit is simple, and thus cheap.
The various objects and advantages of the present invention will be more readily understood from the following detailed description when read in conjunction with the appended drawing, in which:
An analog front-end 58 receives the transmit data packet 50 output from the transmit unit 56. The analog front-end 58 further comprises a high-speed transceiver 582 and a full-speed transceiver 580. The full-speed transceiver 580 further comprises a receiver 5804, a status/control unit 5802 and a transmitter 5800. The high-speed transceiver 582 further comprises a receiver 5824, a status/control unit 5822 and a transmitter 5820.
A receive unit 60 receives a received data packet output from the analog front-end 58. The receive unit 60 further comprises a delay phase locked loop and data recovery 600 connected to the analog front-end 58, a packet extractor 602 connected to the delay phase locked loop and data recovery 600, a bit unstuffer 606 connected to non-return-to-zero inverted decoder 604, and a receive FIFO 62, which receives the receive data packet output of the receive unit 60 and connected to the state machine 522 of the UTM interface control logic 52. The received data packet 64 is transmitted to the USB 2.0 transceiver macrocell interface.
The operate method of the USB physical layer of the present invention inputs a transmitted data packet 50 from a USB 2.0 transceiver macrocell interface to the transmit state machine 520 of the UTM interface control logic 52. The transmit state machine 520 will generate a synchronization pattern inside the data packet and control a data stream input into the transmit FIFO 54. The bit stuffer 560 will add one bit of logic zero after six continuous bits of logic one are inside the data packet. The non-return-to-zero inverted encoder 562 will encode the data packet. The data stream is transmitted after encode to the packet formatter 564 and an end of packet for each packet is added from the data stream.
The data packet is transmitted from the analog front-end 58 to the packet extractor 602. A synchronization pattern and an end of packet format of the data packet are received. The data packet is input into the non-return-to-zero inverted decoder 604 and the bit unstuffer 606 to restore a real data packet. The data packet is transmitted to the receive FIFO62 and ordered in the receive state machine 522. The data packet is reconstructed and a receive data 64 is transmitted to the USB 2.0 transceiver macrocell interface.
The method and apparatus for the universal serial bus physical layer of the present invention resolves flexible buffer overflow or underflow and the circuit is simple, and thus cheap.
Although the present invention has been described with reference to the preferred embodiment thereof, it will be understood that the invention is not limited to the details thereof. Various substitutions and modifications have suggested in the foregoing description, and others will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
93109305 | Apr 2004 | TW | national |