CN106654770B - General-purpose serial bus USB extended line - Google Patents

General-purpose serial bus USB extended line Download PDF

Info

Publication number
CN106654770B
CN106654770B CN201611263951.3A CN201611263951A CN106654770B CN 106654770 B CN106654770 B CN 106654770B CN 201611263951 A CN201611263951 A CN 201611263951A CN 106654770 B CN106654770 B CN 106654770B
Authority
CN
China
Prior art keywords
usb
signal
data
class standard
interface chip
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
CN201611263951.3A
Other languages
Chinese (zh)
Other versions
CN106654770A (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.)
Shenzhen Lontium Semiconductor Science And Technology Co Ltd
Original Assignee
Shenzhen Lontium Semiconductor Science And Technology Co Ltd
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 Shenzhen Lontium Semiconductor Science And Technology Co Ltd filed Critical Shenzhen Lontium Semiconductor Science And Technology Co Ltd
Priority to CN201611263951.3A priority Critical patent/CN106654770B/en
Publication of CN106654770A publication Critical patent/CN106654770A/en
Application granted granted Critical
Publication of CN106654770B publication Critical patent/CN106654770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R31/00Coupling parts supported only by co-operation with counterpart
    • H01R31/06Intermediate parts for linking two coupling parts, e.g. adapter
    • H01R31/065Intermediate parts for linking two coupling parts, e.g. adapter with built-in electric apparatus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R13/00Details of coupling devices of the kinds covered by groups H01R12/70 or H01R24/00 - H01R33/00
    • H01R13/66Structural association with built-in electrical component
    • H01R13/665Structural association with built-in electrical component with built-in electronic circuit
    • H01R13/6691Structural association with built-in electrical component with built-in electronic circuit with built-in signalling means
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R2201/00Connectors or connections adapted for particular applications
    • H01R2201/06Connectors or connections adapted for particular applications for computer periphery

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The embodiment of the invention provides general-purpose serial bus USB extended lines, in the USB extended line during transmission standard usb signal and class standard usb signal, the 2nd USB sending module, the 2nd USB receiving module and the USB wire for connecting two USB interface chips being multiplexed in each USB interface chip, the cost of hardware is reduced, and without the independent connecting line for occupying two USB interface chips.And the 2nd USB sending module non-standard usb signal can be converted into class standard usb signal, class standard usb signal can be transmitted by USB wire.Since the performance of each module is relatively high in each USB interface chip in USB extended line, and signal transmission rate is very fast.To improve the signal transmission distance and signal transmission rate of USB extended line.

Description

