Data transmission method, master device, slave device and electronic device

By setting the first interface and the second interface in the main device, the data transmission process is simplified, and the data delay and interface complexity in the AXI interface are solved, zero-delay transmission and interface simplification are achieved, and chip area and cost are reduced. .

CN117725005BActive Publication Date: 2024-12-06北京智联安科技股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311658089.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-05
Publication Date
2024-12-06
Estimated Expiration
2043-12-05

AI Technical Summary

Technical Problem

The existing AXI interface has data delay problems in data transmission between the master and slave devices, resulting in untimely data transmission and high interface design complexity, increasing chip area and power consumption.

Method used

Set the first interface and the second interface in the master device to detect whether there is a request signal in the current clock cycle, and send the request signal to the slave device through the second interface when the specific level value conditions are met, simplifying the interface design and reducing redundancy Yuhe delay.

Benefits of technology

Zero-delay data transmission is realized, reducing the data transmission and reception delay between the master and slave devices, simplifying the interface design, and reducing chip area and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117725005B_ABST
    Figure CN117725005B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data transmission method, a master device, a slave device and an electronic device. The data transmission method includes: detecting whether there is a request signal in the master device in the current clock cycle. If there is a request signal in the master device, the first interface is detected. When the level value of the signal of the first interface is detected to meet the first preset condition, the request signal is sent to the slave device through the second interface. The master device in the present disclosure is provided with a first interface and a second interface. Due to the existence of the first interface and the second interface, the master device does not need to convert the internal signal into an existing standard bus signal interface, which reduces the redundancy and design complexity of the interface to a certain extent; in addition, the interface design of the present disclosure is simple, and can also effectively reduce the delay of data transmission and reception between the master device and the slave device, realize zero-delay transmission, and ensure the instant data processing characteristics of the slave device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a data transmission method, a master device, a slave device, and an electronic device. Background Art

[0002] In the related technology, AXI (Advanced eXtensible Interface) is generally used to transmit data between the master device and the slave device. However, the interconnection protocol and cache in the interface will cause too long data delay. For example, it takes 2 to 3 clock cycles from the master device generating data to the slave device receiving it. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present invention provides a data transmission method, a master device, a slave device and an electronic device.

[0004] According to a first aspect of an embodiment of the present disclosure, a data transmission method is provided, which is applied to a master device, wherein the master device includes a first interface and a second interface, and the data transmission method includes:

[0005] Detecting whether there is a request signal from the master device in the current clock cycle;

[0006] If the master device has a request signal, detecting the first interface;

[0007] When it is detected that the level value of the signal of the first interface meets the first preset condition, the request signal is sent to the slave device through the second interface.

[0008] In some embodiments, the master device includes a decoder, and the data transmission method further includes:

[0009] Determine the device number of the slave device according to the request signal;

[0010] Sending the request signal to the slave device through the second interface includes:

[0011] Determine a target data line according to the device number and the decoder; the target data line is a data line from the master device to the slave device in the bus;

[0012] The request signal is sent to the slave device through the second interface and the target data line.

[0013] In some embodiments, the master device further includes a third interface, and the data transmission method further includes:

[0014] When the master device has a request signal, increasing the level value of the signal of the third interface;

[0015] The sending the request signal to the slave device through the second interface includes:

[0016] When it is detected that the level value of the signal of the first interface meets the first preset condition and the level value of the signal of the third interface meets the second preset condition, the request signal is sent to the slave device through the second interface.

[0017] According to a second aspect of an embodiment of the present disclosure, a data transmission method is provided, which is applied to a slave device, wherein the slave device includes a fourth interface, and the data transmission method includes:

[0018] Using the fourth interface to receive at least one request signal; the request signal includes data, and the request signal has a corresponding relationship with the master device;

[0019] Determine a target master device, where the target master device is one of the at least one master devices corresponding to the at least one request signal;

[0020] Receive data corresponding to the target master device.

[0021] In some embodiments, determining the target master device includes:

[0022] Determining at least one master device corresponding to the at least one request signal;

[0023] A master device with the highest priority among the at least one master device is determined, and the master device with the highest priority is used as the target master device.

[0024] In some embodiments, the data transmission method further includes:

[0025] In the current clock cycle, a target instruction is sent to the bus; the target instruction is used to reduce the level value of the signal of the first interface of a non-target master device, and the non-target master device is a master device other than the target master device in the at least one master device.

[0026] In some embodiments, the slave device further includes a sixth interface, and the data transmission method further includes:

[0027] Detecting a level value of a signal of the sixth interface;

[0028] When the level value of the signal of the sixth interface meets the third preset condition, the fourth interface is used to receive the at least one request signal.

[0029] According to a third aspect of an embodiment of the present disclosure, a main device is provided, the main device comprising a first interface and a second interface, the main device comprising:

[0030] A first detection module, used to detect whether there is a request signal from the master device in the current clock cycle;

[0031] A second detection module, configured to detect the first interface if a request signal is present from the master device;

[0032] The sending module is used to send the request signal to the slave device through the second interface when it is detected that the level value of the signal of the first interface meets the first preset condition.

[0033] According to a fourth aspect of an embodiment of the present disclosure, a slave device is provided, the slave device comprising a fourth interface, the slave device comprising:

[0034] A first receiving module, configured to receive at least one request signal using the fourth interface; the request signal includes data, and the request signal has a corresponding relationship with the master device;

[0035] a determination module, configured to determine a target master device, wherein the target master device is one of the at least one master devices corresponding to the at least one request signal;

[0036] The second receiving module is used to receive data corresponding to the target master device.

[0037] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0038] processor;

[0039] a memory for storing processor-executable instructions;

[0040] The processor is configured to execute the data transmission method as described in the first aspect of the present disclosure or the second aspect of the present disclosure.

[0041] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the data transmission method as described in the first aspect of the present disclosure or the second aspect of the present disclosure.

[0042] The above method disclosed in the present invention has the following beneficial effects: a first interface and a second interface are provided in the master device in the present invention. Due to the existence of the first interface and the second interface, the master device does not need to convert the internal signal into the existing standard bus signal interface, which reduces the redundancy and design complexity of the interface to a certain extent; in addition, the interface design disclosed in the present invention is simple, and can also effectively reduce the delay in data sending and receiving between the master device and the slave device, realize zero-delay transmission, and ensure the real-time data processing characteristics of the slave device.

[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] Figure 1 The diagram is a schematic diagram of a scenario of a master device, a slave device and a bus according to an exemplary embodiment.

