Unibus communication system
By introducing the state machine and clock frequency division module into the single-bus communication system, the host clock frequency is adaptively adjusted to match the slave clock, which solves the problem of poor communication at different frequencies and improves the adaptability and reliability of the system.
Patent Information
- Application Number
- CN202410853119.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing single-bus communication systems require clocks of the same frequency for data transmission, and cannot achieve reliable master-slave communication functions under clocks of different frequencies, especially for chips with large clock frequency deviations.
A single-bus communication system is designed. By introducing a state machine module and a clock frequency division module into the single-bus host, the slave clock cycle is detected and the host clock frequency is adaptively adjusted to match the slave clock communication rate and realize operation at different frequencies. synchronous communication.
The adaptability and reliability of the single-bus communication system are improved, effective master-slave communication can be achieved within a wide clock frequency range, and the communication rate range is increased.
Smart Images

Figure CN118760641A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of integrated circuits, and in particular to a single bus communication system. Background Art
[0002] Single bus communication is used for asynchronous communication between different boards to realize data transmission. In the prior art, single bus communication between different boards requires the use of clocks of the same frequency for data transmission. The single bus master and slave need to communicate under a fixed clock, and the clock frequency deviation of the master and slave is high. For some chips with large clock frequency deviation, the single bus master-slave communication function cannot be realized. Summary of the invention
[0003] Based on the above situation of the prior art, the purpose of an embodiment of the present invention is to provide a single bus communication system that can dynamically and adaptively adjust the clock of the single bus host to keep it synchronized with the slave clock, thereby realizing reliable single bus communication function under clocks of different frequencies.
[0004] To achieve the above object, according to one aspect of the present invention, a single bus communication system is provided, the system comprising a first device and a second device, the first device and the second device being communicatively coupled via a single bus;
[0005] The first device includes a first state machine module and a clock frequency division module, and the second device includes a second state machine module;
[0006] The first state machine module controls to output a start signal at the beginning of each working cycle, so that the second state machine module sends a confirmation signal based on the start signal, and the confirmation signal is related to the clock frequency of the second device;
[0007] The first state machine module determines the current clock frequency based on the confirmation signal, and the clock frequency division module divides the clock of the first device based on the current clock frequency.
[0008] Furthermore, the first state machine module obtains a frequency division value based on the current clock frequency;
[0009] The clock frequency division module divides the clock of the first device based on the frequency division value.
[0010] Furthermore, the first device further includes a first communication interface, and the second device further includes a second communication interface; the first device and the second device perform single bus communication via the first communication interface and the second communication interface;
[0011] The first device outputs the start signal through the first communication interface;
[0012] The second device outputs the confirmation signal through a second communication interface.
[0013] Further, the first communication interface includes a first direction control unit, which controls the data transmission direction on the single bus according to an enable signal output by the first state machine module;
[0014] The second communication interface includes a second direction control unit, which controls the data transmission direction on the single bus according to an enable signal output by the second state machine module.
[0015] Furthermore, in each working cycle, the first device and the second device perform data communication at least once based on the current clock frequency;
[0016] Each data communication includes the first device sending a first data frame and the second device sending a second data frame.
[0017] Furthermore, the first device also includes a first output shift control module, a first data recovery module and an input shift control module;
[0018] The first output shift control module is used to shift and output the first data frame to the first communication interface through the first state machine module;
[0019] The first data recovery module is used to parse the received second data frame and recover it into second data;
[0020] The input shift control module is used for serially shifting the second data.
[0021] Furthermore, the second device also includes a second output shift control module, a second data recovery module and an input shift decoding module;
[0022] The second output shift control module is used to shift and output the second data frame to the second communication interface through the second state machine module;
[0023] The second data recovery module is used to parse the received first data frame and recover it into the first data;
[0024] The input shift decoding module is used to perform serial shift and decoding on the first data to obtain decoded data, wherein the decoded data includes an address, write data, a write signal and a read signal.
[0025] Furthermore, the second output shift control module is further used to determine the content of the second data frame to be sent according to the first data.
[0026] Furthermore, the second output shift control module determines the content of the second data frame to be sent according to the first data, including:
[0027] When the read / write bit of the first data is a read operation, the second data frame includes read data of a corresponding address in the second device;
[0028] When the read / write bit of the first data is a write operation, the second data frame includes the write data sent by the first device.
[0029] Furthermore, the first device is a host device, and the second device is a slave device.
[0030] In summary, an embodiment of the present invention provides a single bus communication system, which includes a first device and a second device, the first device and the second device are coupled via a single bus communication; the first device includes a first state machine module and a clock frequency division module, and the second device includes a second state machine module; the first state machine module controls the output of a start signal at the beginning of each working cycle, so that the second state machine module sends a confirmation signal based on the start signal; the first state machine module determines the current clock frequency based on the confirmation signal, and the clock frequency division module divides the clock of the first device based on the current clock frequency. The technical solution provided by the embodiment of the present invention is that the single bus host adaptively adjusts the clock frequency of the host by detecting the size of the single bus slave clock cycle to match the single-line slave clock communication rate, and can realize the single bus communication function under clocks of different frequencies, thereby improving the adaptability and reliability of the single bus communication system. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a schematic diagram of the overall structure of a single bus communication system provided by an embodiment of the present invention;
[0032] Figure 2 It is a schematic diagram of a data frame format of a single bus communication system provided by an embodiment of the present invention;
[0033] Figure 3 is a schematic diagram of the structure of a single-bus host control module provided by an embodiment of the present invention;
[0034] Figure 4 is a schematic diagram of the structure of a single bus slave control module provided by an embodiment of the present invention;
[0035] Figure 5 1 is a schematic diagram of a single bus communication control timing sequence provided by an embodiment of the present invention;
[0036] Figure 6 Schematic diagram of a control state machine of a single bus host provided by an embodiment of the present invention;
[0037] Figure 7 It is a schematic diagram of a control state machine of a single bus slave provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0039] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in one or more embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0040] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings. An embodiment of the present invention provides a single bus communication system, Figure 1 The overall structure diagram of the single bus communication system provided by the embodiment of the present invention is shown in FIG. Figure 1As shown, the single bus communication system includes a first device 101 and a second device 102, and the first device 101 and the second device 102 are coupled through a single bus (OWI, One-Wire Interface, is a serial communication bus that allows multiple devices to communicate with a central data processor or microcontroller through a single data line, and can also obtain power from the data line). In this embodiment of the present invention, the first device 101 is a single bus host, and the second device 102 is a single bus slave. The single bus host and the single bus slave perform bidirectional data transmission through a single bus OWI to achieve the reception, analysis, and response of interface commands. The single bus OWI is a data line, and the single bus host and the single bus slave respectively realize bidirectional data transmission through the single bus OWI. The single bus host is responsible for sending the external command data (register address, read and write bits, write data, etc.) received by the bus to the single bus slave through the single bus according to the set data frame format. The single-bus slave receives the command data sent by the single-bus master through the single-bus OWI and parses it into register addresses, register read and write control signals and write register values, thereby realizing read and write operations on the registers of the single-bus slave chip. In view of the fact that the single-bus slave chip requires multiple clock domains with different frequencies to perform single-bus communication, the single-bus master provided by the embodiment of the present invention can detect the slave clock cycle and adaptively adjust the master communication clock frequency, thereby realizing the communication function of the single-bus master and slave at different communication rates.
[0041] like Figure 1 As shown, the first device 101 includes a single bus host control module, and the second device 102 includes a single bus slave control module, a register group configuration module and a slave clock module. The first device 101 and the second device 102 communicate under the control of the single bus host control module and the single bus slave control module. According to an embodiment of the present invention, the single bus host control module in the first device 101 includes a first state machine module and a clock frequency division module, and the single bus slave control module in the second device 102 includes a second state machine module. The first state machine module controls the output of the start signal Start at the beginning of each working cycle, so that the second state machine module sends a confirmation signal ack based on the start signal Start, and the confirmation signal ack is related to the clock frequency of the second device. The first state machine module determines the current clock frequency of the second device 102 based on the confirmation signal ack, and the clock frequency division module divides the clock of the first device based on the current clock frequency, thereby realizing the unification of the clock frequencies of the single bus host and the slave. Further, the first state machine module can obtain a frequency division value based on the current clock frequency, and the clock frequency division module divides the clock of the first device 101 based on the frequency division value.
[0042] According to some optional embodiments, the first device 101 further includes a first communication interface, the second device 102 further includes a second communication interface, the first device 101 and the second device 102 perform single bus communication through the first communication interface and the second communication interface, the first device 101 can output a start signal Start through the first communication interface under the control of the first state machine module, and the second device 102 can output a confirmation signal ack through the second communication interface under the control of the second state machine module. In each working cycle, the first device 101 and the second device 102 perform at least one data communication based on the current clock frequency, and each data communication includes the first device 101 sending a first data frame (i.e., a host sending frame sent by a single bus host) and the second device sending a second data frame (i.e., a slave sending frame sent by a single bus slave). In this embodiment of the present invention, a working cycle includes the host waking up the slave (the host sends a start signal Start, and the slave sends a confirmation signal ack), the working state (data communication between the host and the slave: the host sends a frame, the slave sends a frame, the host sends a frame, the slave sends a frame...), and the dormant state. Figure 2 FIG. 4 is a schematic diagram showing the data frame format of a single bus communication system provided by an embodiment of the present invention. Figure 2 As shown, the data frame format consists of the slave wake-up state (the host sends the start signal Start, the slave responds with the confirmation signal ack), the working state (the host sends command data and receives slave register data) and the sleep state. The single bus interface is in the high-level sleep state idle by default. At this time, the working clock signal ows_clk output by the slave clock module of the single bus slave is turned off. The host sends the start signal Start to wake up the slave and turn on the slave working clock signal ows_clk to start single bus data transmission. The slave detects the start signal Start sent by the host under the working clock signal ows_clk and sends the confirmation signal ack to respond to the host. After the confirmation signal ack is sent, the slave wakes up and enters the working state. In the working state, the slave is responsible for implementing the read and write operations of multiple registers in the register group configuration module. The read or write operation of each register consists of the host sending a frame and the slave sending a frame. Therefore, within a working cycle, based on the current clock frequency detected this time, the host and the slave usually need to perform multiple data communications. After the host completes the reading and writing tasks of multiple registers, it stops sending data and sends a stop signal. After the single-bus slave detects the stop signal, it controls the slave to jump to the sleep state idle to end the transmission of single-bus data, turns off the slave working clock signal ows_clk, and waits for the next wake-up.
[0043] According to certain optional embodiments, the first communication interface includes a first direction control unit, which controls the data transmission direction on the single bus according to an enable signal output by the first state machine module; the second communication interface includes a second direction control unit, which controls the data transmission direction on the single bus according to an enable signal output by the second state machine module. Figure 3 The schematic diagram of the structure of the single bus host control module is shown in FIG. Figure 4 The schematic diagram of the structure of the single bus slave control module is shown in FIG. Figure 3 and Figure 4 As shown, the single-bus host control module and the single-bus slave control module realize data transmission and reception through a single-bus OWI. In this embodiment of the present invention, the first direction control unit and the second direction control unit are realized by a three-state gate, and the single-bus host is connected to the single-bus OWI through the three-state gate. The transmission and reception of data are controlled by the first state machine module. When the host does not send data (host receiving data state), the "first output data enable signal owm_en" is high level to release the single bus so that the slave can send data to the host through the single bus; when the host sends data (host sending data state), the "first output data enable signal owm_en" is low level, controlling owm_o to output the corresponding single bus data, so that the host sends the start bit signal Start or user command data to the single bus slave. The single-bus slave is connected to the single-bus OWI through a three-state gate, and the reception and transmission of data are controlled by the second state machine module. The second output data enable signal ows_en is valid at a low level. When the slave does not send data, the "second output data enable signal ows_en" is at a high level to release the bus; when the slave sends data, the "second output data enable ows_en" is at a low level, controlling ows_o to output the corresponding single-bus data, so that the slave sends an acknowledgment signal ack or the slave register data to respond to the single-bus host.
[0044] like Figure 3As shown, the single-bus host control module also includes a first output shift control module, a first data recovery module, an input shift control module and a control register. The first state machine module is used to control the sending and receiving of single-bus command data, detect the single-bus slave clock, and calculate the single-bus host clock division value owm_clk_div according to the detected single-bus slave clock frequency, so as to realize the adaptive clock calibration of the single-bus host. The clock division module is used to divide the system clock i_pclk of the single-bus host according to the division value owm_clk_div calculated by the single-bus host to obtain the single-bus host clock owm_clk, and adaptively adjust the single-bus host clock frequency to be consistent with the slave, so as to realize the communication rate matching between the single-bus host and the slave. The first output shift control module is used to shift and output the first data frame to the first communication interface through the first state machine module, that is, to shift and output the user-configured single-bus command data, the first data frame (the data frame sent by the single-bus host, the frame format includes, for example, "flag bit 0 + register address + read-write bit + write data bit + check bit"), and transmit it to the single-bus slave through the single-bus shift under the control of the first state machine module, so as to realize the read and write operation of the single-bus slave register. When the host receives data, the single-bus slave sends data to the host through the second communication interface, and the first data recovery module is used to parse and recover the received second data frame into the second data, that is, to parse and recover the external single-bus interface signal i_owm into the corresponding data owi_data, and then transmit the parsed bit data owi_data to the input shift control module for serial shifting to complete the reception of the single-bus slave data.
[0045] The single bus slave control module is used to receive and parse the command data sent by the single bus host, parse the received command data into the register address, write data and read / write signal required by the register group configuration module, and realize the configuration function of the single bus slave chip register. Figure 4As shown, the single-bus slave control module also includes a second output shift control module, a second data recovery module and an input shift decoding module. The second output shift control module is used to shift and output the second data frame sent by the single-bus slave to the second communication interface through the second state machine module; the second data recovery module is used to parse and recover the received first data frame into the first data; the input shift decoding module is used to serially shift and decode the first data to obtain decoded data, wherein the decoded data includes the address Addr, the write data wdata, the write signal wr and the read signal rd. The single-bus slave needs to perform single-bus communication under multiple clock domains with different frequencies to realize the function of receiving and sending data by the single-bus slave. The working clock signal ows_clk output by the slave clock module of the single-bus slave is turned off by default. The slave clock module is turned on by the enable signal owsclk_en. When the single-bus host initiates communication, the slave clock module is turned on, and when the single-bus transmission ends, the slave clock module is turned off. The second data recovery module is used to parse and recover the received single bus interface signal i_ows into the corresponding data owi_data, and then transmit the recovered data owi_data to the input shift decoding module for serial shifting. After the shifting is completed, the input shift decoding module decodes the data and parses the received data into the address Addr, the write data wdata, the write signal wr and the read signal rd to realize the read and write register operation. The second output shift control module is used to shift and output the slave transmission data tx_data to the second communication interface. The second output shift control module determines the content of the second data frame to be sent according to the first data (command data) sent by the single bus host. The second output shift control module determines the content of the second data frame according to the data bit of the first data (command data) sent by the single bus host. When the read and write bit of the first data is a read operation, the second data frame includes the read data of the corresponding address in the second device; when the read and write bit of the first data is a write operation, the second data frame includes the write data sent by the first device. The second output shift control module selects the second data content sent by the slave according to the read / write bit r / w in the command data sent by the host. If the read / write bit r / w indicates a write operation (for example, the read / write bit r / w is 1), the slave sends the write data wdata parsed by the input shift decoding module. If the read / write bit r / w indicates a read operation (for example, the read / write bit r / w is 0), the slave sends the read data rdata of the corresponding address in the register group configuration module. The read data valid signal i_rdata_vld and the write data valid signal i_wdata_vld can output the load enable signal tx_load through the OR gate. When the load enable signal tx_load is enabled, the slave transmit data tx_data is loaded into the second output shift control module for shift output.
[0046] In the embodiment of the present invention, the single-bus host provides a single-bus host clock adaptive calibration function to achieve communication with the single-bus slave in different frequency clock domains. The single-bus host can adaptively adjust the single-bus host working clock frequency according to the slave clock frequency. The first state machine module counts and detects the low-level length of the single-bus slave confirmation signal ack in the slave wake-up state, calculates the single-bus slave clock cycle size, and adaptively adjusts the clock frequency of the single-bus host according to the detected slave clock cycle size to match the single-bus slave communication rate and realize the single-bus communication function. The single-bus communication control timing is as follows: Figure 5 As shown, each frame of single-bus data packet is timed to detect the single-bus slave clock cycle in the slave wake-up state, and the single-bus master clock division value owm_clk_div is calculated according to the detected slave clock frequency, and then the single-bus master working clock is adaptively calibrated to be consistent with the slave clock to match the single-bus slave communication rate, thereby realizing the single-bus master-slave communication function. For example, the system clock frequency of the single-bus host is f. The single-bus host first sends a low-level start signal Start to wake up the single-bus slave (the length of the start signal Start depends on the lowest clock frequency of the slave). Then, under the system clock, the counter in the first state machine module counts and detects the low-level length of the slave confirmation signal ack (the single-bus slave confirmation signal ack is a fixed number of slave clock cycle low levels: for example, n*T_ows_clk). The size of the working clock cycle of the single-bus slave at this time is calculated according to the count value ack_ows_cnt, and the division value owm_clk_div is calculated (division value owm_clk_div=ack_ows_cnt / n). Under the system clock frequency f, the single-bus host clock owm_clk is generated by dividing the single-bus host clock division value (host clock frequency owm_clk_f=f / owm_clk_div). Then, under the single-bus host clock owm_clk, the single-bus host is controlled to send and receive data through the first communication interface to realize communication with the single-bus slave. After the register reading and writing for the slave is completed, this communication ends and enters the sleep state. At the beginning of the next working cycle, the single-bus host wakes up the slave again through the start signal Start and re-detects the slave frequency. In each working cycle, the host and the slave can communicate on the single bus based on different detection frequencies. During the slave wake-up state, each frame of the single-bus data packet adaptively calibrates the host clock frequency to be consistent with the slave, thereby increasing the communication rate range of the single-bus system, and can realize the single-bus communication function in multiple different frequency clock domains under a wider range of clocks; the single-bus communication clock of each frame of the single-bus data packet can accept the frequency deviation range of ±10%.
[0047] In the above process, the first state machine module controls the sending and receiving of the single bus command data. The first state machine module controls the sending of the start signal Start to wake up the single bus slave; the slave confirmation signal ack is detected to calculate the slave clock size, and the single bus host clock is adaptively adjusted to be consistent with the slave according to the detected slave clock, so as to realize the adaptive calibration of the host clock; then, under the single bus host clock owm_clk, the single bus data is controlled to complete the sending and receiving of data according to the set data frame format, so as to realize the single bus master-slave communication function. The control state machine of the single bus host is as follows: Figure 6 As shown, it is divided into an idle state idle, a sending start signal state Trans_start, a receiving slave confirmation signal ack response state, an adaptive calibration master clock state Trans_ows_clk_detect, a master sending data state Master_tx, and a master receiving data state Master_rx.
[0048] When idle, the state machine of the host is in the idle state. The user controls the state machine to jump to the Trans_start state by sending the start bit signal cfg_start through the control register configuration. In the Trans_start state, the first communication interface is controlled to send the start signal Start to the single bus slave. After the start signal Start is sent, the bus is released and the state machine is controlled to jump to the ack state to detect the slave confirmation signal ack response. In the ack state, the host detects the confirmation signal ack responded by the slave. In the receiving slave ack state, the low level length of the slave confirmation signal ack is counted and the single bus slave clock cycle is calculated. After receiving the slave confirmation signal ack, the control state machine jumps to the Trans_ows_clk_detect state, and the single-line host clock is adaptively adjusted to be consistent with the detected slave clock; if the slave confirmation signal ack is not detected after the timeout, it jumps to the idle state. In the Trans_ows_clk_detect state, the master clock division value owm_clk_div is calculated based on the detected single-bus slave clock cycle, the system clock is divided, and the single-bus master clock owm_clk consistent with the single-bus slave frequency is generated to realize the adaptive adjustment of the single-line master clock function. After completing the dynamic adjustment of the host clock, it jumps to the Master_tx state, completes the single-bus data transmission under the single-bus master clock owm_clk, and realizes the communication function with the single-bus slave. In the Master_tx state, the configured single-bus command data is controlled to be sent to the single-bus slave, and the command data to be sent is shifted and output to the first communication interface under the single-bus master clock owm_clk. After completing the shift output of the data, the control state machine jumps to the Master_rx state. In the Master_rx state, the data sent by the slave is received, the single bus interface signal is parsed and restored into the corresponding data, and then input into the input shift control module. After completing the slave data reception, the control state machine jumps to the idle state. In the idle state, it waits for the firmware configuration to send data cfg_tx_data and write signal cfg_tx_en to control the state machine to jump to the host send data state to execute the next command data transmission.
[0049] The control state machine of a single bus slave is as follows Figure 7As shown, the second state machine module controls the single bus data to complete the reception and transmission of data according to the data frame format, and realizes the read and write register function. The slave control state machine is divided into an idle state idle, a response state ack, a slave receiving data state slave_rx and a slave sending data state slave_tx. When idle, the slave state machine is in an idle state, and the control state machine jumps to the ack state after receiving the low-level start signal sent by the host. In the ack state, the slave outputs the confirmation signal ack timing (a fixed number of clock cycles low level: for example, n*T_ows_clk), and the slave releases the bus after completing the sending of the confirmation signal ack and jumps to the slave_rx state to receive the data sent by the host. In the slave_rx state, the received single bus data is shifted and input into the input shift decoding module, and the received data is parsed into the register address, write register data and read and write signal control to realize the read or write register operation. After completing the read and write register operation, the tx_load signal is generated to control the state machine to jump to the slave_tx state. The register data sent by the slave is selected according to the read and write bit sent by the host. In the slave_tx state, the data to be sent is shifted and output to the second communication interface. After completing the shift output of the data, the control state machine jumps to the next state, the slave_rx state, waiting to receive the next frame of command data sent by the host. If no stop signal is detected, the slave receiving data and the slave sending data states are executed cyclically to realize the read / write register operation. If a stop signal is detected (a high level with a preset fixed number of cycles), it jumps to the idle state, stops the single bus data transmission and turns off the module working clock, waiting for the next start signal to wake up.
[0050] In summary, an embodiment of the present invention relates to a single bus communication system, which includes a first device and a second device, the first device and the second device are coupled via a single bus communication; the first device includes a first state machine module and a clock frequency division module, and the second device includes a second state machine module; the first state machine module controls the output of a start signal at the beginning of each working cycle, so that the second state machine module sends a confirmation signal based on the start signal; the first state machine module determines the current clock frequency based on the confirmation signal, and the clock frequency division module divides the clock of the first device based on the current clock frequency. The technical solution provided by the embodiment of the present invention is that the single bus host adaptively adjusts the clock frequency of the host by detecting the size of the single bus slave clock cycle to match the single-line slave clock communication rate, and can realize the single bus communication function under clocks of different frequencies, thereby improving the adaptability and reliability of the single bus communication system.
[0051] It should be understood that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present invention (including claims) is limited to these examples; under the idea of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of one or more embodiments of the present invention as described above, which are not provided in detail for the sake of simplicity. The above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the scope of protection of the present invention. In addition, the claims attached to the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the attached claims, or the equivalent forms of such scope and boundaries.
Claims
1. A single bus communication system, It is characterized in that The system includes a first device and a second device, wherein the first device and the second device are communicatively coupled via a single bus; The first device includes a first state machine module and a clock frequency division module, and the second device includes a second state machine module; The first state machine module controls to output a start signal at the beginning of each working cycle, so that the second state machine module sends a confirmation signal based on the start signal, and the confirmation signal is related to the clock frequency of the second device; The first state machine module determines the current clock frequency based on the confirmation signal, and the clock frequency division module divides the clock of the first device based on the current clock frequency.
2. The system according to claim 1, It is characterized in that The first state machine module obtains a frequency division value based on the current clock frequency; The clock frequency division module divides the clock of the first device based on the frequency division value.
3. The system according to claim 2, It is characterized in that The first device further includes a first communication interface, and the second device further includes a second communication interface; the first device and the second device perform single bus communication via the first communication interface and the second communication interface; The first device outputs the start signal through the first communication interface; The second device outputs the confirmation signal through a second communication interface.
4. The system according to claim 3, It is characterized in that The first communication interface includes a first direction control unit, which controls the data transmission direction on the single bus according to an enable signal output by the first state machine module; The second communication interface includes a second direction control unit, which controls the data transmission direction on the single bus according to an enable signal output by the second state machine module.
5. The system according to any one of claims 1 to 4, It is characterized in that In each working cycle, the first device and the second device perform data communication at least once based on the current clock frequency; Each data communication includes the first device sending a first data frame and the second device sending a second data frame.
6. The system according to claim 5, It is characterized in that The first device also includes a first output shift control module, a first data recovery module and an input shift control module; The first output shift control module is used to shift and output the first data frame to the first communication interface through the first state machine module; The first data recovery module is used to parse the received second data frame and recover it into second data; The input shift control module is used for serially shifting the second data.
7. The system according to claim 5, It is characterized in that The second device also includes a second output shift control module, a second data recovery module and an input shift decoding module; The second output shift control module is used to shift and output the second data frame to the second communication interface through the second state machine module; The second data recovery module is used to parse the received first data frame and recover it into the first data; The input shift decoding module is used to perform serial shift and decoding on the first data to obtain decoded data, wherein the decoded data includes an address, write data, a write signal and a read signal.
8. The system according to claim 7, It is characterized in that The second output shift control module is further used to determine the content of the second data frame to be sent according to the first data.
9. The system according to claim 8, It is characterized in that The second output shift control module determines the content of the second data frame to be sent according to the first data, including: When the read / write bit of the first data is a read operation, the second data frame includes read data of a corresponding address in the second device; When the read / write bit of the first data is a write operation, the second data frame includes the write data sent by the first device.
10. The system according to claim 1, It is characterized in that The first device is a host device, and the second device is a slave device.
Citation Information
Patent Citations
Inter-integrated circuit (I2C) transmission method and device
CN102253910A
Pulse width self-adaptive single-bus receiver
CN104348468A
Unibus data communication method
CN104657303A
PLL system with master and slave devices
CN106095706A
Unibus communication system and method
CN114416622A
Cited By
Single-wire serial communication chip and single-wire serial communication method
CN119883978A
System and method for unibus communication rate adjustment and device identification
CN119938574A
System and method for single bus communication rate adjustment and device identification
CN119938574B
1-wire bus communication rate adjustment and device identification system and method
WO2026144799A1