General-purpose serial bus USB extended line
Technical field
The invention relates to universal serial bus technology fields, are more particularly to general-purpose serial bus USB extended line.
Background technique
USB (Universal Serial Bus, universal serial bus) Host (host) and USB Device (is set at present It is standby) communication when need to be added USB extended line.As shown in Figure 1, passing through USB extended line and USB for USB Host in the prior art The circuit diagram of Device connection.USB extended line includes chip 11 and chip 12, and chip 11 includes:First circuit 111 and Two circuits 112, wherein the first circuit 111 includes:The 1, the first USB sending module (USB of first USB receiving module (USB RX) TX) the 1, the 2nd USB receiving module (USB RX) 2 and the 2nd USB sending module (USB TX) 2;Second circuit 112 includes: SRAM1 (Static Random Access Memory, static random access memory), TX (transmit, transmission) and RX (receive is received);Chip 12 includes:Tertiary circuit 121 and the 4th circuit 122, wherein tertiary circuit 121 includes:The The 1, the 2nd USB receiving module (USB RX) 2 of one USB receiving module (USB RX) the 1, the first USB sending module (USB TX) and 2nd USB sending module (USB TX) 2;4th circuit 122 includes:SRAM2, TX and RX;USB Host passes through USB wire It is connected with chip 101, the first circuit 111 is connected by USB wire with tertiary circuit 121;Second circuit passes through wire and the 4th Circuit is connected;Chip 102 is connected by USB wire with USB Device.Chip 101 and chip 102 include I2C bus;It can To pass through I2C bus carries out read operation or write operation to the SRAM in respective chip.I2C bus includes:SCL and SDA, wherein SCL is I2The clock cable of C bus;SDA is I2The data signal line of C bus.
The process that USB Host 10 and USB Device 13 carries out the transmission of standard usb signal is as follows:USB Host passes through The first USB receiving module 1 in chip 101, the 2nd USB sending module 2 in chip 11, the 2nd USB in chip 12 are received The first USB sending module 1 in module 2, chip 12, is sent to USB Device;USB Device passes through in chip 12 first 2nd USB sending module 2, the 2nd USB receiving module 2 in chip 11, in chip 11 in USB receiving module 1, chip 12 One USB sending module 1, is sent to USB Host.
If desired non-standard usb signal is transmitted, then needs the I of chip 112C bus will need the data storage that sends to In SRAM1;TX in chip 11 can obtain the data, and the RX being sent in chip 12 from SRAM1;RX in chip 12 The data received are stored into SRAM2;Similarly, the I in chip 122C bus can will need the data storage that send to In SRAM2;TX in chip 12 can obtain the data, and the RX being sent in chip 11 from SRAM2;RX in chip 11 The data received are stored into SRAM1.
USB RX, USB TX, USB wire are transmitted for standard usb signal, and signal transmission distance is longer (can be grown Up to 50m or more), and signaling rate is very fast, but TX, RX, wire are transmitted for non-standard usb signal, transmission Distance is shorter, and transmission speed is slower, thus will limit the signal transmission distance and signal transmission speed of USB extended line entirety Degree, so that the signal transmission distance of USB extended line is shorter and signaling rate is lower.
Summary of the invention
In view of this, the present invention provides a kind of general-purpose serial bus USB extended line, with overcome in the prior art USB prolong The signal transmission distance of long line is shorter and the lower problem of signaling rate.
To achieve the above object, the present invention provides the following technical solutions:
A kind of general-purpose serial bus USB extended line, including:Two USB interface chips being connected by USB wire;Its In, each USB interface chip includes:
Memory, for storing data;
First USB receiving module;
First USB sending module;
The 2nd USB sending module being connected respectively with the first USB receiving module and the memory is used for from institute It states and obtains the first data to be sent in memory, generate class standard usb signal according to first data;And by class standard Usb signal is sent to another USB interface chip;
The 2nd USB receiving module being connected respectively with the first USB sending module and the memory is used for from another The second data are obtained in the class standard usb signal that one USB interface chip is sent, and are stored into the memory.
Wherein, the 2nd USB sending module is obtaining the first data to be sent from the memory, according to described in When first data generate class standard usb signal, it is specifically used for:
Determine that command type, the command type are used to indicate the type of corresponding class standard usb signal as confirmation character type Type or non-acknowledgement character types;
Determine the bit number of the first data occupied space;
Obtain first data and store the initial address into another USB interface chip, and with the bit number phase The offset answered;
According to the command type, the initial address, the offset, first data and pre-set same Step sequence, pre-set signal end of identification generate the corresponding class standard usb signal of the first data.
Wherein, the 2nd USB sending module is obtaining the first data to be sent from the memory, according to described in When first data generate class standard usb signal, it is also used to:
Calculate the check code of the command type, the initial address, the offset, first data;
It is described according to the command type, the initial address, the offset, first data and to preset Synchronizing sequence, pre-set signal end of identification generates the corresponding class standard usb signal of the first data and is specially:
According to the command type, the initial address, the offset, first data, the check code and Pre-set synchronizing sequence, pre-set signal end of identification generate the corresponding class standard usb signal of the first data.
Wherein, the class standard usb signal that another USB interface chip is sent carries command type, initial address, offset And second data, the 2nd USB receiving module are obtained from the class standard usb signal that another USB interface chip is sent When the second data, it is specifically used for:
Command type is obtained from the class standard usb signal that another USB interface chip is sent;
When the class standard usb signal for determining that another USB interface chip is sent is non-acknowledgement character types, from another USB Second data and the corresponding starting point of the second data are extracted in the class standard usb signal that interface chip is sent Location and offset.
Wherein, the 2nd USB receiving module is specifically used for when storing second data to the memory:
According to the corresponding initial address of second data and offset, second data are stored to the memory In.
Wherein, the class standard usb signal that another USB interface chip is sent is carried for corresponding command type, accordingly Initial address, corresponding offset and second data check code, the 2nd USB receiving module is also used to:
Check code is obtained from the class standard usb signal that another USB interface chip is sent;
When the corresponding check code of class standard usb signal for determining that another USB interface chip is sent is correct, execute from another The step of obtaining the second data in the class standard usb signal that USB interface chip is sent.
Wherein, each USB interface chip further includes:
Timer, for starting timing when the 2nd USB sending module sends class standard usb signal;
The 2nd USB receiving module, is also used to:When the time of timer record being more than or equal to preset threshold, The corresponding with the class standard usb signal of the 2nd USB sending module transmission of another USB interface chip transmission is not received to answer Signal is answered, then sends corresponding class standard usb signal to another USB interface chip again by the 2nd USB sending module, The answer signal is class standard usb signal.
Wherein, the answer signal carry command type and with corresponding check code, the 2nd USB receives mould Block is also used to:
Receive the answer signal;
When the command type of the answer signal is confirmation character types, corresponding verification is extracted from the answer signal Code;
When the check code mistake of the answer signal, again by the 2nd USB sending module to another USB interface Chip sends corresponding class standard usb signal;
When the check code of the answer signal is correct, determines that the 2nd USB sending module has succeeded and connect to another USB Mouth chip sends corresponding class standard usb signal.
Wherein, usb signal includes class standard usb signal and standard usb signal;Usb signal carries pre-set same Step sequence, synchronizing sequence are used to indicate itself as standard usb signal or class standard usb signal, and the 2nd USB receiving module is also For:
Receive the usb signal that another USB interface chip is sent;
When synchronizing sequence determines that the usb signal is class standard usb signal according to the usb signal, execute from another The step for obtaining the second data in the class standard usb signal that one USB interface chip is sent, and storing into the memory;
When synchronizing sequence determines that the usb signal is standard usb signal according to the usb signal, the USB is believed Number usb host or USB device are sent to by the first USB sending module.
Wherein, each USB interface chip includes I2C bus;
I2Whether C bus currently needs to transmit class standard usb signal for detecting;It needs to transmit class standard when detecting When usb signal, the connection of corresponding USB interface chip and usb host or USB device is disconnected;And it is marked when detecting that needs transmit When quasi- usb signal, the connection of corresponding USB interface chip and usb host or USB device is established.
Wherein, the 2nd USB sending module is when being sent to another USB interface chip for class standard usb signal, specifically For:
After carrying out position filling in class standard usb signal, non-return-to-zero reversal phase coding, the class standard after being encoded are carried out Usb signal;
Class standard usb signal after coding is sent to another USB interface chip.
It can be seen via above technical scheme that compared with prior art, the embodiment of the invention provides a kind of general serials Bus USB extended line is multiplexed each USB in the USB extended line during transmission standard usb signal and class standard usb signal The USB wire of the 2nd USB sending module, the 2nd USB receiving module and two USB interface chips of connection in interface chip; The cost of hardware is reduced compared with prior art, and without the independent connecting line for occupying two USB interface chips, such as existing skill Non-standard usb signal needs independent occupancy wire line in art.And the 2nd USB sending module non-standard usb signal can be converted At class standard usb signal, class standard usb signal can be transmitted by USB wire.Due to each USB interface in USB extended line The first USB receiving module, the first USB sending module, the 2nd USB sending module and the 2nd USB receiving module in chip Performance is relatively high, and signal transmission rate is very fast, therefore the signal transmission distance of USB extended line and signal transmission rate can be with It is identical as the signal transmission distance of the USB extended line of only transmission standard usb signal and signal transmission rate.To improve USB The signal transmission distance and signal transmission rate of extended line.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
USB Host passes through the circuit diagram that USB extended line is connect with USB Device to Fig. 1 in the prior art;
Fig. 2 is a kind of circuit diagram of general-purpose serial bus USB extended line provided by the embodiments of the present application;
Fig. 3 is the 2nd USB sending module provided by the embodiments of the present application is obtaining to be sent the from respective memory One data generate the flow diagram of the concrete methods of realizing of class standard usb signal according to the first data;
Fig. 4 is a kind of data structure schematic diagram of class standard usb signal provided by the embodiments of the present application;
Fig. 5 is the data interaction signaling diagram of two USB interface chips in USB extended line provided by the embodiments of the present application;
Fig. 6 is a kind of data structure schematic diagram of answer signal provided by the embodiments of the present application;
The signaling diagram of Fig. 7 data interaction between two USB interface chips provided by the embodiments of the present application.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
As shown in Fig. 2, being a kind of circuit diagram of general-purpose serial bus USB extended line provided by the embodiments of the present application.
The USB interface chip 201 and USB interface chip 202 being connected by USB wire are shown in Fig. 2.
Optional USB interface chip can be usb hub or USB repeater.
USB interface chip 201 includes:Memory 2011, the first USB receiving module 2012, the first USB sending module 2013, the 2nd USB sending module 2014 and the 2nd USB receiving module 2015.
USB interface chip 202 includes:Memory 2021, the first USB receiving module 2022, the first USB sending module 2023, the 2nd USB sending module 2024 and the 2nd USB receiving module 2025.
First USB receiving module 2012, the 2nd USB receiving module 2015, the first USB receiving module 2022, the 2nd USB connect Receiving module 2025 can be USB RX;First USB sending module 2013, the 2nd USB sending module 2014, the first USB send mould Block 2023, the 2nd USB sending module 2024 can be USB TX.
Above-mentioned first USB sending module 2013, the 2nd USB sending module 2014, the first USB sending module 2023, second USB sending module 2024 can be USB TX;USB TX refers to standard USB TX, including low speed TX, full speed TX and high speed TX;Above-mentioned first USB receiving module 2012, the 2nd USB receiving module 2015, the first USB receiving module 2022, the 2nd USB receiving module 2025 can be USB RX;USB RX refers to standard USB RX, including low speed RX, Full speed RX and high speed RX.
Memory 2011 can be SRAM.
The connection relationship of each module is as shown in Fig. 2, no longer superfluous here in USB interface chip 201 and USB interface chip 202 It states.
Memory in each USB interface chip is for storing data.
The 2nd USB sending module in each USB interface chip, for from the storage in affiliated same USB interface chip The first data to be sent are obtained in device, generate class standard usb signal according to the first data;And class standard usb signal is sent out It send to another USB interface chip.
The 2nd USB receiving module in each USB interface chip, the class standard for being sent from another USB interface chip In the memory for obtaining the second data in usb signal, and storing into affiliated same USB interface chip.
In a kind of general-purpose serial bus USB extended line provided in an embodiment of the present invention, in transmission standard in the USB extended line During usb signal and class standard usb signal, the 2nd USB sending module and second that is multiplexed in each USB interface chip USB receiving module;The cost of hardware is reduced compared with prior art.And the 2nd USB sending module non-standard USB can be believed Number it is converted into class standard usb signal, class standard usb signal can be transmitted by USB wire.Due to each in USB extended line The first USB receiving module, the first USB sending module, the 2nd USB sending module and the 2nd USB in USB interface chip receive The performance of module is relatively high, and signal transmission rate is very fast, therefore the signal transmission distance of USB extended line and signal transmission speed Rate can be identical as the signal transmission distance of the USB extended line of only transmission standard usb signal and signal transmission rate.To improve The signal transmission distance and signal transmission rate of USB extended line.
The generating process of class standard usb signal is described in detail below.As shown in figure 3, being mentioned for the embodiment of the present application The 2nd USB sending module supplied is obtaining the first data to be sent from respective memory, generates category according to the first data The flow diagram of the concrete methods of realizing of quasi- usb signal, this method include:
Step S301:Determine command type, the type that the command type is used to indicate corresponding class standard usb signal is true Recognize character types or non-acknowledgement character types.
Confirm that character types may include:ACK (Acknowledgement) type, in data communication, receiving end is issued A kind of transmission class control character of transmitting terminal.Indicate that the data sent have confirmed that receiving is errorless.
Needs are not carried in the class standard usb signal of ordinary circumstance confirmation character types stores the number into respective memory According to, and non-acknowledgement character types refer to and carry the data in need stored into respective memory in class standard usb signal.
Step S302:Determine the bit number of the first data occupied space.
Step S303:Obtain first data and store the initial address into another USB interface chip, and with it is described The corresponding offset of bit number.
Step S304:According to the command type, the initial address, the offset, first data and pre- Synchronizing sequence, the pre-set signal end of identification generation corresponding class standard usb signal of the first data being first arranged.
It is understood that the command type, the initial address, the offset, described first can also be calculated The check code of data.Corresponding step S304 is specifically used for:According to the command type, the initial address, the offset, Described in first data, the check code and pre-set synchronizing sequence, pre-set signal end of identification generate The corresponding class standard usb signal of first data.
Optionally, check code can be CRC (Cyclic Redundancy Check, cyclic redundancy check) check code.
As shown in figure 4, being a kind of data structure schematic diagram of class standard usb signal provided by the embodiments of the present application.
Wherein, SYNC (synchronization) is pre-set synchronizing sequence.Command Type is order class Type;ADDR is initial address;Offset is offset, i.e., how many a address bits are deviated since initial address;Byte0 is extremely Byten is the data to be sent obtained from memory;EOP is the end of identification of class standard usb signal.Class standard USB letter Number EOP can be identical as the EOP in standard usb signal.N is the positive integer more than or equal to 1.
Optionally, the SYNC in class standard usb signal can be 64bit, wherein there is 31 pair of 01 sequence, last 2bit is 00.And the SYNC of standard usb signal is 32bit, wherein there is 15 pair of 01 sequence, last 2bit is 00.
Command Type bit wide shown in Fig. 4 is 4bit, can also be other bit wides in practical applications, can be with The bit wide of Command Type is extended according to demand.
The bit wide of ADDR shown in Fig. 4 is that the bit wide of 8bit, Offset are 8bit, in practical applications, can basis Demand extends its bit wide.
ADDR and Offset jointly define the occupied bit number of data to be transmitted, the occupied bit of different data Number is different, therefore, the bit wide of Offset can be extended according to practical application.
2nd USB sending module obtains data to be sent from the memory in affiliated same USB interface chip, and will Data are filled in Byte0 to Byten.
Calculate the check code of Command Type, ADDR, Offset, Byte0 to Byten, such as the CRC check of 16bit Code.CRC16 is calculated in the calculating of CRC and standard usb signal in class standard usb signal, formula is as follows:G (X)=X16+X15 +X2+1。
EOP in class standard usb signal can be identical as the EOP in standard usb signal, and for example, 01111111.In Fig. 4 The bit wide of the EOP shown is 8bit, in practical applications, or other bit wides.
The embodiment of the present application provides the bit wide of each section shown in Fig. 4, and but not limited thereto.
Referring to Fig. 5, for the data interaction letter of two USB interface chips in USB extended line provided by the embodiments of the present application Enable figure.Data instance is sent to USB interface chip 202 with USB interface chip 201 below to be illustrated.USB interface chip 202 Process of the process of data with USB interface chip 201 to the transmission data of USB interface chip 202 is sent to USB interface chip 201 It is identical.
Step S501:The 2nd USB sending module 2014 in USB interface chip 201 obtains pending from memory 2011 The first data sent, and class standard usb signal is generated according to the first data, it is sent to USB interface chip 202.
The data stored in memory 2011 include the first data to be sent, which can be memory 2011 I2C bus stores the first data into the memory 2011.
2nd USB sending module 2014 can be refering to shown in Fig. 3 according to the process that the first data generate class standard usb signal Method, details are not described herein.
Step S502:When the 2nd USB sending module 2014 sends class standard usb signal, in USB interface chip 201 Timer 2 016 starts timing.
Step S502 is optional step, therefore is outlined in Fig. 5 with dotted line frame.Optionally, each USB interface chip includes Timer.
It is understood that USB interface chip 202 receives the class standard USB letter of the 2nd USB sending module 2014 transmission After number, answer signal can also be fed back to USB interface chip 201, indicate oneself to have received the class standard usb signal.USB connects If mouthful chip 201 does not receive corresponding answer signal within some time, then illustrate that class standard usb signal sends failure.
Step S503:2nd USB receiving module 2025 of USB interface chip 202 receives class standard usb signal, from category Command type, initial address, offset, the first data and check code are extracted in quasi- usb signal.
Specifically, the 2nd USB receiving module 2025 can determine category according to the command type in class standard usb signal The type of quasi- usb signal;When class standard usb signal is non-acknowledgement character types, executes step and mentioned from class standard usb signal Take out command type, initial address, offset, the first data and check code.
Step S504:Check code is calculated according to command type, initial address, offset, the first data;When calculated school Test the check code carried in code and class standard usb signal it is identical when, determine that class standard usb signal is correct.
Preferably, class standard usb signal carries check code, at this time includes step S504;When class standard usb signal does not carry It does not include step S504 when check code.Therefore it is indicated by the dashed box in Fig. 5.
Step S505:2nd USB receiving module 2025 stores the first data to storage according to initial address and offset In device 2021, and answer signal is fed back to USB interface chip 201 by the 2nd USB sending module 2023.
As shown in fig. 6, being a kind of data structure schematic diagram of answer signal provided by the embodiments of the present application.
Answer signal is also a kind of class standard usb signal, does not carry the number of Byte0 as shown in Figure 4 to Byten only According to.The bit wide of answer signal each section is shown in Fig. 6, the embodiment of the present application provides but not limited to this.For the solution of each section Releasing can be refering to the explanation of corresponding portion in Fig. 4, and details are not described herein.
Preferably, answer signal carries the check code for Command Type.It can not certainly carry.School herein Testing code can be cyclic redundancy check.Calculating process is consistent with cyclic redundancy check calculating process as shown in Figure 4.It is no longer superfluous herein It states.
Step S506:2nd USB receiving module 2015 of USB interface chip 201 receives answer signal;Extract answer signal In command type;When answer signal is confirmation character types, corresponding class standard usb signal transmission flow terminates.
Preferably, answer signal carries check code, and step S505 includes at this time:
Step S5061:2nd USB receiving module 2015 calculates check code according to the command type of answer signal;When The check code carried in the calculated check code of two USB receiving module 2015 and answer signal is identical, it is determined that answer signal is just Really, which terminates.
Step S5062:When the check code carried in the calculated check code of the 2nd USB receiving module 2015 and answer signal When the time of not identical or timer record is more than or equal to preset threshold, the 2nd USB receiving module 2015 does not receive USB yet The answer signal for the corresponding class standard usb signal that interface chip 202 is sent, then return step S501 sends class standard again Usb signal.
Since step S5051 and step S5052 is optional step, it is indicated by the dashed box in Fig. 5.
Answer signal correctly illustrates that having succeeded for USB interface chip 201 has sent accordingly to USB interface chip 202 Class standard usb signal, the class standard usb signal transmission process terminate.
USB extended line provided by the embodiments of the present application both can also transmit class standard USB with transmission standard usb signal Standard usb signal and class standard usb signal are referred to as usb signal by signal, as shown in fig. 7, being provided by the embodiments of the present application The signaling diagram of data interaction between two USB interface chips.It is sent below with USB interface chip 201 to USB interface chip 202 Data instance be illustrated.The process and USB interface core for the data that USB interface chip 202 is sent to USB interface chip 201 The process of piece 201 to the data that USB interface chip 202 is sent is identical.
Step S701:The 2nd USB receiving module 2025 in USB interface chip 202 receives USB interface chip 201 and sends Usb signal, the synchronizing sequence according to usb signal judges the type of usb signal;When usb signal is class USB standard signal, Execute step S503;When usb signal is standard usb signal, step S702 is executed.
Optionally, above-mentioned " type that the synchronizing sequence according to usb signal judges usb signal " is specifically, according to usb signal The bit wide of middle synchronizing sequence judges the type of usb signal.As shown in figure 4, the bit wide of the synchronizing sequence of class standard usb signal is 64bit, and the bit wide of the synchronizing sequence of standard usb signal is 32bit.
Step S702:Standard usb signal is sent to the first USB sending module 2023 by the 2nd USB receiving module 2025;The Standard usb signal is sent to USB Device by one USB sending module 2023.
USB interface chip 202 is connected with USB Device in Fig. 2, therefore the first USB sending module 2023 is by standard USB Signal is sent to USB Device;If USB interface chip 202 is connected with USB Host, the first USB sending module 2023 will mark Quasi- usb signal is sent to USB Host.
USB extended line provided by the embodiments of the present application not only can be with transmission standard usb signal, but also can transmit class standard USB Signal, in order to not influence the transmission of these two types of signals, optionally, each USB interface chip includes I2C bus;I2C bus, is used for Whether detection currently needs to transmit class standard usb signal;When detect need to transmit class standard usb signal when, disconnect corresponding USB The connection of interface chip and usb host or USB device;And when detect need transmission standard usb signal when, establish corresponding The connection of USB interface chip and usb host or USB device.
To sum up, when using USB extended line transmission class standard usb signal, USB Host cannot be communicated with USB Device. I2C bus disconnects the connection of corresponding USB interface chip and usb host or USB device, refers to I2C bus does not drive corresponding USB to connect USB wire between mouth chip and usb host or USB device;It is not connected at this point, usb host or USB device just default oneself USB interface chip, usb host or USB device would not be communicated with USB interface chip at this time, so usb host or USB Communication between equipment and USB interface chip is just separated.As shown in Fig. 2, the I of USB interface chip 2012C bus disconnects USB The connection of interface chip 201 and USB Host;The I of USB interface chip 2022C bus disconnects USB interface chip 202 and USB The connection of Device.At this point, the USB wire between USB interface chip 201 and USB interface chip 202 is in idle condition, it can To transmit class USB standard signal.
I2C bus establishes the connection of corresponding USB interface chip and usb host or USB device, refers to I2C bus driver is corresponding USB wire between USB interface chip and usb host or USB device.
In the embodiment of the present application, in USB Host and USB Device normal communication, when having other request signals of forwarding, It needs for other signals to be converted to class standard usb signal, in the USB extended line free time, multiplexing USB signal path (i.e. the 2nd USB Sending module 2014, the 2nd USB receiving module 2015, the 2nd USB receiving module 2025, the 2nd USB sending module 2024 and Connect the USB wire between USB interface chip 201 and USB interface chip 202), interruption U SB Host and USB Device are logical Letter, preferential to forward class standard usb signal, the standard usb signal for needing USB Host or USB Device to send at this time can be lost It loses.After equal class standards usb signal is sent, release usb signal channel is communicated to USB Host with USB Device, at this time When the standard usb signal that USB Host and USB Device lose is less, can also restore USB Host and USB Device it Between communication, if lose standard usb signal it is more, need to re-establish the USB between USB Host and USB Device Signal path.
For safety of the class standard usb signal in transmission process, class standard usb signal can also be encoded. The 2nd USB sending module in each USB interface chip is when being sent to another USB interface chip for class standard usb signal, tool Body is used for:After carrying out position filling in class standard usb signal, non-return-to-zero reversal phase coding, the class standard USB after being encoded are carried out Signal;Class standard usb signal after coding is sent to another USB interface chip.
Wherein the synchronizing sequence SYNC in class standard usb signal is without coding.Position filling (Bitstuff) refers to continuously 0 is inserted into after 6bit 1, other are remained unchanged.NRZI (non-return-to-zero reversal phase coding, No Return Zero-Inverse) refers to Source code is 0, and level overturning, source code is 1, and level remains unchanged.
Correspondingly, the 2nd USB receiving module in each USB interface chip is also used to:Receive class standard usb signal Afterwards, class standard usb signal is decoded.
The data after the SYNC in class standard usb data are subjected to NRZI decoding first, are then removed the 0 of insertion.
Have the function of that the module of same names is identical in the embodiment of the present application in each USB interface chip;Such as USB interface The function phase of the 2nd USB sending module 2014 and the 2nd USB sending module 2024 in USB interface chip 202 in chip 201 Together;The 2nd USB receiving module 2015 in USB interface chip 201 and the 2nd USB receiving module 2025 in USB interface chip 202 Function it is identical;The first USB sending module 2013 in USB interface chip 201 is sent with the first USB in USB interface chip 202 The function of module 2023 is identical;The first USB receiving module 2012 in USB interface chip 201 and in USB interface chip 202 the The function of one USB receiving module 2022 is identical.In the data interaction enumerated between two USB interface chips in the embodiment of the present application It is to be using USB interface chip 202 as data receiver using USB interface chip 201 as data sending terminal when embodiment Example is illustrated, when USB interface chip 202 is used as data sending terminal, when USB interface chip 201 is as data receiver Process is similar, will, it is exchanged using USB interface chip 202 as corresponding module in the data exchange process of data receiver.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of general-purpose serial bus USB extended line, which is characterized in that including:Two USB interfaces being connected by USB wire Chip;Wherein, each USB interface chip includes:
Memory, for storing data;
First USB receiving module;
First USB sending module;
The 2nd USB sending module being connected respectively with the first USB receiving module and the memory, for being deposited from described The first data to be sent are obtained in reservoir, generate class standard usb signal according to first data;And by class standard USB Signal is sent to another USB interface chip;
The 2nd USB receiving module being connected respectively with the first USB sending module and the memory is used for from another The second data are obtained in the class standard usb signal that USB interface chip is sent, and are stored into the memory;
The 2nd USB sending module is obtaining the first data to be sent from the memory, according to first data When generating class standard usb signal, it is specifically used for:
Determine command type, the command type be used to indicate the type of corresponding class standard usb signal for confirmation character types or Non-acknowledgement character types;
Determine the bit number of the first data occupied space;
It obtains first data and stores the initial address into another USB interface chip, and is corresponding with the bit number Offset;
According to the command type, the initial address, the offset, first data and pre-set synchronous sequence Column, pre-set signal end of identification generate the corresponding class standard usb signal of the first data.
2. general-purpose serial bus USB extended line according to claim 1, which is characterized in that the 2nd USB sending module exists The first data to be sent are obtained from the memory, when generating class standard usb signal according to first data, are also used In:
Calculate the check code of the command type, the initial address, the offset, first data;
It is described according to the command type, the initial address, the offset, first data and pre-set same Step sequence, pre-set signal end of identification generate the corresponding class standard usb signal of the first data and are specially:
According to the command type, the initial address, the offset, first data, the check code and in advance The synchronizing sequence of setting, pre-set signal end of identification generate the corresponding class standard usb signal of the first data.
3. according to claim 1 to any one of 2 general-purpose serial bus USB extended lines, which is characterized in that another USB interface The class standard usb signal that chip is sent carries command type, initial address, offset and the second data, the 2nd USB Receiving module is specifically used for when obtaining the second data from the class standard usb signal that another USB interface chip is sent:
Command type is obtained from the class standard usb signal that another USB interface chip is sent;
When the class standard usb signal for determining that another USB interface chip is sent is non-acknowledgement character types, from another USB interface Extracted in the class standard usb signal that chip is sent second data and the corresponding initial address of the second data and Offset.
4. general-purpose serial bus USB extended line according to claim 3, which is characterized in that the 2nd USB receiving module exists When second data are stored to the memory, it is specifically used for:
According to the corresponding initial address of second data and offset, second data are stored into the memory.
5. general-purpose serial bus USB extended line according to claim 4, which is characterized in that another USB interface chip was sent Class standard usb signal is carried for corresponding command type, corresponding initial address, corresponding offset and described second The check code of data, the 2nd USB receiving module, is also used to:
Check code is obtained from the class standard usb signal that another USB interface chip is sent;
When the corresponding check code of class standard usb signal for determining that another USB interface chip is sent is correct, execute from another USB The step of obtaining the second data in the class standard usb signal that interface chip is sent.
6. according to claim 1 or the 5 general-purpose serial bus USB extended lines, which is characterized in that each USB interface chip is also Including:
Timer, for starting timing when the 2nd USB sending module sends class standard usb signal;
The 2nd USB receiving module, is also used to:When the time of timer record being more than or equal to preset threshold, do not connect The response corresponding with the class standard usb signal of the 2nd USB sending module transmission that another USB interface chip is sent is received to believe Number, then corresponding class standard usb signal is sent to another USB interface chip again by the 2nd USB sending module, it is described Answer signal is class standard usb signal.
7. general-purpose serial bus USB extended line according to claim 6, which is characterized in that the answer signal carries life Enable type and with corresponding check code, the 2nd USB receiving module is also used to:
Receive the answer signal;
When the command type of the answer signal is confirmation character types, corresponding check code is extracted from the answer signal;
When the check code mistake of the answer signal, again by the 2nd USB sending module to another USB interface chip Send corresponding class standard usb signal;
When the check code of the answer signal is correct, determine that the 2nd USB sending module has succeeded to another USB interface core Piece sends corresponding class standard usb signal.
8. general-purpose serial bus USB extended line according to claim 1, which is characterized in that usb signal includes class standard USB Signal and standard usb signal;Usb signal carries pre-set synchronizing sequence, and synchronizing sequence is used to indicate itself as standard Usb signal or class standard usb signal, the 2nd USB receiving module are also used to:
Receive the usb signal that another USB interface chip is sent;
When synchronizing sequence determines that the usb signal is class standard usb signal according to the usb signal, execute from another USB The step for obtaining the second data in the class standard usb signal that interface chip is sent, and storing into the memory;
When synchronizing sequence determines that the usb signal is standard usb signal according to the usb signal, the usb signal is led to It crosses the first USB sending module and is sent to usb host or USB device.
9. general-purpose serial bus USB extended line according to claim 1, which is characterized in that each USB interface chip includes I2C Bus;
I2Whether C bus currently needs to transmit class standard usb signal for detecting;Need to transmit class standard USB letter when detecting Number when, disconnect the connection of corresponding USB interface chip and usb host or USB device;And transmission standard USB is needed when detecting When signal, the connection of corresponding USB interface chip and usb host or USB device is established.
10. general-purpose serial bus USB extended line according to claim 1, which is characterized in that the 2nd USB sending module When class standard usb signal is sent to another USB interface chip, it is specifically used for:
After carrying out position filling in class standard usb signal, non-return-to-zero reversal phase coding is carried out, the class standard USB letter after being encoded Number;
Class standard usb signal after coding is sent to another USB interface chip.
CN201611263951.3A 2016-12-30 2016-12-30 General-purpose serial bus USB extended line Active CN106654770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611263951.3A CN106654770B (en) 2016-12-30 2016-12-30 General-purpose serial bus USB extended line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611263951.3A CN106654770B (en) 2016-12-30 2016-12-30 General-purpose serial bus USB extended line