[0046] Figure 2 The figure is a flow chart showing a data transmission method according to an exemplary embodiment.

[0047] Figure 3 The figure is a flow chart showing a data transmission method according to an exemplary embodiment.

[0048] Figure 4 The figure is a flow chart showing a data transmission method according to an exemplary embodiment.

[0049] Figure 5 The figure is a flow chart showing a data transmission method according to an exemplary embodiment.

[0050] Figure 6 The figure is a flow chart showing a data transmission method according to an exemplary embodiment.

[0051] Figure 7 The figure is a flow chart showing a data transmission method according to an exemplary embodiment.

[0052] Figure 8 It is a schematic diagram of an interface of a main device according to an exemplary embodiment.

[0053] Fig. 9 It is a schematic diagram of an interface of a slave device according to an exemplary embodiment.

[0054] Fig.10 The diagram is a timing diagram showing a single master device accessing a slave device according to an exemplary embodiment.

[0055] Fig.11 The diagram is a timing diagram showing multiple master devices accessing slave devices according to an exemplary embodiment.

[0056] Fig.12 is a block diagram of a master device according to an exemplary embodiment.

[0057] Fig.13is a block diagram of a slave device according to an exemplary embodiment.

[0058] Fig.14 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0059] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0060] A bus is a set of electrical lines used to transmit information in a computer or other electronic device. It is a way to transmit information between various components in a computer. The bus usually consists of an address bus, a data bus, and a control bus.

[0061] Usually, there are multiple devices connected to the bus, and multiple devices can communicate and transmit data. However, although there are multiple devices connected to the bus, the occupancy of the bus is relatively limited, that is, only one pair of devices can use the bus at the same time. In order to better distinguish the devices connected to the bus, the relevant technology can divide the multiple devices connected to the bus into master devices and slave devices according to the flow direction and control method of data.

[0062] The master device has control over the bus and can apply for bus occupation. After occupying the bus, the master device can communicate with another device through the bus. The slave device cannot control the bus or apply for bus occupation. It can only receive data or requests from the master device. Accordingly, the data flow only supports one-way transmission from the master device to the slave device, and does not support the slave device actively returning data or the master device sending a read request.

[0063] Most current chips use FPGA (Field Programmable Gate Array) for logic design and data processing. There are multiple modules inside the FPGA. Accordingly, in the actual application process, the amount of data generated by using FPGA for logic design and data processing is very large. Therefore, it is necessary to process the generated or acquired data in a timely manner, thereby ensuring the low latency of data transmission. In order to solve the delay or other problems caused by a large amount of data, a standard bus protocol is usually used for data transmission to reduce the delay time. Among them, the standard bus protocol can include AHB (Advanced High Performance Bus), AXI, AXI Stream (referring to the simplest bus protocol in the AXI protocol), etc. Taking AXI Stream as an example, its interfaces are mainly: TVALID, TDATA, TSTRB, TKEEP, TLAST, TID, TDEST, TUSER, TREADY. In the application process, in order to enable the master device and the slave device to communicate normally, each manufacturer usually develops the master device and the slave device based on the interface of AXI Stream. Therefore, the master device and the slave device set on AXI Stream are also provided with the above interface.

[0064] However, although the standard interface of AXI Stream can quickly make different devices compatible and interconnected, it also has many problems. For example, the AXI Stream interface bus has a lot of logic, but many logical functions are not used in practice. Too many useless logical functions will lead to a larger chip area and limited operating frequency; there are many signals generated at the interface, which makes the connection between the master and slave devices complicated, increasing the chip area and power consumption of the chip; the interconnection protocol and cache cause excessive data delay. Basically, a delay of 2 to 3 clocks is required from the master device generating data to the slave device receiving data, which is not conducive to the timeliness of data sending and receiving; and the AXI Stream interface bus generates many signals and protocols, but many functions are not used in simple data transmission, and the inspection and protection of these useless signals and logic will instead cause extra waste of time, manpower, and chip area.

[0065] In order to solve the above problems, the present disclosure provides a data transmission method. The data transmission method in the present disclosure is to set a first interface and a second interface in the master device, and detect whether there is a request signal in the master device in the current clock cycle. If there is a request signal in the master device, the first interface is detected, and when the level value of the signal of the first interface is detected to meet the first preset condition, the request signal is sent to the slave device through the second interface. Therefore, the master device in the present disclosure is provided with a first interface and a second interface. Due to the existence of the first interface and the second interface, the master device does not need to convert the internal signal into an existing standard bus signal interface, which reduces the redundancy and design complexity of the interface to a certain extent; in addition, the interface design of the present disclosure is simple, and it can also effectively reduce the delay of data transmission and reception between the master device and the slave device, realize zero-delay transmission, and ensure the instant data processing characteristics of the slave device. At the same time, the interface design is simple, which will also reduce the logic complexity, thereby reducing the area and cost of the chip.

[0066] It should be noted that the present disclosure is particularly suitable for data transmission scenarios, and the present disclosure is also particularly suitable for scenarios with high requirements for the timeliness of data sending and receiving, such as lidar scenarios.

[0067] For ease of understanding, the present disclosure provides a schematic diagram of a scenario of a master device, a slave device, and a bus, such as Figure 1 As shown, Figure 1 It includes multiple master devices (such as master device 1, master device 2, ..., master device M), multiple slave devices (such as slave device 1, slave device 2, ..., slave device N), and data lines (i.e., buses) in the rectangular frame. Figure 1 It can be seen that a data line is provided between the master device and the slave device, and a master device can communicate with multiple slave devices through multiple data lines (but it should be noted that a master device can only communicate with one slave device at the same time), that is, the corresponding relationship between the master device and the slave device is many-to-many.

[0068] pass Figure 1 From the scenario diagram shown, we can also see that the data flow is that the master device sends data, which is then sent to the corresponding slave device through the bus.

[0069] The exemplary embodiments of the present disclosure provide a data transmission method, which is applied to a master device, wherein the master device is a device that can send a control signal to a bus, for example, in a computer, the master device can be a processor or a controller. In a lidar system, the master device can be a CSI-2 (Camera Serial Interface-2) camera, a SERDES (serial deserializer), a microcode processor, a calibration module, etc. Various hardware resources can also be provided on the master device, as well as an energy storage device that provides power for the operation of various hardware resources.

[0070] An embodiment of the present disclosure provides a data transmission method. Figure 2 FIG. 1 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 2 As shown, the data transmission method shown in this embodiment includes:

