Search

CN-122019444-A - Communication rate adjusting method, device, equipment and readable storage medium

CN122019444ACN 122019444 ACN122019444 ACN 122019444ACN-122019444-A

Abstract

The invention discloses a communication rate adjusting method, a device, equipment and a readable storage medium, which are applied to the communication field and comprise the steps of comparing an idle counting value with an idle time threshold value if an external triggering signal is an idle counting signal, reducing the current communication rate if the idle counting value is larger than the idle time threshold value, increasing the current communication rate if the idle counting value is not larger than the idle time threshold value, inquiring the maximum communication rate supported by a corresponding slave machine through a slave machine address and a read-write control signal transmitted by a host machine side if the external triggering signal is a rate reading signal, comparing the maximum communication rate with the current communication rate, and outputting the maximum communication rate to a corresponding functional module if the maximum communication rate is smaller than the current communication rate, and outputting the current communication rate to the corresponding functional module if the maximum communication rate is not smaller than the current communication rate. The invention realizes power consumption optimization and transmission efficiency improvement, and enhances the adaptation capability of the I3C bus in complex application scenes.

Inventors

  • YUAN XIUYANG
  • ZOU XIAOFENG

Assignees

  • 山东博算智新信息科技有限公司

Dates

Publication Date
20260512
Application Date
20260126

Claims (10)

  1. 1. A communication rate adjustment method, applied to an I3C protocol-based terminal, comprising: The method comprises the steps of receiving an external trigger signal, wherein the external trigger signal comprises an idle counting signal and a rate reading signal; If the external trigger signal is the idle counting signal, comparing an idle counting value with an idle time threshold value, and if the idle counting value is larger than the idle time threshold value, reducing the current communication rate; and if the external trigger signal is the rate reading signal, inquiring the maximum communication rate supported by the corresponding slave machine through the slave machine address and the read-write control signal transmitted by the host machine side, comparing the maximum communication rate with the current communication rate, outputting the maximum communication rate to the corresponding functional module if the maximum communication rate is smaller than the current communication rate, and outputting the current communication rate to the corresponding functional module if the maximum communication rate is not smaller than the current communication rate.
  2. 2. The communication rate adjustment method according to claim 1, wherein querying the maximum communication rate supported by the corresponding slave through the slave address and the read-write control signal transmitted from the master side, comprises: And according to the slave address and the read-write bit control signal, the maximum communication rate supported by the corresponding slave is called from a register, and the maximum communication rate comprises a maximum read rate and/or a maximum write rate.
  3. 3. The communication rate adjustment method according to claim 2, characterized by, before retrieving the maximum communication rate supported by the corresponding slave from a register based on the slave address and read-write bit control signal, further comprising: When a slave machine speed obtaining command of a host logic control module is received and is effective, a serial clock line and a serial data line are controlled to send a starting signal, a universal address 7E and a write command, and a slave machine waits for one-time response, wherein the starting signal is used for completing the starting synchronization of bus communication, and the universal address 7E and the write command are used for waking up the slave machine on a bus and initiating write operation; when receiving a primary response signal of the slave, controlling the serial clock line and the serial data line to send an instruction for obtaining the maximum data rate, a transmission bit signal, a repeated starting signal, the slave address and a read control bit, and waiting for secondary response of the slave, wherein the instruction for obtaining the maximum data rate is used for instructing the slave to feed back the self-supported maximum communication rate; when a secondary response signal of a slave is received, collecting the maximum write rate of the slave on the serial clock line and the serial data line, and storing the maximum write rate and the slave address in association with the register; judging the transmission bit signal; If the transmission bit signal is 1, continuing to acquire the maximum reading rate of the slave machine, and storing the maximum reading rate and the slave machine address in association with the register; And if the transmission bit signal is 0, the maximum communication rate acquisition is finished.
  4. 4. The communication rate adjustment method according to claim 1, characterized by further comprising, before comparing the idle count value with the idle time threshold value: Resetting a bus idle counter when the bus idle time detection module is in an idle waiting state; When detecting a stop signal of bus transmission, when the bus idle time detection module is in a counting state, controlling the bus idle counter to count in a mode of adding 1 to each clock cycle, and detecting a start signal of bus transmission; when detecting the start signal of bus transmission, the bus idle time detection module is in an idle time output state, and controls the bus idle counter to stop counting to obtain the idle count value.
  5. 5. The communication rate adjustment method according to claim 1, wherein decreasing the current communication rate if the idle count value is greater than the idle time threshold, and increasing the current communication rate if the idle count value is not greater than the idle time threshold, comprises: If the idle count value is greater than the idle time threshold, the current communication rate is reduced by one gear; and if the idle count value is not greater than the idle time threshold value, increasing the current communication rate by one gear.
  6. 6. The communication rate adjustment method according to claim 1, characterized by further comprising, after increasing the current communication rate: judging whether the increased communication rate exceeds the maximum communication rate supported by the corresponding slave machine; If the communication rate exceeds the maximum communication rate, outputting the maximum communication rate; and if the communication rate is not exceeded, outputting the increased communication rate.
  7. 7. The communication rate adjustment method according to claim 1, characterized by further comprising, before increasing the current communication rate: synchronously acquiring bus load rate, and comparing the bus load rate with a preset load threshold value, wherein the bus load rate is the bus effective data transmission duration duty ratio in unit time; if the bus load rate is higher than a preset load threshold, suspending the current communication rate rising operation until the bus load rate is not higher than the preset load threshold, and then resuming the current communication rate rising operation.
  8. 8. A communication rate adjustment device, for use in an I3C protocol-based terminal, comprising: the device comprises a receiving module, a receiving module and a processing module, wherein the receiving module is used for receiving an external trigger signal, and the external trigger signal comprises an idle counting signal and a rate reading signal; The first adjusting module is used for comparing an idle counting value with an idle time threshold value if the external triggering signal is the idle counting signal, and reducing the current communication rate if the idle counting value is larger than the idle time threshold value; And the second adjusting module is used for inquiring the maximum communication rate supported by the corresponding slave machine through the slave machine address and the read-write control signal transmitted by the master machine side if the external trigger signal is the rate read signal, comparing the maximum communication rate with the current communication rate, outputting the maximum communication rate to the corresponding functional module if the maximum communication rate is smaller than the current communication rate, and outputting the current communication rate to the corresponding functional module if the maximum communication rate is not smaller than the current communication rate.
  9. 9. A communication rate adjustment device, comprising: A memory for storing a computer program; a processor for implementing the communication rate adjustment method according to any one of claims 1 to 7 when executing the computer program.
  10. 10. A computer readable storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement the communication rate adjustment method of any of claims 1 to 7.