Publications (2)

Publication Number Publication Date
CN106654770A CN106654770A (en) 2017-05-10
CN106654770B true CN106654770B (en) 2018-11-20

Family

ID=58837880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611263951.3A Active CN106654770B (en) 2016-12-30 2016-12-30 General-purpose serial bus USB extended line

Country Status (1)

Country Link
CN (1) CN106654770B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741251A (en) * 2019-03-25 2020-10-02 杭州海康威视数字技术股份有限公司 Monitoring system, local host and camera remote preview control method
CN113301130A (en) * 2021-05-11 2021-08-24 深圳市星火数控技术有限公司 Communication method and device of sewing equipment controller, terminal equipment and storage medium
CN114637718B (en) * 2022-05-19 2022-07-29 南京沁恒微电子股份有限公司 USB multiplexing single-wire interface unit, chip and communication system
CN115328837B (en) * 2022-08-22 2023-04-25 北京小鸟科技股份有限公司 Method for supporting USB2.0 ultra-long distance transmission
US11609876B1 (en) 2022-08-31 2023-03-21 Nanjing qinheng Microelectronics Co., Ltd. USB multiplexing single-wire interface unit, chip and communication system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6886062B2 (en) * 2001-03-30 2005-04-26 Intel Corporation Method and apparatus for improving time constraints and extending limited length cables in a multiple-speed bus
JP2004252949A (en) * 2003-01-29 2004-09-09 Sony Corp Usb connector conversion apparatus
CN100507887C (en) * 2004-06-11 2009-07-01 纬创资通股份有限公司 Method for conducting information flow exchange by two electronic device under USB structure and system for applying the same method
CN101075938A (en) * 2006-05-19 2007-11-21 深圳艾科创新微电子有限公司 System and method for converting between cell-phone telecommunication protocol and USB mass storage protocol
CN202563497U (en) * 2012-05-21 2012-11-28 海南经保科技实业有限公司 Communication interface for Flash-Net animation game
CN204945998U (en) * 2015-09-24 2016-01-06 高华伟 There is the host computer extension fixture of backup twisted-pair feeder