[0071] S201, detecting whether a request signal exists in the master device in the current clock cycle.

[0072] S202: If the master device has a request signal, detect the first interface.

[0073] S203: When it is detected that the level value of the signal of the first interface meets the first preset condition, send a request signal to the slave device through the second interface.

[0074] In step S201, the clock cycle is also called the oscillation period, which is defined as the reciprocal of the clock frequency. The clock cycle is the most basic and smallest unit of time in a computer. In one clock cycle, the CPU (Central Processing Unit) only completes one most basic action. The clock cycle is a quantity of time. The clock cycle represents the highest frequency at which SDRAM (synchronous dynamic random-access memory) can run. A smaller clock cycle means a higher operating frequency. In order to ensure the zero-delay characteristic of data, the data sending and receiving process needs to be completed within one clock cycle.

[0075] It should be noted that, since there are multiple master devices on the bus, and at the same time, the bus only allows one master device to use the bus. Therefore, before determining whether the master device has a request signal, it is also necessary to determine whether the master device has occupied the bus at this time. And only after the master device has occupied the bus, it is determined that the bus can be used by the master device at this time.

[0076] When a request signal is sent from the master device, it indicates that the master device hopes that a slave device can provide services for it (the services here may refer to data transmission services or other instruction services). That is, the master device has a slave device that it wants to access. Referring to the above, the interaction process between the master device and the slave device, it can be obtained that a bus is provided between the master device and the slave device, and the bus is the communication hub between the master device and the slave device. Therefore, when a request signal is sent from the master device, the master device will first send the request signal to the bus. At this time, the bus that receives the request signal will determine whether the slave device that the master device wants to access can provide services for the master device (that is, whether the slave device can perform data transmission services with the master device or respond to instructions from the master device).

[0077] In order to make the technical solution clearer, the following briefly describes the process of the bus judging whether the slave device can provide services to the master device:

[0078] The slave device is provided with a fifth interface, and the signal of the fifth interface can be used to characterize the state of the slave device. In one example, the fifth interface can be a full interface. When the signal of the full interface is high, it means that the slave device is full and the slave device can no longer receive data. Correspondingly, the slave device cannot provide services to the master device. It should be noted that the level value of the signal refers to the high and low levels of the signal. In digital circuits, the role of the signal level is very important, which directly affects the working state of the digital circuit and the reliability of data transmission. The level of the signal determines the working state of the digital circuit. In digital circuits, a high level is usually represented as 1 and a low level is represented as 0. When the signal is high, the digital circuit will perform the corresponding operation, and when the signal is low, the digital circuit will not perform any operation. Therefore, when the signal of the full interface is high, the corresponding full signal = 1. Correspondingly, when the signal of the full interface is low, the corresponding full signal = 0.

[0079] In order to obtain a more accurate state of the slave device, the bus will determine whether the slave device can provide services to the master device from two aspects, wherein the first aspect is to detect the level value of the signal of the fifth interface in the slave device. If the level value of the signal of the fifth interface is detected to be high, the bus can directly determine that the slave device is full and can no longer provide services to the master device. If the level value of the signal of the fifth interface is detected to be low, the bus determines that the slave device is not full. Here, the bus also needs to further determine whether the slave device can provide services to the master device through the second aspect. The second aspect is to determine whether the slave device has been occupied by other master devices with higher priority, that is, whether the slave device is providing services to other master devices.

[0080] In an example, the slave device can provide services to the master device only if the level value of the signal of the fifth interface is a low level and the slave device does not provide services to other master devices.

[0081] In step S202, after detecting the status of the slave device, the bus will return a feedback signal to the master device according to the status of the slave device. And this feedback signal will be sent to the first interface. It can be seen that the feedback signal is the signal corresponding to the first interface. Therefore, detecting the first interface is actually detecting the signal corresponding to the first interface to determine whether the slave device can provide services to the master device. In one example, the first interface can be represented as a ready interface, and the ready signal can be used to characterize the status of the slave device. That is, when ready=0 (that is, the level value of the ready signal is a low level), it means that the slave device cannot provide services to the master device at this time. When ready=1 (that is, the level value of the ready signal is a high level), it means that the slave device can provide services to the master device at this time.

[0082] In addition, it should be noted that, by combining the ready signal with the full signal, this embodiment can adjust the level value of the ready signal when the slave device is unable to provide services to the master device, thereby controlling the flow of data on the master device and reducing the number of master devices sending request signals to the slave device.

[0083] In one example, assuming that the bus will send a feedback signal to the master device only when the slave device can provide services to the master device, the detection of the first interface can be to detect whether the first interface receives the feedback signal. For example, if the first interface receives the feedback signal, it means that the slave device can provide services to the master device; if the first interface does not receive the feedback signal, it means that the slave device cannot provide services to the master device.

[0084] In another example, assuming that the bus sends a feedback signal to the master device regardless of the state of the slave device, the signal of the first interface can be detected. In this embodiment, the specific features of the signal of the first interface are not limited. For example, the features (time domain features, frequency domain features) of the signal of the first interface can be detected; for another example, the level value of the signal of the first interface can be detected.

[0085] In step S203, in one example, the first preset condition may be a condition corresponding to when the level value of the signal is a high level, such as when the level value of the signal is greater than a preset threshold, or when the level value of the signal is within a preset range, etc. For example, when the level value of the signal is greater than a preset threshold, which is a boundary value between a high level and a low level, it indicates that the level value of the first interface is a high level, and when the level value of the signal is less than or equal to the preset threshold, it indicates that the level value of the first interface is a low level.

[0086] Therefore, when the level value of the signal of the first interface meets the first preset condition, it can be understood that the level value of the signal of the first interface is a high level (ie, ready = 1), indicating that the slave device can provide services to the master device. Therefore, the master device can send the request signal to the slave device through the second interface. In one example, the second interface can be an interface that can perform data / instruction transmission. For example, the second interface can be a data1 interface. Through the second interface, the master device can send the request signal to the bus, and send it to the slave device through the bus, thereby realizing data transmission between the master and slave devices. When the master device completes the data transmission with the slave device in the current clock cycle, the master device can perform the next data transmission or enter an idle state until the request signal is initiated again.