Description

Communication rate adjusting method, device, equipment and readable storage medium Technical Field The present invention relates to the field of communications, and in particular, to a method, an apparatus, a device, and a readable storage medium for adjusting a communication rate. Background The I3C interface (the I3C interface refers to a serial communication interface of an I3C bus protocol) is used as an upgrade iteration scheme of the I2C interface, a two-wire bidirectional serial bus architecture is adopted on the basis of being compatible with the traditional I2C communication protocol, the performance optimization is finished specially aiming at networking application scenes of the multi-sensor slave equipment, and bus control rights of the multi-sensor slave equipment belong to only a single master equipment at any moment, so that the problem of collision of the multi-master equipment can be effectively avoided. However, the rate configuration mechanism of the existing I3C interface adopts an immobilization design, and In practical application, many limitations are exposed, namely, the rate configuration mechanism cannot be dynamically adjusted along with the bus load, unnecessary power consumption and loss can be caused In an idle period of a low load of the bus, when the rates of multiple slaves are inconsistent, the bus rate needs to be adapted to the slave with the lowest rate, so that the data transmission efficiency is greatly reduced, and the transmission of IBI (In-Band Interrupt) can only adopt a uniform rate, so that the transmission of IBI cannot be adapted to different slave demands. Therefore, how to provide a method for controlling an I3C interface capable of dynamically adjusting a rate, so as to reduce power consumption when a bus is idle, improve transmission efficiency under a multi-heterogeneous slave airport scene, and implement differential rate adaptation of IBI transmission is a technical problem to be solved currently. Disclosure of Invention Accordingly, the present invention is directed to a method, apparatus, device, and readable storage medium for adjusting communication rate, which solve the problems of idle power consumption of an I3C bus, inability to satisfy transmission efficiency under a multi-heterogeneous slave airport scene, and differential rate adaptation of IBI transmission in the prior art. In order to solve the technical problem, the present invention provides a communication rate adjusting method, which is applied to a terminal based on an I3C protocol, and includes: The method comprises the steps of receiving an external trigger signal, wherein the external trigger signal comprises an idle counting signal and a rate reading signal; If the external trigger signal is the idle counting signal, comparing an idle counting value with an idle time threshold value, and if the idle counting value is larger than the idle time threshold value, reducing the current communication rate; and if the external trigger signal is the rate reading signal, inquiring the maximum communication rate supported by the corresponding slave machine through the slave machine address and the read-write control signal transmitted by the host machine side, comparing the maximum communication rate with the current communication rate, outputting the maximum communication rate to the corresponding functional module if the maximum communication rate is smaller than the current communication rate, and outputting the current communication rate to the corresponding functional module if the maximum communication rate is not smaller than the current communication rate. On the one hand, inquiring the maximum communication rate supported by the corresponding slave machine through the slave machine address and the read-write control signal transmitted by the host machine side comprises the following steps: And according to the slave address and the read-write bit control signal, the maximum communication rate supported by the corresponding slave is called from a register, and the maximum communication rate comprises a maximum read rate and/or a maximum write rate. In one aspect, before the maximum communication rate supported by the corresponding slave is called from the register according to the slave address and the read-write bit control signal, the method further comprises: When a slave machine speed obtaining command of a host logic control module is received and is effective, a serial clock line and a serial data line are controlled to send a starting signal, a universal address 7E and a write command, and a slave machine waits for one-time response, wherein the starting signal is used for completing the starting synchronization of bus communication, and the universal address 7E and the write command are used for waking up the slave machine on a bus and initiating write operation; when receiving a primary response signal of the slave, controlling the serial clock line and the serial data line t