Also Published As

Publication number Publication date
CN106654770A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN106654770B (en) General-purpose serial bus USB extended line
CN100366029C (en) Communication controller, host-side controller, communication equipment, communication system and method
CN110476434B (en) Transmission of common mode control data over audio return channels
EP0793881B1 (en) Method of time stamping a message indicative of the time of message creation
US10216690B2 (en) Single-wire interface bus transceiver system based on I2C-bus, and associated method for communication of single-wire interface bus
CN101312387B (en) Data transmission apparatus, data transmission device, data reception device and data transmission system
CN111130710B (en) SPI-based duplex communication method
CN108989014B (en) A kind of single serial half-duplex operation method of width clock tolerance
CN106528484A (en) Serial communication method
US20220006564A1 (en) User station for a serial bus system, and method for communicating in a serial bus system
CN100531091C (en) I2C bus realization method for point-to-point communication
US20140161442A1 (en) Data sending or receiving method, device, and apparatus used in optical fiber transmission
CN101841393A (en) PWM (Pulse Width Modulation) input module and MVB (Multifunction Vehicle Bus) equipment based on MVB interface
EP3246823B1 (en) Optical module and transmitting data in optical module
TW201321242A (en) Digital signal transceiver, method and electrombile system thereof
TW202114392A (en) Node station for a serial bus system and method for communicating in a serial bus system
CN114024655B (en) State machine-based high-speed rail double-system parameter synchronization method and device
WO2008088145A1 (en) Data transmitting and receiving method and communication system thereof
CN106330357B (en) A kind of transfer check method, node and the system of SERDES
CN101510818B (en) Detection method, device and system for optical fiber link
CN101272215A (en) Optical transmission unit frame generating method and device, method and device for transmitting clock rank
JP2017208713A5 (en)
JP2013017090A (en) Transmission/reception devices and system for relaying them
CN109450517A (en) RDSS communications control method and system
JP2008108083A (en) Device and system for usb

Legal Events

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