[0087] It should be noted that there is a corresponding relationship between the level values ​​of the request signal and the signal of the data1 interface, that is, when the master device has a request signal, the level value of the signal of the data1 interface should also correspond to a certain value. In one example, this value can be a set value that can be used to characterize the presence of a request signal in the master device, for example, the level value of the signal of the data1 interface = 1. In another example, this value can also be a value related to the size of the request signal, for example, the data size of the request signal is a, and the corresponding level value of the signal of the data1 interface = a*b, where b represents the functional relationship between the level value and the data size of the request signal; for another example, this value can be directly the same as the size of the request signal. Assuming that the size of the request signal is x, the level value of the signal of the data1 interface can be directly represented by x. Among them, x represents the data bit width, x can be any width, and the size of x can be set according to actual needs, such as 32 bits, 64 bits, etc.

[0088] In addition, if the level value of the signal of the first interface does not meet the first preset condition, it means that the slave device cannot provide services to the master device, that is, the slave device may be in a full state at this time, or the slave device may be providing services to other master devices. In other words, in the current clock cycle, the slave device cannot temporarily provide services to this master device. Therefore, the master device can continue to maintain the level values ​​of the request signal and the signal of the second interface to put the master device in a waiting state. If the level value of the signal of the first interface meets the first preset condition in the next clock cycle of the current clock cycle or in other clock cycles, the master device can directly send the request signal to the slave device through the second interface, thereby simplifying the interaction process and reducing chip power consumption.

[0089] refer to Figure 1 ,visible, Figure 1 The above steps S201-S203 are performed by one of the master devices. In the actual application process, other master devices can refer to steps S201-S203 to perform the same operation.

[0090] The data transmission method in this embodiment is to set the first interface and the second interface in the master device, and detect whether the master device has a request signal in the current clock cycle. If the master device has a request signal, the first interface is detected, and when it is detected that the level value of the signal of the first interface meets the first preset condition, the request signal is sent to the slave device through the second interface. Therefore, the master device in the present disclosure is provided with the first interface and the second interface. Due to the existence of the first interface and the second interface, the master device does not need to convert the internal signal into the existing standard bus signal interface, which reduces the redundancy and design complexity of the interface to a certain extent; in addition, the interface design of the present disclosure is simple, and can also effectively reduce the delay of data transmission and reception between the master device and the slave device, realize zero-delay transmission, and ensure the instant data processing characteristics of the slave device.

[0091] An embodiment of the present disclosure provides a data transmission method. Figure 3 FIG. 1 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 3 As shown, the data transmission method shown in this embodiment includes:

[0092] S301, detecting whether a request signal exists in the master device in the current clock cycle.

[0093] S302: If the master device has a request signal, detect the first interface.

[0094] S303: When it is detected that the level value of the signal of the first interface meets the first preset condition, determine the device number of the slave device according to the request signal.

[0095] S304: Determine the target data line according to the device number and the decoder.

[0096] S305 . Send a request signal to the slave device through the second interface and the target data line.

[0097] Among them, steps S301-S302 are the same as steps S201-S202 in the above embodiment and are not described again here.

[0098] In step S303, after the bus detects the request signal, it first determines whether the slave device that the master device wants to access can provide services to the master device. Therefore, the request signal includes the device number of the slave device so that the bus can detect the slave device. Therefore, the device number of the slave device can be directly queried in the request signal.

[0099] In step S304, the master device also includes a decoder. After determining the device number of the slave device, refer to Figure 1 The connection relationship between the master device and the slave device shown in the figure shows that one master device is connected to multiple slave devices. In order to ensure that the master device can interact with the slave device it really wants to access, the target data line between the master device and the slave device can also be selected through a decoder. Among them, the target data line is a data line from the master device to the slave device in the bus, that is, the target data line is Figure 1 A data line in a rectangular frame.

[0100] In step S305, based on the above steps S303 and S304, the device number of the slave device that the master device wants to access, and the data line between the master device and the slave device that the master device wants to access are determined. Therefore, the sending end (master device), the receiving end (slave device corresponding to the device number) and the transmission path (target data line) in the data interaction process have all been clearly identified. Therefore, the request signal can be sent to the slave device through the second interface and the target data line.

[0101] In this embodiment, it is possible to verify from two aspects whether the determined slave device is the same slave device, thereby avoiding the situation where the device number corresponds to slave device A and the target data line corresponds to slave device B. In addition, determining the device number can determine the receiving end in the interaction process, and determining the target data line can determine the transmission path, thereby ensuring the smooth progress of the data transmission process.

[0102] An embodiment of the present disclosure provides a data transmission method. Figure 4 FIG. 1 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 4 As shown, the data transmission method shown in this embodiment includes:

[0103] S401, detecting whether a request signal exists in the master device in the current clock cycle.

[0104] S402: If the master device has a request signal, increase the level of the signal of the third interface and detect the first interface.

[0105] S403: When it is detected that the level value of the signal of the first interface meets the first preset condition and the level value of the signal of the third interface meets the second preset condition, determine the device number of the slave device according to the request signal.

[0106] S404: Determine the target data line according to the device number and the decoder.

[0107] S405 . Send a request signal to the slave device through the second interface and the target data line.

[0108] Among them, steps S401, S404-S405 are the same as steps S301, S304-S305 in the above embodiment, and are not repeated here.

[0109] In step S402, the third interface may refer to the push1 interface, and the level of the signal of the third interface is only related to whether the master device has data to transmit, that is, whether the master device has a request signal.

[0110] In an example, when the master device has a request signal, the level value of the signal of the third interface may be increased, that is, the level value of the signal of the third interface may be increased to a high level.

[0111] In step S403, the second preset condition may represent a condition corresponding to when the level value of the signal is at a high level, such as, for example, the level value of the signal is greater than a preset threshold, or the level value of the signal is within a preset range, etc. Since in step S402, the level value of the signal of the third interface has been increased to a high level, therefore, when the master device has a request signal, the level value of the signal of the third interface fully meets the second preset condition.

[0112] Correspondingly, it is only necessary to detect whether the level value of the signal of the first interface meets the first preset condition according to the content shown in the above step S203, and determine the device number of the slave device when the level value of the signal of the first interface meets the first preset condition and the level value of the signal of the third interface meets the second preset condition.

[0113] In this embodiment, two prerequisites are given for the master device to send a request signal to the slave device. Only when these two prerequisites are met at the same time can the master device send the request signal to the slave device. This embodiment can effectively control the number of master devices that send request signals to the slave device, thereby effectively controlling the flow of the master device data flow.

[0114] An embodiment of the present disclosure provides a data transmission method. Figure 5 FIG. 1 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 5 As shown, the data transmission method shown in this embodiment is applied to a slave device, and includes:

[0115] S501: Receive at least one request signal using a fourth interface.

[0116] S502: Determine a target master device.

