WO2022161244A1 - 多主机仲裁方法、装置和可读存储介质 - Google Patents
多主机仲裁方法、装置和可读存储介质 Download PDFInfo
- Publication number
- WO2022161244A1 WO2022161244A1 PCT/CN2022/072956 CN2022072956W WO2022161244A1 WO 2022161244 A1 WO2022161244 A1 WO 2022161244A1 CN 2022072956 W CN2022072956 W CN 2022072956W WO 2022161244 A1 WO2022161244 A1 WO 2022161244A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- host
- level signal
- bit
- data
- duration
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 230000005540 biological transmission Effects 0.000 claims abstract description 21
- 238000004891 communication Methods 0.000 claims abstract description 16
- 238000004590 computer program Methods 0.000 claims description 8
- 230000007704 transition Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000002035 prolonged effect Effects 0.000 description 3
- 241000699670 Mus sp. Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004377 microelectronic Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4291—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/04—Generating or distributing clock signals or signals derived directly therefrom
- G06F1/06—Clock generators producing several clock signals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06M—COUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
- G06M1/00—Design features of general application
- G06M1/27—Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum
- G06M1/272—Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum using photoelectric means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0016—Inter-integrated circuit (I2C)
Definitions
- the present application belongs to the field of communication technologies, and in particular relates to a multi-host arbitration method, device and readable storage medium.
- the integrated circuit (Inter-Integrated Circuit, I2C) bus is a two-wire serial bus that allows multi-host access. It is a special form of synchronous communication to transmit information between devices connected to the bus. It has the advantages of less interface lines, simple control methods, small device packaging, and high communication rate. It has become a widely used in the field of microelectronic communication control. bus standard. Since the I2C bus does not have any customized priorities, and there is no central host to formulate priorities, the I2C bus needs to achieve priority arbitration through competition between different hosts.
- the purpose of the embodiments of the present application is to provide a multi-host arbitration method, device, and readable storage medium, which can solve the possibility of level transition of the serial data line and the level transition of the serial clock line of the existing I2C bus. At the same time, there is a problem that causes the I2C bus to go wrong.
- an embodiment of the present application provides a multi-host arbitration method, which includes:
- a first clock signal of the first host is generated, and the duration of the first high-level signal in the first clock signal is longer than that of the second
- the duration of the high-level signal, the first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host, and the second high-level signal corresponds to the word Corresponds to one bit except the first bit in the section;
- the first host is controlled to stop transmitting data
- the second host is controlled to retransmit data or stop transmitting data.
- an embodiment of the present application provides a multi-master arbitration device, the device comprising:
- the generating module is configured to generate a first clock signal of the first host when the first host uses the serial data line of the bus for data transmission, and the first high-level signal in the first clock signal is The duration is greater than the duration of the second high-level signal, the first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host, and the second high-level signal The signal corresponds to one bit in the byte except for the first bit;
- a first control module configured to detect that the data sent by the second host to the serial data line is data of repeated start bits or stop bits within the duration of the first high-level signal, And if the level signal of the serial data line matches the data sent by the second host, the first host is controlled to stop transmitting data, and the second host is controlled to retransmit data or stop transmission. data.
- embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
- an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
- an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or an instruction to implement the first aspect the method described.
- an embodiment of the present application provides a computer program product, the computer program product is stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the first aspect. steps of the method described.
- an embodiment of the present application provides a communication device, including: a processor, a memory, and a program stored in the memory and executable on the processor, when the program is executed by the processor The steps of implementing the method as described in the first aspect.
- a first clock signal of the first host is generated, and the first high level in the first clock signal is The duration of the signal is greater than the duration of the second high-level signal, the first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host, and the second high-level signal corresponds to the first bit of the byte in the data transmitted by the first host.
- the level signal corresponds to one bit in the byte except the first bit; within the duration of the first high level signal, if it is detected that the second host sends the
- the data sent by the serial data line is data with repeated start bits or stop bits, and the level signal of the serial data line matches the data sent by the second host, control the first The host stops transmitting data, and controls the second host to retransmit data or stop transmitting data.
- the second host sends the repeated start bit or stop bit to the serial data line, it will occur within the duration of the first high level signal, thereby avoiding the level transition of the serial data line of the bus and the serial data line.
- the error rate of the bus is reduced.
- FIG. 1 is one of the flowcharts of a multi-host arbitration method provided by an embodiment of the present application
- FIG. 2(a) is one of the schematic diagrams of arbitration between the first host and the second host provided by the embodiment of the present application;
- FIG. 2(b) is the second schematic diagram of arbitration between the first host and the second host provided by the embodiment of the present application
- FIG. 2(c) is the third schematic diagram of arbitration between the first host and the second host provided by the embodiment of the present application.
- FIG. 3 is the second flow chart of the multi-host arbitration method provided by the embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a first host provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a multi-host arbitration apparatus provided by an embodiment of the present application.
- FIG. 6 is one of the structural diagrams of an electronic device provided by an embodiment of the present invention.
- FIG. 7 is a second structural diagram of an electronic device provided by an embodiment of the present invention.
- first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
- the objects are usually of one type, and the number of objects is not limited.
- the first object may be one or more than one.
- “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
- FIG. 1 is one of the flowcharts of the multi-host arbitration method provided by the embodiment of the present application. As shown in Figure 1, the multi-host arbitration method specifically includes the following steps:
- Step 101 In the case where the first host uses the serial data line of the bus for data transmission, generate a first clock signal of the first host, and the duration of the first high-level signal in the first clock signal is longer than the second high-level signal.
- the duration of the level signal, the first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host, and the second high-level signal corresponds to the byte except the first bit in the byte.
- the outer one bit corresponds to.
- the above-mentioned bus includes but is not limited to I2C bus, and may also be other serial data transmission bus, which is not specifically limited in this application.
- the above-mentioned first host refers to one or more hosts that use the bus for data transmission. It should be noted that the bus includes a serial data line and a serial clock line. When the first host uses the serial data line of the bus for data transmission, the first host also needs to generate a first clock signal and send it to the serial data line of the bus.
- the row clock line sends the first clock signal, and controls the high and low level signals on the serial clock line of the bus through the first clock signal of the first host, and when the serial clock line of the bus is a high level signal , each byte in the data to be sent by the first host is sequentially transmitted according to the bits, so that the rate at which the first host sends data to the serial data line of the bus can be controlled by the first clock signal.
- the duration of the first high-level signal in the first clock signal of the first host is greater than the duration of the second high-level signal, wherein the first high-level signal is related to the first host.
- the first bit of the byte in the transmitted data corresponds to the second high level signal corresponding to one bit in the byte except the first bit, such as the second bit in the byte.
- To each of the eighth bits corresponds.
- the second high-level signal may correspond to the second bit in the byte, and may also correspond to the third bit, the fourth bit, the fifth bit, and the sixth bit in the byte. bit, the seventh bit or the eighth bit corresponds.
- the durations of the high-level signals of the clock signal corresponding to the second bit to the eighth bit here may be the same or different. That is to say, the duration of the first high-level signal corresponding to the first bit of the byte in the data transmitted by the first host needs to be greater than the duration of the second high-level signal corresponding to other bits in the byte. .
- the level signal on the serial clock line of the bus is determined by the first clock signal of the first host, that is, the level signal on the serial clock line of the bus is based on the first clock signal sent by the first host. And” logic to achieve.
- the multiple first hosts can respectively send the first clock signal to the serial clock line of the bus, and the serial clock line of the bus can execute " Wire-AND logic, which determines the level signal on the serial clock line of the bus.
- the "wire-and” logic here means that if any one of the multiple first clock signals is at a low level in a certain period of time, the serial clock line of the bus will show a low level in this period of time.
- the serial clock line of the bus shows a high level in this period. Therefore, when the duration of the first high-level signal of the first clock signal is prolonged, the duration of the high-level signal at the corresponding position of the clock signal line of the bus is also prolonged, so that the first host is During data transmission, the repeated start bit or stop bit sent by other hosts will occur within the duration of the first high-level signal, rather than at the transition position of the first high-level signal, which is beneficial to Avoid the situation where the level transition of the serial data line of the bus occurs at the same time as the level transition of the serial clock line.
- Step 102 During the duration of the first high-level signal, if it is detected that the data sent by the second host to the serial data line is data of repeated start bits or stop bits, and the level signal of the serial data line is the same as that of the serial data line. If the data sent by the second host matches, the first host is controlled to stop transmitting data, and the second host is controlled to retransmit data or stop transmitting data.
- the above-mentioned second host is at least one other host connected to the bus except the above-mentioned first host.
- the above-mentioned repeated start bit sent by the second host refers to the transition from a high-level signal to a low-level signal sent by the second host to the serial data line of the bus when the clock signal of the second host is a high-level signal.
- the transition signal is used for the second host to request the bus to transmit new data.
- the stop bit sent by the second host refers to the transition from a low-level signal to a high-level signal sent by the second host to the serial data line of the bus when the clock signal of the second host is a high-level signal.
- the signal is used by the second host to request the bus to stop transmitting data.
- the first host can be controlled to stop transmitting data
- the second host can be controlled to retransmit data according to the repeated start bit sent by it, or stop data transmission according to the stop bit sent by it.
- FIGS. 2 ( a ) to 2 ( b ) are schematic diagrams of arbitration between a first host and a second host according to an embodiment of the present application.
- the first host includes a first clock signal and a first data signal
- the second host includes a second clock signal and a second data signal
- the level signal on the serial clock line of the bus is the first
- the level signal after a clock signal and the second clock signal perform "wire AND” logic
- the level signal on the serial data line of the bus is the electrical level signal after the first data signal and the second data signal perform "wire AND” logic. flat signal.
- the second data signal sent by the second host is A stop bit, so after the serial data line of the bus performs the "wire AND" logic, the level signal at the position corresponding to the first high level signal is consistent with the second host, which is a stop bit. Therefore, the second host If the arbitration succeeds and the first host fails the arbitration, it is necessary to control the first host to stop transmitting data, and control the second host to also stop transmitting data. After that, the bus enters an idle state, and both the serial data line of the bus and the serial clock line of the bus are in a high-level state.
- the first data signal sent by the first host is still a high-level signal
- the second data signal sent by the second host is a repeated start bit
- both are a repeated start bit. Therefore, if the second host succeeds in the arbitration, the first host fails in the arbitration, it is necessary to control the first host to stop transmitting data, and control the second host to transmit new data. After that, the level state of the serial data line of the bus is consistent with the level state of the second data signal of the second host.
- the duration of the first high-level signal corresponding to the first bit of the byte is longer than that corresponding to other bits in the byte.
- the duration of the second high-level signal so that when the second host sends a repeated start bit or stop bit to the serial data line, it will occur within the duration of the first high-level signal, thereby avoiding serial
- the error rate of the bus is reduced.
- FIG. 3 is the second flowchart of the multi-master arbitration method provided by the embodiment of the present application.
- the method further includes:
- Step 103 During the duration of the first high-level signal, if it is detected that the data sent by the second host to the serial data line is a repeating start bit or a stop bit, and the level signal of the serial data line is the same as that of the first high-level signal. When the level signals of the data sent by the host match, the first host is controlled to continue to transmit data.
- the level signal of the data sent by the first host may be a high-level signal or a low-level signal, and is determined according to the data that the first host actually needs to send. For example, if the first host needs to send data 0 during the duration of the first high level signal, it sends a low level signal to the serial data line of the bus, if the first host needs to send data 0 for the duration of the first high level signal If data 1 needs to be sent, a high level signal is sent to the serial data line of the bus.
- the first high-level signal if it is detected that the data sent by the second host to the serial data line of the bus is a repeated start bit or stop bit, and the level signal of the serial data line is detected In the case of matching the level signal of the data sent by the first host, it means that the signal transmitted on the serial data line of the bus at this time is consistent with the signal transmitted by the first host, then it can be determined that the first bus arbitration is successful, and the first bus arbitration is successful. The arbitration of the two buses fails, and at this time, the first host can be controlled to continue to transmit data.
- FIG. 2( c ) is a schematic diagram of arbitration between another first host and a second host according to an embodiment of the present application.
- the first data signal sent by the first host is a low-level signal
- the second data signal sent by the second host is a If the start bit or a stop bit is repeated, after the serial data line of the bus performs the "wire AND" logic, the level signals at the position corresponding to the first high-level signal are all low-level signals, which are consistent with the first host. , therefore, the arbitration of the first host succeeds and the arbitration of the second host fails at this time. After that, the level state of the serial data line of the bus is consistent with the level state of the first data signal of the first host.
- the level signal of the serial data line of the bus can be judged by Whether it matches with the data bits sent by the first host determines whether the first host succeeds in arbitration. Therefore, when the second host sends repeated start bits or stop bits, correct arbitration can be achieved and the error rate of the bus can be reduced.
- the duration of the first high-level signal is twice the duration of the second high-level signal.
- the above-mentioned first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host
- the above-mentioned second high-level signal corresponds to a byte other than the first bit in the byte.
- the bits correspond, for example, to each of the second to eighth bits in the byte.
- the second high-level signal may correspond to the second bit in the byte, and may also correspond to the third bit, the fourth bit, the fifth bit, and the sixth bit in the byte. bit, the seventh bit or the eighth bit corresponds.
- the duration of the first high-level signal is twice the duration of the second high-level signal. For example, if the duration of the high level signal of the clock signal corresponding to the second bit to the eighth bit in the byte is 5 milliseconds, the duration of the first bit in the byte is 10 millisecond. In this way, the duration of the high-level signal corresponding to the first bit of the byte in the data can be longer than that of the high-level signal corresponding to other bits, thereby better avoiding the serial data line of the bus. The level transition of the serial clock line occurs at the same time, so as to achieve the effect of reducing the error rate of the bus.
- the high-level signal corresponding to the first bit in the byte is twice the duration of the high-level signal corresponding to the other bit except the first bit in the byte, it is actually The transmission efficiency of the bus has little effect. Therefore, this can not only avoid the conflict between the repeated start bit or the stop bit and the normal data bit when different hosts send data at the same time, especially for the cumulative read and write transmission, the effect is relatively obvious.
- the first host includes a byte counter, a bit counter and a clock signal generator
- step 101 generating the first clock signal of the first host, includes:
- the clock signal generator is controlled to generate a first high level signal at the position.
- FIG. 4 is a schematic structural diagram of a first host provided by an embodiment of the present application.
- the first host includes a byte counter, a bit counter and a clock signal generator, wherein the byte counter is used to count the bytes of data transmitted by the first host to the serial data line of the bus , the bit counter is used to count the bits in the bytes of the data transmitted by the first host to the serial data line of the bus, and the clock signal generator is used to generate the first clock signal.
- the first host may also include a control unit, a master state machine, a read register, a write register, a serial-to-parallel module, a parallel-to-serial module, etc., wherein the master state machine is used for the bus and the slave connected to the bus
- the control unit is used to read or write the data in the read register and write register according to the monitoring result of the main state machine, and the serial-to-parallel module is used to receive the serial data line from the bus. After the received data is converted from serial to parallel, it is transmitted to the read register, and the parallel-to-serial module is used to convert the data in the write register from parallel to serial, and then transmit it to the serial data line of the bus.
- the number of bytes transmitted by the first host to the serial data line of the bus can be determined according to the byte counter by obtaining the counting result of the byte counter and the bit counter in the first host , according to the bit counter to determine the number of bits of the bytes transmitted by the first host to the serial data line of the bus, thus, according to the counting results of the byte counter and the bit counter, it is possible to determine the number of bits in the data transmitted by the first host
- the first bit of the byte is at the corresponding position on the clock signal of the first host, and the clock signal generator is controlled to generate the first high-level signal at this position, that is, the first high-level signal at this position.
- the duration is prolonged, while the duration of the second high-level signal at the position corresponding to other bits in the byte remains unchanged.
- only one counter may be set in the first host, and the counter cyclically counts 0 to 8 bits in the byte, and when the first bit is counted, the clock signal is controlled.
- the generator generates a first high level signal at this position.
- the counting result of the byte counter and the bit counter of the first host it can be determined that the first bit of the byte in the data transmitted by the first host is on the clock signal of the first host.
- the corresponding position is controlled, so that the clock signal generator is controlled to generate the first high-level signal at the position, so that the accuracy of the first clock signal can be improved.
- the execution subject may be a multi-host arbitration device, or a control module in the multi-host arbitration device for executing the multi-host arbitration method.
- the multi-host arbitration device provided by the embodiment of the present application is described by taking the multi-host arbitration device executing the multi-host arbitration method as an example.
- FIG. 5 is a schematic structural diagram of a multi-host arbitration apparatus provided by an embodiment of the present application.
- the multi-master arbitration device 500 includes:
- the generating module 501 is configured to generate a first clock signal of the first host when the first host uses the serial data line of the bus for data transmission, and the duration of the first high-level signal in the first clock signal is greater than The duration of the second high-level signal, the first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host, and the second high-level signal corresponds to the byte divided by the first bit A bit other than the bit corresponds to;
- the first control module 502 is configured to, within the duration of the first high-level signal, detect that the data sent by the second host to the serial data line is data of repeated start bits or stop bits, and the serial data line In the case that the level signal matches the data sent by the second host, the first host is controlled to stop transmitting data, and the second host is controlled to retransmit data or stop transmitting data.
- the multi-master arbitration apparatus 500 further includes:
- the second control module is used for detecting that the data sent by the second host to the serial data line is a repeated start bit or a stop bit during the duration of the first high level signal, and the level of the serial data line If the signal matches the level signal of the data sent by the first host, the first host is controlled to continue to transmit data.
- the duration of the first high-level signal is twice the duration of the second high-level signal.
- the first host includes a byte counter, a bit counter and a clock signal generator;
- the generation module 501 includes:
- the acquisition unit is used to acquire the counting result of the byte counter and the bit counter;
- a determining unit for determining, according to the counting result, the position corresponding to the first bit of the byte in the data transmitted by the first host on the clock signal of the first host;
- the control unit is used for controlling the clock signal generator to generate the first high-level signal at the position.
- the multi-host arbitration apparatus 500 in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal.
- the apparatus may be a mobile electronic device or a non-mobile electronic device.
- the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
- UMPC ultra-mobile personal computer
- netbook or a personal digital assistant
- non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
- Network Attached Storage NAS
- personal computer personal computer, PC
- television television
- teller machine or self-service machine etc.
- the multi-master arbitration apparatus 500 in this embodiment of the present application may be an apparatus having an operating system.
- the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
- the multi-host arbitration apparatus 500 provided in this embodiment of the present application can implement each process implemented by the method embodiments in FIG. 1 to FIG. 4 , which is not repeated here to avoid repetition.
- an embodiment of the present application further provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601, the program Or when the instruction is executed by the processor 601, each process of the above-mentioned embodiment of the multi-host arbitration method is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
- the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
- FIG. 7 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
- the electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc. part.
- the electronic device 700 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 710 through a power management system, so as to manage charging, discharging, and power management through the power management system. consumption management and other functions.
- a power source such as a battery
- the structure of the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device.
- the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
- the processor 710 is configured to generate a first clock signal of the first host when the first host uses the serial data line of the bus to perform data transmission, and the duration of the first high-level signal in the first clock signal The time is greater than the duration of the second high-level signal, the first high-level signal corresponds to the first bit of the byte in the data transmitted by the first host, and the second high-level signal corresponds to the byte divided by the first bit.
- a bit other than one bit corresponds to;
- the processor 710 is further configured to, within the duration of the first high level signal, detect that the data sent by the second host to the serial data line is a repeated start bit or a stop bit, and the serial data line If the level signal of the first host matches the level signal of the data sent by the first host, the first host is controlled to continue to transmit data.
- the duration of the first high-level signal is twice the duration of the second high-level signal.
- the first host includes a byte counter, a bit counter and a clock signal generator
- the processor 710 is further configured to obtain the counting result of the byte counter and the bit counter;
- the clock signal generator is controlled to generate a first high level signal at the position.
- the electronic device 700 can implement each process implemented by the electronic device in the foregoing embodiments, and to avoid repetition, details are not repeated here.
- the second host when the second host sends the repeated start bit or stop bit to the serial data line, it occurs within the duration of the first high-level signal, thereby avoiding the serial data line of the bus.
- the level transition of the serial clock line occurs at the same time, which reduces the error rate of the bus.
- the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042. Such as camera) to obtain still pictures or video image data for processing.
- the display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
- the user input unit 707 includes a touch panel 7071 and other input devices 7072 .
- the touch panel 7071 is also called a touch screen.
- the touch panel 7071 may include two parts, a touch detection device and a touch controller.
- Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again.
- Memory 709 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems.
- the processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 710.
- the embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the multi-host arbitration method is implemented, and the same can be achieved.
- the technical effect, in order to avoid repetition, will not be repeated here.
- the processor is the processor in the electronic device in the above embodiment.
- the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
- An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used for running a program or an instruction to implement each process of the above-mentioned embodiment of the multi-host arbitration method, and can achieve the same In order to avoid repetition, the technical effect will not be repeated here.
- the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
- An embodiment of the present application further provides a computer program product, which is stored in a non-volatile storage medium, and when the computer program product is executed by at least one processor, implements each of the foregoing multi-host arbitration method embodiments process, and can achieve the same technical effect, in order to avoid repetition, it will not be repeated here.
- An embodiment of the present application further provides a communication device, the communication device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, where the program or instruction is processed by the processor
- the communication device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, where the program or instruction is processed by the processor
- the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
- the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
- a storage medium such as ROM/RAM, magnetic disk, CD-ROM
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Information Transfer Systems (AREA)
Abstract
Description
Claims (13)
- 一种多主机仲裁方法,包括:在第一主机使用总线的串行数据线进行数据传输的情况下,生成所述第一主机的第一时钟信号,所述第一时钟信号中的第一高电平信号的持续时间大于第二高电平信号的持续时间,所述第一高电平信号与所述第一主机所传输的数据中的字节的第一个比特位对应,所述第二高电平信号与所述字节中除所述第一个比特位之外的一比特位对应;在所述第一高电平信号的持续时间内,若检测到所述第二主机向所述串行数据线发送的数据为重复起始位或停止位的数据,且所述串行数据线的电平信号与所述第二主机所发送的数据匹配的情况下,则控制所述第一主机停止传输数据,并控制所述第二主机重新传输数据或者停止传输数据。
- 根据权利要求1所述的方法,其中,在第一主机使用总线的串行数据线进行数据传输的情况下,生成所述第一主机的第一时钟信号之后,还包括:在所述第一高电平信号的持续时间内,若检测到所述第二主机向所述串行数据线发送的数据为重复起始位或停止位,且所述串行数据线的电平信号与所述第一主机所发送的数据的电平信号匹配的情况下,则控制所述第一主机继续传输数据。
- 根据权利要求1所述的方法,其中,所述第一高电平信号的持续时间为第二高电平信号的持续时间的两倍。
- 根据权利要求1所述的方法,其中,所述第一主机包括字节计数器、比特位计数器和时钟信号发生器;所述生成所述第一主机的第一时钟信号,包括:获取所述字节计数器和所述比特位计数器的计数结果;根据所述计数结果,确定所述第一主机所传输的数据中的字节的第一个比特位在所述第一主机的时钟信号上所对应的位置;控制所述时钟信号发生器在所述位置生成所述第一高电平信号。
- 一种多主机仲裁装置,包括:生成模块,用于在第一主机使用总线的串行数据线进行数据传输的情况 下,生成所述第一主机的第一时钟信号,所述第一时钟信号中的第一高电平信号的持续时间大于第二高电平信号的持续时间,所述第一高电平信号与所述第一主机所传输的数据中的字节的第一个比特位对应,所述第二高电平信号与所述字节中除所述第一个比特位之外的一比特位对应;第一控制模块,用于在所述第一高电平信号的持续时间内,若检测到所述第二主机向所述串行数据线发送的数据为重复起始位或停止位的数据,且所述串行数据线的电平信号与所述第二主机所发送的数据匹配的情况下,则控制所述第一主机停止传输数据,并控制所述第二主机重新传输数据或者停止传输数据。
- 根据权利要求5所述的装置,其中,还包括:第二控制模块,用于在所述第一高电平信号的持续时间内,若检测到所述第二主机向所述串行数据线发送的数据为重复起始位或停止位,且所述串行数据线的电平信号与所述第一主机所发送的数据的电平信号匹配的情况下,则控制所述第一主机继续传输数据。
- 根据权利要求5所述的装置,其中,所述第一高电平信号的持续时间为第二高电平信号的持续时间的两倍。
- 根据权利要求5所述的装置,其中,所述第一主机包括字节计数器、比特位计数器和时钟信号发生器;所述生成模块,包括:获取单元,用于获取所述字节计数器和所述比特位计数器的计数结果;确定单元,用于根据所述计数结果,确定所述第一主机所传输的数据中的字节的第一个比特位在所述第一主机的时钟信号上所对应的位置;控制单元,用于控制所述时钟信号发生器在所述位置生成所述第一高电平信号。
- 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1-4任一项所述的多主机仲裁方法的步骤。
- 一种可读存储介质,其中,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-4任一项所述的多主机仲裁方法的步骤。
- 一种芯片,包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-4中任一项所述的多主机仲裁方法中的步骤。
- 一种通信设备,被配置为执行如权利要求1-4中任一项所述的多主机仲裁方法中的步骤。
- 一种计算机程序产品,其中,所述计算机程序产品被存储在非易失的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-4中任一项所述的多主机仲裁方法中的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110111278.6A CN112765082B (zh) | 2021-01-27 | 2021-01-27 | 多主机仲裁方法、装置和可读存储介质 |
CN202110111278.6 | 2021-01-27 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022161244A1 true WO2022161244A1 (zh) | 2022-08-04 |
Family
ID=75706085
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/072956 WO2022161244A1 (zh) | 2021-01-27 | 2022-01-20 | 多主机仲裁方法、装置和可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112765082B (zh) |
WO (1) | WO2022161244A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115396255A (zh) * | 2022-08-31 | 2022-11-25 | 哲库科技(北京)有限公司 | 电源控制方法、控制芯片、电源管理芯片和电子设备 |
CN117076373A (zh) * | 2023-10-16 | 2023-11-17 | 北京紫光芯能科技有限公司 | 一种通信方法、spi控制器及单片机 |
CN118916313A (zh) * | 2024-10-11 | 2024-11-08 | 湖南恩智测控技术有限公司 | 总线仲裁控制方法、装置、源载系统及存储介质 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112765082B (zh) * | 2021-01-27 | 2024-04-26 | 维沃移动通信有限公司 | 多主机仲裁方法、装置和可读存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0237839A2 (en) * | 1986-02-24 | 1987-09-23 | Chrysler Corporation | Serial data bus for intermodule data communications and method of data arbitration and collision detection on a data bus |
US5878234A (en) * | 1996-09-10 | 1999-03-02 | Sierra Wireless, Inc. | Low power serial protocol translator for use in multi-circuit board electronic systems |
US6175887B1 (en) * | 1998-10-21 | 2001-01-16 | Sun Microsystems, Inc. | Deterministic arbitration of a serial bus using arbitration addresses |
CN112765082A (zh) * | 2021-01-27 | 2021-05-07 | 维沃移动通信有限公司 | 多主机仲裁方法、装置和可读存储介质 |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0246666B1 (en) * | 1986-05-22 | 1994-05-04 | Chrysler Corporation | Serial data bus for different modes of operation (SCI, SPI and buffered SPI) and methods for a serial peripheral interface in a serial data bus |
US5745708A (en) * | 1995-09-29 | 1998-04-28 | Allen-Bradley Company, Inc. | Method for and apparatus for operating a local communications module in arbitrating for mastership of a data transfer across a back plane bus in industrial automation controller |
JP3228413B2 (ja) * | 1998-10-29 | 2001-11-12 | エヌイーシーマイクロシステム株式会社 | シリアルデータ通信装置および通信方法 |
JP2005128747A (ja) * | 2003-10-23 | 2005-05-19 | Fujitsu Ltd | シリアル転送バス用の送受信マクロを有する集積回路装置 |
JP2008242884A (ja) * | 2007-03-28 | 2008-10-09 | Matsushita Electric Ind Co Ltd | I2cバス制御回路 |
CN103218331B (zh) * | 2012-12-07 | 2015-11-11 | 浙江大学 | 采用同步模式切换及帧优先级自动调整的总线装置及方法 |
JP6060788B2 (ja) * | 2013-04-16 | 2017-01-18 | 株式会社ソシオネクスト | 調停回路、調停回路の制御方法、処理装置 |
CN103617138A (zh) * | 2013-12-16 | 2014-03-05 | 深圳市兴威帆电子技术有限公司 | 多主机仲裁方法及多主机通信系统 |
US10019306B2 (en) * | 2016-04-27 | 2018-07-10 | Western Digital Technologies, Inc. | Collision detection for slave storage devices |
US10872055B2 (en) * | 2016-08-02 | 2020-12-22 | Qualcomm Incorporated | Triple-data-rate technique for a synchronous link |
TWI614609B (zh) * | 2016-11-24 | 2018-02-11 | 英業達股份有限公司 | 積體電路匯流排仲裁控制系統 |
CN111026691B (zh) * | 2019-12-11 | 2021-05-25 | 北京工业大学 | 基于apb总线的owi通讯设备 |
CN111427831B (zh) * | 2020-03-27 | 2023-03-03 | 电子科技大学 | 一种基于电源管理总线协议的接口实现方法 |
CN111881076B (zh) * | 2020-06-29 | 2023-05-26 | 苏州浪潮智能科技有限公司 | 一种国产cpu和bbu通信的i2c总线挂死修复方法及装置 |
-
2021
- 2021-01-27 CN CN202110111278.6A patent/CN112765082B/zh active Active
-
2022
- 2022-01-20 WO PCT/CN2022/072956 patent/WO2022161244A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0237839A2 (en) * | 1986-02-24 | 1987-09-23 | Chrysler Corporation | Serial data bus for intermodule data communications and method of data arbitration and collision detection on a data bus |
US5878234A (en) * | 1996-09-10 | 1999-03-02 | Sierra Wireless, Inc. | Low power serial protocol translator for use in multi-circuit board electronic systems |
US6175887B1 (en) * | 1998-10-21 | 2001-01-16 | Sun Microsystems, Inc. | Deterministic arbitration of a serial bus using arbitration addresses |
CN112765082A (zh) * | 2021-01-27 | 2021-05-07 | 维沃移动通信有限公司 | 多主机仲裁方法、装置和可读存储介质 |
Non-Patent Citations (1)
Title |
---|
GAN HUI: "Simulating the I2C to Realize AVR and the MCS-51 Communication", JOURNAL OF YICHUN COLLEGE, vol. 30, no. 4, 31 August 2008 (2008-08-31), pages 54 - 56, XP055954891, ISSN: 1671-380X * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115396255A (zh) * | 2022-08-31 | 2022-11-25 | 哲库科技(北京)有限公司 | 电源控制方法、控制芯片、电源管理芯片和电子设备 |
CN117076373A (zh) * | 2023-10-16 | 2023-11-17 | 北京紫光芯能科技有限公司 | 一种通信方法、spi控制器及单片机 |
CN117076373B (zh) * | 2023-10-16 | 2024-02-27 | 北京紫光芯能科技有限公司 | 一种通信方法、spi控制器及单片机 |
CN118916313A (zh) * | 2024-10-11 | 2024-11-08 | 湖南恩智测控技术有限公司 | 总线仲裁控制方法、装置、源载系统及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN112765082A (zh) | 2021-05-07 |
CN112765082B (zh) | 2024-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022161244A1 (zh) | 多主机仲裁方法、装置和可读存储介质 | |
US10241955B2 (en) | Dynamically adjustable multi-line bus shared by multi-protocol devices | |
US10007628B2 (en) | Dynamically adjustable multi-line bus shared by multi-protocol devices | |
EP3844628B1 (en) | Slave-to-slave direct communication | |
US7562172B2 (en) | I2C Slave/master interface enhancement using state machines | |
US20190108149A1 (en) | I3c in-band interrupts directed to multiple execution environments | |
KR20160107247A (ko) | 대역-내 인터럽트를 이용한 카메라 제어 인터페이스 확장 | |
KR20170110610A (ko) | 시리얼 버스를 위한 수신 클록 캘리브레이션 | |
JP2017525200A (ja) | リンクレイヤ/物理レイヤ(phy)シリアルインターフェース | |
US11030133B2 (en) | Aggregated in-band interrupt based on responses from slave devices on a serial data bus line | |
US9626323B2 (en) | Keyboard-video-mouse switch and operating method thereof | |
US7353300B2 (en) | Apparatus to improve the firmware efficiency for a multiframe serial interface | |
US20190354505A1 (en) | Fast termination of multilane single data rate transactions | |
KR101861453B1 (ko) | CCIe 버스를 통한 슬레이브 식별자 스캔 및 핫 플러그 능력 | |
WO2019217077A1 (en) | Latency optimized i3c virtual gpio with configurable operating mode and device skip | |
EP3475836A1 (en) | Accelerated i3c master stop | |
US10146367B2 (en) | Synchronization method and touch signal processing system using the same | |
KR20190075280A (ko) | 호스트 컨트롤러, 보안 요소 및 직렬 주변기기 인터페이스 통신 시스템 | |
US20200065274A1 (en) | Always-on ibi handling | |
CN115729863A (zh) | 数据传输方法、装置、电子设备及介质 | |
TW202501209A (zh) | 一種省電方法、設備及計算機可讀存儲介質 | |
CN116594927A (zh) | Tod信号转发方法、装置、电子设备和存储介质 | |
CN119336148A (zh) | 一种外设管理设备及系统 | |
CN116880327A (zh) | 主备平台级联方法、装置、设备及介质 | |
CN110750471A (zh) | 一种基于gpio实现i2s从机功能的方法及终端 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22745119 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22745119 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/01/2024) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22745119 Country of ref document: EP Kind code of ref document: A1 |