[0117] S503: Receive data corresponding to the target master device.

[0118] Among them, the slave device refers to the device that receives and processes the information of the master device and performs specific tasks, such as hard disk, printer, etc. In the lidar system, the slave device can be SERDES (serial deserializer), microcode processor, calibration module, network MAC interface.

[0119] In step S501, in the current clock cycle, the slave device can receive a request signal from at least one master device through the data line. The request signal includes the data that the master device wants to transmit, and there is a corresponding relationship between the request signal and the master device, which is a one-to-one correspondence, that is, one request signal corresponds to one master device. It should be noted that the request signal sent by the master device includes the device number of the slave device, but the function of the device number is to enable the bus to identify the slave device that the master device wants to access. It can be seen that the device number of the slave device added in the request signal is mainly for the use of the bus, and the slave device does not need the device number information.

[0120] In one example, before the bus sends a request signal to the slave device, the device number information of the slave device in the request signal sent by the master device can be discarded to reduce system redundancy. That is, the request signal received by the slave device is different from the request signal sent by the master device in terms of content, and whether the device number information of the slave device is included.

[0121] In another example, the device number information of the slave device in the request signal sent by the master device may not be discarded, so that the request signal received by the slave device is the same as the request signal sent by the master device, which facilitates verification of the request signal.

[0122] It should be noted that the purpose of determining that there is a corresponding relationship between the request signal and the master device is to determine the corresponding master device through the request signal, so as to facilitate the subsequent steps S502-S503.

[0123] In one example, the fourth interface is an interface of the same nature as the second interface, and the difference between the two is that the second interface is for the master device to send data or request signals to the outside, while the fourth interface is for the slave device to receive data or request signals from the outside. Therefore, similar to the second interface, the fourth interface can be a data2 interface. Among them, the properties of the two interfaces data1 interface and data2 interface are similar, but in order to distinguish, the data interface in the master device is defined as data1 interface, and the data interface in the slave device is defined as data2 interface.

[0124] In addition, although the slave device uses the fourth interface to receive the request signal from the master device, the slave device does not receive the data in the request signal of the master device at this time. It can be understood that the request signal received by the fourth interface may be temporarily stored in a certain location in the slave device, such as a storage module of the slave device, for subsequent selection.

[0125] In step S502, although the slave device receives at least one request signal, the slave device can only perform data transmission with one master device in one clock cycle. Therefore, at least one master device corresponding to the at least one request signal can be determined, and one master device, i.e., the target master device, can be determined from the at least one master device.

[0126] In one example, an arbitrator can be set in the slave device, and the arbitrator is used to determine the target master device. The application of arbitrators in FPGA is very extensive. Its essence is to make a decision on the final ownership of the resource at this moment when there are two or more modules that need to occupy the same resource. For example, in class, the teacher asked a question, and many students raised their hands. The teacher finally chose one of the students to answer the question. In this process, the students with hands are the two or more modules mentioned above. The opportunity to answer the question is the resource that two or more modules want to occupy at the same time. The teacher plays the role of an arbitrator. For another example, when everyone passes by a traffic light intersection, cars from all four directions want to pass through the intersection. Only through the reasonable scheduling of red lights can traffic accidents be avoided. In this process, the car is two or more modules, the road is the resource that two or more modules want to occupy at the same time, and the traffic light plays the role of an arbitrator.

[0127] The most important feature of the arbitrator is that it can only allow one module to obtain access permission to avoid confusion. For example, in class, the teacher will only choose one student to answer a question at a time, otherwise no one can hear what others are saying. It can be seen that the arbitrator is a module that can avoid random access to resources and achieve orderly access.

[0128] Applied to this embodiment, multiple master devices are two or more modules, and the services of the slave devices are resources that two or more modules want to occupy at the same time. Since it is arbitration, there should be corresponding arbitration standards. Among them, the arbitration standards can include the following aspects:

[0129] In one example, the target master device can be determined based on the time when the request signal arrives at the slave device. At the same time, the bus can only be occupied by one master device, so there must be a time sequence for the request signals arriving at the slave device. According to the first-come-first-served principle, the slave device can first provide services to the master device whose request signal arrives earlier. For example, the request signal corresponding to master device C arrives at time c, and the request signal corresponding to master device D arrives at time d, and time c is earlier than time d. Therefore, the master device corresponding to the request signal that arrives earlier can be determined as the target master device.

[0130] In another example, the target master device can be determined according to the priority of the master device corresponding to the request signal. For example, both master device C and master device D have fixed priorities, and the priority of master device C is higher than that of master device D. In this case, master device C with a higher priority is the target master device. In this case, the slave device will first provide services to the master device with a higher priority. If this continues, many master devices may not be able to normally interact with slave devices.

[0131] Preferably, the priority in this embodiment does not adopt a fixed priority, but adopts a polling scheduling priority, that is, in the current clock cycle, after the slave device provides services for a certain master device, the priority of the master device is reduced to the lowest level in the next clock cycle. In other words, the priority of the master device is not fixed, but will become the lowest priority after the highest priority, so that when there is a request signal from at least one master device, the slave device can provide services for each master device in turn. This avoids a master device monopolizing the slave device in the subsequent process, so that the slave device can provide services for master devices other than the master device, so as to improve the fairness of the arbitrator.

[0132] In step S503, the request signal of the master device includes the data that the master device wants to transmit. Therefore, after determining the target master device, the data in the request signal can be received to complete the data transmission process. In addition, the slave device will complete the reception of the data corresponding to the master device in the current clock cycle. Therefore, the master device sends the request signal and the slave device receives the request signal and receives the data in the same cycle. Therefore, zero-delay transmission can be achieved between the master and slave devices. This can effectively reduce the delay of the data flow between devices, ensure the real-time processing characteristics of the system, and improve the user experience.

[0133] In one example, the specific process of receiving data corresponding to the target master device from the slave device may include: after determining the target master device, the arbitrator will give arbitration permission to the request signal of the target master device, thereby performing a data receiving operation. Specifically, the data receiving operation may include the slave device searching for data in the request signal, and driving a driving circuit inside the slave device according to the data, thereby achieving reception of the data corresponding to the target master device.

[0134] In this embodiment, the fourth interface can be used to receive the request signal sent by the master device, and receive the data in the request signal of the determined target master device. Among them, the fourth interface and the second interface of the master device are unified, and the interface protocol is simple. Therefore, the slave device provided in this embodiment and the master device provided in the above embodiment are easy to integrate and use. In addition, the simple interface design and the simple interface protocol can also reduce the internal logic complexity of the chip, thereby making the logic function easier to implement.

[0135] An embodiment of the present disclosure provides a data transmission method. Figure 6 FIG. 1 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 6 As shown, the data transmission method shown in this embodiment includes:

[0136] S601: Receive at least one request signal using a fourth interface.

[0137] S602: Determine the target master device.

[0138] S603: Receive data corresponding to the target master device.

[0139] S604: Send a target instruction to the bus in the current clock cycle.

[0140] Among them, steps S601-S603 are the same as steps S501-S503 in the above embodiment, and are not repeated here.

[0141] In step S604, it should be noted that step S604 and step S603 may be performed simultaneously, or after step S603. In order to save data transmission time, this embodiment preferably performs step S603 and step S604 simultaneously.

[0142] Referring to the contents of the above steps S502-S503, it can be obtained that, in the current clock cycle, the slave device will receive a request signal from at least one master device, but the slave device will only receive data from the target master device in the at least one master device. Therefore, for the request signal sent by the non-target master device, the slave device also needs to process the request signal to avoid redundant useless request signals in the slave device.

[0143] In one example, in the current clock cycle, the slave device may send a target instruction to the bus. The target instruction may be used to reduce the level value of the signal of the first interface of the non-target master device, and the non-target master device is a master device other than the target master device in at least one master device. Here, it is required to be defined that the level value of the signal of the first interface of the non-target master device should be reduced to a level that does not meet the first preset condition.

[0144] Specifically, the process of reducing the level value of the signal of the first interface of the non-target master device may include: after receiving the target instruction, the bus generates a second feedback signal based on the target instruction, and sends the second feedback signal to the master device through the first interface. At this time, the second feedback signal represents the level value of the signal of the first interface. When the level value of the signal of the first interface of the non-target master device does not meet the first preset condition, the request signal will not be sent to the slave device.

[0145] At this time, the non-target master device that has not received data in the current clock cycle can maintain the level value of the signal of the second interface and the level value of the signal of the third interface in the next clock cycle until the data corresponding to the non-target master device is received. In addition, referring to the content in step S501, the request signal of at least one master device may be temporarily stored in a certain position in the slave device. Therefore, in the process of reducing the level value of the signal of the first interface of the non-target master device, the request signal of the non-master device stored in the slave device can also be deleted at the same time, thereby achieving the technical effect of saving the storage space of the slave device and reducing the redundancy of the slave device.

[0146] In this embodiment, the operation performed on the non-target master device is given, and by reducing the level value of the signal of the first interface of the non-target master device and maintaining the level values ​​of the signals of the second interface and the third interface of the non-target master device, the non-target master device is expected to be served by the slave device in the next clock cycle, thereby realizing the data transmission process from the non-target master device to the slave device.

[0147] An embodiment of the present disclosure provides a data transmission method. Figure 7 FIG. 1 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 7 As shown, the data transmission method shown in this embodiment includes:

[0148] S701: Detect the level value of the signal of the sixth interface.

[0149] S702: When the level value of the signal of the sixth interface meets the third preset condition, use the fourth interface to receive at least one request signal.

[0150] S703: Determine the target master device.

[0151] S704: Receive data corresponding to the target master device.

[0152] Among them, steps S703-S704 are the same as steps S502-S503 in the above embodiment and are not described again here.

[0153] In step S701, in an example, the sixth interface may refer to the push2 interface, which has the same nature as the third interface. The level value of the signal of the sixth interface is related to whether the slave device can receive the request signal, and when the push signal corresponding to the push2 interface is at a high level, it indicates that the slave device can receive the request signal; and when the push signal corresponding to the push2 interface is at a low level, it indicates that the slave device cannot receive the request signal.

[0154] In step S702, the third preset condition may be a condition corresponding to when the level value of the signal is a high level, for example, the level value of the signal is greater than a preset threshold, or the level value of the signal is within a preset range, etc. If the level value of the signal of the sixth interface meets the third preset condition, it means that the slave device can receive the request signal. In this case, the fourth interface can be used to receive at least one request signal. On the contrary, if the level value of the signal of the sixth interface does not meet the third preset condition, it means that the slave device cannot receive the request signal.

[0155] In this embodiment, the prerequisite for whether the slave device can receive the request signal is given, and when the level value of the signal of the sixth interface meets the third preset condition, the fourth interface can definitely be used to receive at least one request signal.

[0156] In summary, if Figure 8 The interface diagram of the main device shown in the figure and Fig. 9 As shown in the interface diagram of the slave device, it can be seen that the master device is provided with a push1 interface (third interface), a data1 interface (second interface) and a ready (first interface). Correspondingly, the slave device is provided with a push2 interface (sixth interface), a data2 interface (fourth interface) and a full interface (fifth interface). Figure 8 and Fig. 9 The input and output relationship between the respective interfaces and the bus is also given. Figure 8 In the example, the input of the push1 interface is connected to the master device, and the output of the push1 interface is connected to the bus; the input of the data1 interface is connected to the master device, and the output of the data1 interface is connected to the bus; the output of the ready interface is connected to the master device, and the input of the ready interface is connected to the bus. It can be seen that, corresponding to the above, the ready signal is fed back from the bus to the master device. Fig. 9In the example, the output of the push2 interface is connected to the slave device, and the input of the push2 interface is connected to the bus; the output of the data2 interface is connected to the slave device, and the input of the data2 interface is connected to the bus; the input of the full interface is connected to the slave device, and the output of the full interface is connected to the bus. It can be seen that, corresponding to the above, the full signal is fed back from the device to the bus.

[0157] In addition, through Figure 8 and Fig. 9 It can also be obtained that the interface design of the master device and the bus interconnection, as well as the interface design of the slave device and the bus interconnection is very simple, which greatly simplifies the area and design complexity of the bus. In addition, both the master device and the slave device use a unified interface, and the interface protocol is simple, which is conducive to subsequent integration and use.

[0158] In addition, it should be noted that the first interface, the second interface, the third interface, the fourth interface, the fifth interface and the sixth interface mentioned in the above embodiment are all first-in-first-out data storage interfaces. The first-in-first-out data storage interface is used as the interface on the master and slave devices, which can support flexible synchronous clock or asynchronous clock design, thereby improving the reliability and stability of the master and slave devices and extending the service life of the devices; in addition, the flexible synchronous clock or asynchronous clock design can also improve data transmission efficiency and reduce management costs and maintenance costs.

[0159] Fig.10 shows a timing diagram of a single master device accessing a slave device. Fig.11 A timing diagram for multiple master devices to access slave devices is given. The timing diagram, also known as the sequence diagram or the sequence diagram, is a UML (Unified Modeling Language) interaction diagram. It shows the dynamic collaboration between multiple objects by describing the time sequence of messages sent between objects. In the figure, clk represents the clock cycle, rstn represents the power switch, i_mstM_data represents the level value of the signal of the data interface of the master device M, i_mstM_push represents the level value of the signal of the push interface of the master device M, i_mstM_rdy represents the level value of the signal of the rdy interface of the master device M, i_slvN_data represents the level value of the signal of the data interface of the slave device N, i_slvN_push represents the level value of the signal of the push interface of the slave device N, and i_slvN_full represents the level value of the signal of the full interface of the slave device N.

[0160] Depend on Fig.10 and Fig.11It can be seen that for single master device access, it can be seen that in the same clock cycle, if the full signal corresponding to the full interface of the slave device that the master device wants to access is low, the data transmission can be completed in the same clock cycle. If the full signal corresponding to the full interface of the slave device that the master device wants to access is high, data transmission will not be performed, and it will continue to wait to complete the data transmission in the clock cycle where the full signal is low.

[0161] For multi-master device access, it can be seen that in the same clock cycle, if multiple master devices want to access the same slave device at the same time, the slave device only allows one of the master devices to transmit data, and reduces the ready signal corresponding to the ready interface of the other master device to a low level, and then processes the other master device in the next clock cycle.

[0162] In order to facilitate understanding of the technical solution of the present disclosure, the data transmission process among the master device, the bus and the slave device is described below with a specific embodiment:

[0163] S1201. In the current clock cycle, the master device initiates a request signal. At this time, the master device increases the level value of the push signal corresponding to the push1 interface to make the level value of the push signal high, that is, push=1.

[0164] S1202 , the master device sends a request signal to the data1 interface, and sends the request signal to the bus through the data1 interface.

[0165] S1203, after receiving the request signal, the bus detects the level value of the full signal corresponding to the full interface of the slave device that the master device wants to access. If the level value of the full signal is high, the slave device cannot provide services; if the level value of the full signal is low, it detects whether the slave device is also occupied by other master devices. If not, the slave device can provide services; if occupied by other master devices, the slave device cannot provide services. If the slave device can provide services, jump to S1204; if the slave device cannot provide services, jump to S1205.

[0166] S1204: The level value of the ready signal corresponding to the ready interface of the master device is high, that is, ready = 1. This indicates that the slave device can provide services to the master device in the current cycle, and the process jumps to step S1206.

[0167] S1205, the level value of the ready signal corresponding to the ready interface of the master device is low level, that is, ready = 0. This indicates that in the current clock cycle, the slave device cannot provide services to the master device, and the master device maintains the level value of the signal of the data1 interface and the level value of the signal of the push1 interface.

[0168] S1206. The decoder in the master device determines the target data line through the request signal, and the master device sends the request signal to the slave device through the data1 interface and the target data line.

[0169] S1207: When the push signal corresponding to the push2 interface is at a high level, the slave device receives a request signal through the data2 interface, and within the current clock cycle, the slave device has received at least one request signal.

[0170] S1208 , determine the master device corresponding to each request signal, and the arbitrator in the slave device determines a target master device from at least one master device.

[0171] S1209. The slave device receives data from the target master device.

[0172] S1209, the slave device sends a target instruction to the bus. After receiving the target instruction, the bus reduces the level value of the ready signal corresponding to the ready interface of the non-target master device.

[0173] The exemplary embodiment of the present disclosure provides a main device, such as Fig.12 As shown, the present disclosure shows a block diagram of a master device. In addition, the master device includes a first interface and a second interface.

[0174] The block diagram includes a first detection module 1301, a second detection module 1302 and a sending module 1303. The first detection module 1301 is used to detect whether there is a request signal from the master device in the current clock cycle. The second detection module 1302 is used to detect the first interface if there is a request signal from the master device. The sending module 1303 is used to send the request signal to the slave device through the second interface when it is detected that the level value of the signal of the first interface meets the first preset condition.

[0175] In some embodiments, the master device includes a decoder, and the master device further includes: a second determination module;

[0176] A second determining module, used to determine a device number of the slave device according to the request signal;

[0177] The sending module 1303 is specifically used for:

[0178] According to the device number and the decoder, the target data line is determined; the target data line is a data line from the master device to the slave device in the bus;

[0179] The request signal is sent to the slave device through the second interface and the target data line.

[0180] In some embodiments, the master device further includes a third interface, and the master device further includes: a first processing module;

[0181] A first processing module, used for increasing the level value of the signal of the third interface when there is a request signal from the master device;

[0182] The sending module 1303 is specifically used for:

[0183] When it is detected that the level value of the signal of the first interface meets the first preset condition and the level value of the signal of the third interface meets the second preset condition, the request signal is sent to the slave device through the second interface.

[0184] The exemplary embodiment of the present disclosure provides a main device, such as Fig.13 As shown, the present disclosure shows a block diagram of a slave device. In addition, the slave device includes a fourth interface.

[0185] The block diagram includes a first receiving module 1401, a determining module 1402, and a second receiving module 1403. The first receiving module 1401 is used to receive at least one request signal using a fourth interface; the request signal includes data, and the request signal has a corresponding relationship with the master device. The determining module 1402 is used to determine a target master device, and the target master device is a master device in at least one master device corresponding to the at least one request signal. The second receiving module 1403 is used to receive data corresponding to the target master device.

[0186] In some embodiments, the determination module 1402 is specifically configured to:

[0187] determining at least one master device corresponding to at least one request signal;

[0188] A master device with the highest priority among at least one master device is determined, and the master device with the highest priority is used as a target master device.

[0189] In some embodiments, the slave device further includes a third processing module;

[0190] The third processing module is used to send a target instruction to the bus in the current clock cycle; the target instruction is used to reduce the level value of the signal of the first interface of the non-target master device, and the non-target master device is a master device other than the target master device in at least one master device.

[0191] In some embodiments, the slave device further includes a sixth interface, and the slave device further includes a fourth processing module:

[0192] A fourth processing module, used for detecting a level value of a signal of a sixth interface;

[0193] When the level value of the signal of the sixth interface meets the third preset condition, the fourth interface is used to receive at least one request signal.

[0194] Regarding the master device and the slave device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0195] Fig.14 is a block diagram of an electronic device 1500 according to an exemplary embodiment.

[0196] Reference Fig.14 , the electronic device 1500 may include one or more of the following components: a processing component 1502 , a memory 1504 , a power component 1506 , a multimedia component 1508 , an audio component 1510 , an input / output (I / O) interface 1512 , a sensor component 1514 , and a communication component 1516 .

[0197] The processing component 1502 generally controls the overall operation of the electronic device 1500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1502 may include one or more processors 1520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1502 may include one or more modules to facilitate the interaction between the processing component 1502 and other components. For example, the processing component 1502 may include a multimedia module to facilitate the interaction between the multimedia component 1508 and the processing component 1502.

[0198] The memory 1504 is configured to store various types of data to support operations on the electronic device 1500. Examples of such data include instructions for any application or method operating on the electronic device 1500, contact data, phone book data, messages, pictures, videos, etc. The memory 1504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0199] The power supply component 1506 provides power to the various components of the electronic device 1500. The power supply component 1506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1500.

[0200] The multimedia component 1508 includes a screen that provides an output interface between the electronic device 1500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1508 includes a front camera and / or a rear camera. When the electronic device 1500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0201] The audio component 1510 is configured to output and / or input audio signals. For example, the audio component 1510 includes a microphone (MIC), and when the electronic device 1500 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1504 or sent via the communication component 1516. In some embodiments, the audio component 1510 also includes a speaker for outputting audio signals.

[0202] I / O interface 1512 provides an interface between processing component 1502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0203] The sensor assembly 1514 includes one or more sensors for providing various aspects of status assessment for the electronic device 1500. For example, the sensor assembly 1514 can detect the open / closed state of the electronic device 1500, the relative positioning of components, such as the display and keypad of the electronic device 1500, and the sensor assembly 1514 can also detect the position change of the electronic device 1500 or a component of the electronic device 1500, the presence or absence of user contact with the electronic device 1500, the orientation or acceleration / deceleration of the electronic device 1500, and the temperature change of the electronic device 1500. The sensor assembly 1514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0204] The communication component 1516 is configured to facilitate wired or wireless communication between the electronic device 1500 and other devices. The electronic device 1500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0205] In an exemplary embodiment, the electronic device 1500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0206] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1504 including instructions, and the instructions can be executed by a processor 1520 of the electronic device 1500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0207] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the data transmission method provided by an exemplary embodiment of the present disclosure.

[0208] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0209] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A data transmission method, It is characterized in that Applied to a master device, the master device includes a first interface and a second interface, and the data transmission method includes: Detecting whether there is a request signal from the master device in the current clock cycle; If the master device has a request signal, the request signal is sent to the bus through the second interface, and the first interface is detected through the bus; the request signal is used to indicate whether the bus detects whether the slave device can provide services for the master device; the signal of the first interface is used to represent the feedback signal determined by the bus based on the request signal; When it is detected that the level value of the signal of the first interface meets the first preset condition, sending the request signal to the slave device through the second interface; The method further comprises: When it is detected that the level value of the first interface does not meet the first preset condition, the level value of the second interface is maintained in the next clock cycle until the request signal is successfully sent to the slave device.

2. The data transmission method according to claim 1, It is characterized in that The master device includes a decoder, and the data transmission method further includes: Determine the device number of the slave device according to the request signal; Sending the request signal to the slave device through the second interface includes: Determine a target data line according to the device number and the decoder; the target data line is a data line from the master device to the slave device in the bus; The request signal is sent to the slave device through the second interface and the target data line.

3. The data transmission method according to claim 2, It is characterized in that The master device further includes a third interface, and the data transmission method further includes: When the master device has a request signal, increasing the level value of the signal of the third interface; The step of sending the request signal to the slave device through the second interface includes: When it is detected that the level value of the signal of the first interface meets the first preset condition and the level value of the signal of the third interface meets the second preset condition, the request signal is sent to the slave device through the second interface.

4. A data transmission method, It is characterized in that Applied to a slave device, the slave device includes a fourth interface, and the data transmission method includes: Using the fourth interface to receive at least one request signal; the request signal includes data, and the request signal has a corresponding relationship with the master device; Determine a target master device, where the target master device is one of the at least one master devices corresponding to the at least one request signal; Receiving data corresponding to the target master device; The data transmission method further comprises: In the current clock cycle, a target instruction is sent to the bus; the target instruction is used to reduce the level value of the signal of the first interface of a non-target master device, and the non-target master device is a master device other than the target master device in the at least one master device.

5. The data transmission method according to claim 4, It is characterized in that The step of determining a target master device comprises: Determining at least one master device corresponding to the at least one request signal; A master device with the highest priority among the at least one master device is determined, and the master device with the highest priority is used as the target master device.

6. The data transmission method according to claim 4, It is characterized in that The slave device further includes a sixth interface, and the data transmission method further includes: Detecting a level value of a signal of the sixth interface; When the level value of the signal of the sixth interface meets the third preset condition, the fourth interface is used to receive the at least one request signal.

7. A master device, It is characterized in that The master device comprises a first interface and a second interface, and the master device comprises: A first detection module, used to detect whether there is a request signal from the master device in the current clock cycle; a second detection module, configured to send the request signal to the bus through the second interface if the master device has a request signal, and detect the first interface through the bus; the request signal is used to indicate whether the bus detects whether the slave device can provide services for the master device; the signal of the first interface is used to represent a feedback signal determined by the bus based on the request signal; A sending module, configured to send the request signal to the slave device through the second interface when it is detected that the level value of the signal of the first interface meets a first preset condition; The sending module is further configured to maintain the level value of the second interface in the next clock cycle when it is detected that the level value of the first interface does not meet the first preset condition, until the request signal is successfully sent to the slave device.

8. A slave device, It is characterized in that The slave device comprises a fourth interface, and the slave device comprises: A first receiving module, configured to receive at least one request signal using the fourth interface; the request signal includes data, and the request signal has a corresponding relationship with the master device; a determination module, configured to determine a target master device, wherein the target master device is one of the at least one master devices corresponding to the at least one request signal; A second receiving module, used to receive data corresponding to the target master device; A sending module is used to send a target instruction to the bus in the current clock cycle; the target instruction is used to reduce the level value of the signal of the first interface of the non-target master device, and the non-target master device is a master device other than the target master device in the at least one master device.

9. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the data transmission method according to any one of claims 1-3 or claims 4-6.

Citation Information

Patent Citations

  • Matrix type bus connection system

    US20050228914A1