Information interaction method and device
By establishing the correspondence between the chip's identification information and the interface of the external device, the bus interface is automatically converted, which solves the problem of cumbersome bus interface configuration in the information interaction between the chip and the external device and improves development efficiency.
Patent Information
- Application Number
- CN202110239980.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-04
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-03-04
AI Technical Summary
In existing technologies, a large number of bus interface configuration operations are required when chips interact with external devices, resulting in low development efficiency.
By identifying the identification and interface information of external devices, a correspondence between the chip and the external device is established, and the bus interface is automatically converted to achieve information exchange, reducing configuration operations.
It enables information exchange between the chip and various external devices without needing to worry about interface differences, reduces bus interface configuration operations, and improves development efficiency.
Smart Images

Figure CN114116560B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an information interaction method and device. Background Art
[0002] The bus is a channel for transmitting information between the chip and external devices. Common bus types include the following: inter-integrated circuit (I2C) bus, universal serial bus (USB), secure digital input and output (SDIO) bus and peripheral component interconnect (PCI) bus.
[0003] The chip can use different types of buses to exchange information with different types of external devices. For example, if the chip needs to exchange information with an SDIO external device, the chip needs to use the SDIO bus.
[0004] In addition, when the chip uses different types of buses to interact with different external devices, the bus interfaces called are often different. In order to adapt the bus interface called by the chip to the external device, developers currently need to perform a large number of targeted configuration operations when determining that the chip needs to interact with a certain external device. Summary of the invention
[0005] In order to solve the problem that a large number of configuration operations need to be performed on the bus interface called by the chip when the chip and the external device exchange information through the existing technology, the embodiment of the present application provides an information interaction method and device.
[0006] In a first aspect, an embodiment of the present application discloses an information interaction method, including:
[0007] Determine first information of a first external device, where the first external device is an external device that needs to perform information interaction with the chip, and the first information includes identification information of the first external device and at least one first interface of the first external device, where the at least one first interface is a bus interface for the first external device to perform information interaction with the chip;
[0008] Determine, according to the identification information of the first external device, a correspondence between at least one second interface of the chip and the at least one first interface, wherein the at least one second interface is a bus interface for the chip to perform information exchange with the first external device;
[0009] After calling the second target interface required for this information interaction, determining, according to the corresponding relationship, a first target interface corresponding to the second target interface, the second interface includes the second target interface, and the first interface includes the first target interface;
[0010] Information is exchanged with the first external device through the first target interface.
[0011] Through the above scheme, the chip can interact with a variety of different external devices, and there is no need to pay attention to the differences in the interfaces called by the chip when interacting with each external device. Instead, the chip converts the bus interface according to the first information corresponding to each external device, thereby reducing the configuration operations of the bus interface.
[0012] An optional design also includes:
[0013] Determine second information of a second external device, where the second external device is an external device that needs to perform information interaction with the chip, and the second information includes identification information of the second external device and at least one third interface of the second external device, where the at least one third interface is a bus interface for the second external device to perform information interaction with the chip;
[0014] Determine, according to the identification information of the second external device, a correspondence between at least one fourth interface of the chip and the at least one third interface, wherein the at least one fourth interface is a bus interface for the chip to perform information exchange with the second external device;
[0015] After calling the fourth target interface required for this information interaction, the third target interface corresponding to the fourth target interface is determined according to the corresponding relationship, and information interaction is performed with the second external device through the third target interface, the fourth interface includes the fourth target interface, and the third interface includes the third target interface.
[0016] Through the above steps, the chip can also interact with the second external device, and when interacting with the second external device, the chip interacts with the second external device through the third target interface corresponding to the fourth target interface, thereby reducing the developer's configuration of the chip's bus interface.
[0017] In an optional design, the second interface includes a second device interface for information interaction with the first external device;
[0018] The fourth interface comprises a fourth device interface for performing information interaction with the second external device;
[0019] The second device interface is the same as the fourth device interface.
[0020] Through the above steps, the configuration of the interface calls to the chip can be reduced.
[0021] In an optional design, the second interface includes at least one second functional module, the first interface includes at least one first functional module, and the correspondence between the second interface and the first interface includes the correspondence between the at least one second functional module and the at least one first functional module.
[0022] In an optional design, after calling the second target interface required for the current information interaction, determining the first target interface corresponding to the second target interface according to the corresponding relationship includes:
[0023] Determining a second target functional module in the second target interface according to a requirement for information interaction with the first external device;
[0024] According to the corresponding relationship, determining a first target function module corresponding to the second target function module, wherein the first target interface includes the first target function module;
[0025] The performing information interaction with the first external device through the first target interface includes:
[0026] Information interaction is performed with the first external device through the first target function module in the first target interface.
[0027] In an optional design, the first information includes a first object;
[0028] The first object includes a first member and a second member;
[0029] The first member includes identification information of the first external device;
[0030] The second member includes at least one first interface of the first external device.
[0031] In a second aspect, an embodiment of the present application discloses an information interaction device, including:
[0032] Processor and transceiver interface;
[0033] The processor is used to determine first information of a first external device, where the first external device is an external device that needs to exchange information with the chip, and the first information includes identification information of the first external device and at least one first interface of the first external device, where the at least one first interface is a bus interface for the first external device to exchange information with the chip;
[0034] The processor is further configured to determine, according to the identification information of the first external device, a correspondence between at least one second interface of the chip and the at least one first interface, wherein the at least one second interface is a bus interface for the chip to perform information exchange with the first external device;
[0035] The processor is further configured to, after calling the second target interface required for the current information interaction, determine, according to the corresponding relationship, a first target interface corresponding to the second target interface, the second interface including the second target interface, and the first interface including the first target interface;
[0036] The transceiver interface is used to exchange information with the first external device through the first target interface.
[0037] In an optional design, the processor is further used to determine second information of a second external device, where the second external device is an external device that needs to interact with the chip for information, and the second information includes identification information of the second external device and at least one third interface of the second external device, and the at least one third interface is a bus interface for the second external device to interact with the chip for information;
[0038] The processor is further configured to determine, according to the identification information of the second external device, a correspondence between at least one fourth interface of the chip and the at least one third interface, wherein the at least one fourth interface is a bus interface for the chip to perform information exchange with the second external device;
[0039] The processor is further configured to, after calling the fourth target interface required for this information interaction, determine, according to the corresponding relationship, a third target interface corresponding to the fourth target interface;
[0040] The transceiver interface is further used to exchange information with the second external device through the third target interface, the fourth interface includes the fourth target interface, and the third interface includes the third target interface.
[0041] In an optional design, the second interface includes a second device interface for information interaction with the first external device;
[0042] The fourth interface comprises a fourth device interface for performing information interaction with the second external device;
[0043] The second device interface is the same as the fourth device interface.
[0044] In an optional design, the second interface includes at least one second functional module, the first interface includes at least one first functional module, and the correspondence between the second interface and the first interface includes the correspondence between the at least one second functional module and the at least one first functional module.
[0045] In an optional design, the processor is specifically used to determine a second target functional module in the second target interface according to a requirement for information interaction with the first external device;
[0046] According to the corresponding relationship, determining a first target function module corresponding to the second target function module, wherein the first target interface includes the first target function module;
[0047] The performing information interaction with the first external device through the first target interface includes:
[0048] Information interaction is performed with the first external device through the first target function module in the first target interface.
[0049] In an optional design, the first information includes a first object;
[0050] The first object includes a first member and a second member;
[0051] The first member includes identification information of the first external device;
[0052] The second member includes at least one first interface of the first external device.
[0053] In a third aspect, an embodiment of the present application discloses a terminal device, including:
[0054] at least one processor and memory,
[0055] The memory is used to store program instructions;
[0056] The processor is used to call and execute the program instructions stored in the memory so that the terminal device executes the information interaction method described in the first aspect.
[0057] In a fourth aspect, an embodiment of the present application discloses a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the information interaction method as described in the first aspect.
[0058] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, and when the computer program product is run on an electronic device, the electronic device executes the method described in the first aspect.
[0059] An embodiment of the present application provides an information interaction method and device, in which the first information of a first external device is first determined, the first information including identification information of the first external device and at least one first interface of the first external device; then, based on the identification information of the first external device, the correspondence between at least one second interface of the chip and the at least one first interface is determined; if the chip needs to perform information interaction with the first external device, and the information interaction requires the chip to call a second target interface, then, based on the correspondence, a first target interface corresponding to the second target interface is determined; and then information interaction is performed with the first external device through the first target interface.
[0060] Even if the chip interacts with a variety of different external devices, when applying the solution provided in the embodiments of the present application, the chip developers do not need to pay attention to the differences in the interfaces called by the chip when interacting with each external device. Instead, the chip converts the bus interface according to the first information corresponding to each external device.
[0061] Through the solution provided in the embodiment of the present application, the chip can convert the bus interface called by itself into the bus interface applicable to the first external device according to the needs of information interaction through the correspondence between at least one second interface of the chip and at least one first interface of the first external device, and convert the second target interface called by the chip during this information interaction into the first target interface applicable to the first external device, and exchange information with the first external device through the first target interface. This eliminates the need for developers to configure the bus interface of the chip for external devices that require information interaction, and reduces the configuration operations of the bus interface compared to the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of information interaction between a chip and an external device;
[0063] Figure 2 A schematic diagram of a workflow of an information interaction method disclosed in an embodiment of the present application;
[0064] Figure 3 An example diagram of first information in an information interaction method disclosed in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of a workflow of another information interaction method disclosed in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of a scenario of an information interaction method disclosed in an embodiment of the present application;
[0067] Figure 6A schematic diagram of a scenario of an information interaction method disclosed in an embodiment of the present application;
[0068] Figure 7 This is an example diagram of an information interaction method disclosed in an embodiment of the present application;
[0069] Figure 8 A schematic diagram of the structure of an information interaction device disclosed in an embodiment of the present application;
[0070] Fig. 9 A schematic diagram of the structure of a terminal device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0072] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0073] In the following, the terms "first" and "second" are used for description purposes only. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0074] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:
[0075] A chip, also known as a microcircuit, microchip or integrated circuit, is a silicon wafer containing an integrated circuit. Usually, the chip is very small and is an important component of electronic devices such as computers. External devices can be referred to as "peripherals". In a computer system, the external devices may include input devices, output devices, and external memory, etc., which are important components of the computer system.
[0076] The chip can exchange information with external devices through the bus. When the chip exchanges information with different types of external devices, different types of buses can be used. For example, see Figure 1 As shown in the schematic diagram, the chip can exchange information with a first external device through a first bus, and can exchange information with a second external device through a second bus, wherein the first external device and the second external device are different external devices, and the first bus and the second bus are different buses.
[0077] Taking a system on chip (SoC) chip as an example, the SoC chip can be connected to an I2C external device through an I2C bus, connected to a USB external device through a USB, connected to an SDIO external device through an SDIO bus, and connected to a PCI external device through a PCI bus. Of course, other types of chips can also be connected to different external devices through different types of buses.
[0078] That is to say, for different external devices, the chip needs to be connected to them through different types of buses to achieve information exchange with the external devices. In this case, when the chip uses different types of buses, it often needs to use the corresponding bus interface of the bus to achieve connection with the external device.
[0079] Among them, when connecting different external devices through different types of buses, the bus interfaces called by the chip are often different. In other words, when the chip exchanges information with different external devices, it usually needs to call different bus interfaces. Furthermore, even if the same external device is produced by different manufacturers, the definition of the bus interface sometimes differs. In this case, when the chip exchanges information with the same external device produced by different manufacturers, it also needs to call different bus interfaces.
[0080] Generally, the differences between different bus interfaces may include different names of the bus interfaces, different parameters of the bus interfaces, and different return values.
[0081] In order to meet the chip's need to call the bus interface and realize information exchange between the chip and the external device, at present, some external device manufacturers can provide data manuals, which include the description information of the bus interface of the external device. In this case, the chip developer can configure the bus interface called by the chip when connecting to the external device according to the data manual. Then, in the process of information exchange, the chip can call the configured bus interface, so as to realize information exchange with the external device by calling the bus interface.
[0082] That is to say, in this solution, if the chip needs to exchange information with external devices, the chip developers are often required to configure the bus interface called by the chip according to the data manual, and then the chip calls the configured bus interface.
[0083] In a possible example, when the SoC chip performs a data write operation with an SDIO external device, the programming language of the bus interface called by the SoC chip is as follows:
[0084] s32 sd_write(struct intf_hdl*pintfhdl,u32 addr,u32 cnt,void*pdata).
[0085] The meaning of the above programming language is to write the data pdata in the SDIO external device into the register with the address addr in the SoC chip, and the length of the written data is cnt.
[0086] In another possible example, the chip is set to be a SoC chip, and when the SoC chip performs a data read operation with an SDIO external device, the programming language of the bus interface called by the SoC chip is as follows:
[0087] int_rtw_writeN(_adapter*adapter,u32 addr,u32 length,u8*pdata).
[0088] The meaning of the above programming language is also to write the data pdata in the SDIO external device into the register with the address addr in the SoC chip, and the written data length is length.
[0089] In another current solution, the manufacturer of the external device can set the bus interface applicable to the external device by itself. In this case, the bus interfaces applicable to the same external device generated by different manufacturers are often different. In addition, when chips generated by different manufacturers interact with the same external device, the bus interfaces called are often different. If the chip needs to interact with the external device, the developer of the chip configures the bus interface called by the chip according to the corresponding settings of the manufacturer to realize the information interaction between the chip and the external device.
[0090] In a possible example, the chip is set to perform a data write operation with an SDIO external device, and the bus interface called by the chip can be configured by the following programming language:
[0091] Taking the SDIO bus type write data operation as an example, the following are the programming languages of the bus interface called by HiSilicon chips and Realtek chips:
[0092] void oal_sdio_writeb(struct sdio_func*func,hi_u8 count,hi_u32 addr,hi_s32*data).
[0093] The above is the programming language called by the HiSilicon chip when writing data in the SDIO external device to the HiSilicon chip, where count represents the length of the data written from the SDIO external device to the HiSilicon chip, addr represents the starting address of the register of the HiSilicon chip where the data to be written is located, and data represents the starting address of the data to be written where the data to be written is located.
[0094] s32 sd_write(struct intf_hdl*pintfhdl,u32 addr,u32 cnt,void*pdata).
[0095] The above is the programming language called by the realtek chip when writing data in the SDIO external device to the realtek chip, where count represents the length of the data written from the SDIO external device to the realtek chip, addr represents the starting address of the register of the realtek chip where the data to be written is located, and data represents the starting address of the data to be written where the data to be written is located.
[0096] That is to say, in this scheme, when the chip needs to exchange information with an external device, even if it needs to interact with the same external device and the same external device is generated by different manufacturers, or when chips generated by different manufacturers interact with the same external device, the chip developers are often required to configure the bus interface called by the chip.
[0097] Through the introduction of the above two existing solutions, it can be seen that, in order to realize the information interaction between the chip and the external device, the chip developers are required to perform a large number of configuration operations on the bus interface called by the chip to realize the information interaction between the chip and the external device.
[0098] The information exchange between the chip and the external device through the above two existing technologies requires the developer to perform a large number of configuration operations on the bus interface called by the chip, which will reduce the development efficiency.
[0099] In particular, with the development of chip technology, chips can exchange information with more and more external devices. In this case, if the information interaction between the chip and the external devices is carried out through the existing technology solution, the configuration operations that developers need to perform will also increase accordingly, resulting in cumbersome information interaction between the chip and the external devices.
[0100] In order to solve the problem that a large number of configuration operations need to be performed on the bus interface called by the chip when the chip and the external device exchange information through the existing technology, the embodiment of the present application provides an information interaction method and device.
[0101] See also Figure 2 As shown in the workflow diagram, the information interaction method provided in the embodiment of the present application includes the following steps:
[0102] Step S11: Determine first information of a first external device.
[0103] Among them, the first external device is an external device that needs to interact with the chip for information, the first information includes identification information of the first external device and at least one first interface of the first external device, and the at least one first interface is a bus interface for the first external device to interact with the chip for information.
[0104] The first external device may be a variety of types of external devices. For example, the first external device may be any one of an I2C external device, an SDIO external device, and a PCI external device. Of course, the first external device may also be other external devices that can be connected to the chip through a bus and exchange information with the chip, which is not limited in the present embodiment of the application. In the solution provided in the embodiment of the present application, the first external device exchanges information with the chip through at least one first interface of the first external device.
[0105] In addition, in the solution provided in the embodiment of the present application, the identification information of the external device is used to distinguish the external device. When external devices with different identification information interact with the same chip, the applicable bus interfaces are often different. Correspondingly, when external devices with the same identification information interact with the same chip, the applicable bus interfaces are the same.
[0106] If the same device type external devices use the same bus interface when exchanging information with the chip, the identification information may include the device type information of the external device. In this case, the identification information of the first external device may be an identifier, which is used to indicate the device type of the first external device.
[0107] Exemplarily, if the first external device is an I2C external device, and when each I2C external device exchanges information with the chip, the applicable bus interface is the same, then the device type of the first external device is I2C, and the identification information of the first external device includes information for indicating I2C.
[0108] In another example, if the first external device is an SDIO external device, and when each SDIO external device interacts with the chip, the applicable bus interface is the same, then the device type of the first external device is SDIO, and the identification information of the first external device includes information for indicating SDIO. Correspondingly, if the first external device is a PCI external device, and when each PCI external device interacts with the chip, the applicable bus interface is the same, then the device type of the first external device is PCI, and the identification information of the first external device includes information for indicating PCI.
[0109] In addition, in some cases, even if the external device is the same, the bus interface used for information exchange with the chip may be different. In this case, the identification information of the external device includes not only the device type of the external device, but also the additional information of the external device. If the device type and additional information of two external devices are the same, then the bus interface applicable to the two external devices when exchanging information with the chip is the same.
[0110] In one example, if the same type of external device generated by the same manufacturer uses the same bus interface when interacting with the chip, and the same type of external device generated by different manufacturers uses different bus interfaces when interacting with the chip, when the external device interacts with the chip as the first external device, the additional information includes the information of the manufacturer of the first external device.
[0111] That is, in this case, the identification information of the first external device includes the device type information and manufacturer information of the first external device. The identification information of the first external device may be an identifier, which is used to indicate the device type of the first external device and the manufacturer information of the first external device. If each manufacturer is numbered, the manufacturer information may include the manufacturer number.
[0112] The same external device often includes multiple models. In another example, it is assumed that the first external devices of the same model use the same bus interface when performing information exchange with the chip, and the additional information includes information about the model of the first external device.
[0113] That is, in this case, the identification information of the first external device includes device type information and model information of the first external device. The identification information of the first external device may be an identifier, which is used to indicate the device type and model of the first external device.
[0114] According to the chip's need for information interaction, the first information of the first external device can be predetermined and stored in the chip. Alternatively, the first information is stored in a memory that the chip can query, and if the chip needs to interact with the first external device, the chip can determine the first information of the first external device by querying the memory.
[0115] Furthermore, during the use of the chip, the first information may be adjusted according to changes in the chip's requirements for information interaction, such as adding the first information of a new external device.
[0116] Step S12: Determine a correspondence between at least one second interface of the chip and the at least one first interface according to the identification information of the first external device.
[0117] The at least one second interface is a bus interface for the chip to exchange information with the first external device. That is, the chip exchanges information with the first external device through its at least one second interface.
[0118] In the solution provided in the embodiment of the present application, a configuration file may be set, and the configuration file includes the correspondence between at least one bus interface of the external device corresponding to each identification information and at least one bus interface of the chip. In this case, the correspondence between at least one second interface of the chip and at least one first interface may be determined through the configuration file and the identification information of the first external device.
[0119] The configuration file may be stored in the chip, or in a memory that the chip can query. If the chip needs to perform information interaction with the first external device, the chip may obtain the configuration file by querying the memory.
[0120] Furthermore, during the use of the chip, the configuration file can also be adjusted according to changes in the chip's needs for information interaction, such as adding a new correspondence between the bus interface of an external device and the bus interface of the chip, so that the chip can determine the correspondence between the bus interface of the chip and the bus interface of the external device for information interaction based on the adjusted configuration file.
[0121] In the solution provided in the embodiment of the present application, it is necessary to determine the correspondence between the at least one second interface and the at least one first interface. In a feasible implementation, the first interface with the correspondence relationship can be mounted with the second interface, and the correspondence between the two bus interfaces is represented by the mounting relationship between the two.
[0122] Step S13: After calling the second target interface required for this information interaction, determine the first target interface corresponding to the second target interface according to the corresponding relationship.
[0123] The second interface includes the second target interface, and the first interface includes the first target interface.
[0124] Step S14: Exchange information with the first external device through the first target interface.
[0125] During this information interaction process, the chip interacts with the first external device through its own second target interface. In this case, the chip calls the second target interface. In addition, in an embodiment of the present application, based on the corresponding relationship, the chip can determine the first target interface corresponding to the second target interface, and implement information interaction with the first external device through the first target interface.
[0126] Among them, if the first target interface is mounted to the second target interface, in the solution provided in the embodiment of the present application, after calling the second target interface, the first target interface mounted to the second target interface can be called, thereby realizing information interaction with the first external device through the first target interface.
[0127] That is to say, through the correspondence between the first interface and the second interface, the first target interface of the external device corresponding to the called second target interface of the chip during the information interaction process is determined. The chip can interact with the first external device through the first target interface without the need for developers to configure the bus interface of the chip.
[0128] Steps S11 to S14 provide an information interaction method. In this method, firstly, the first information of the first external device is determined, wherein the first information includes identification information of the first external device and at least one first interface of the first external device; then, according to the identification information of the first external device, the corresponding relationship between at least one second interface of the chip and the at least one first interface is determined; if the chip needs to perform information interaction with the first external device, and the information interaction requires the chip to call the second target interface, then according to the corresponding relationship, the first target interface corresponding to the second target interface is determined; and then, information interaction is performed with the first external device through the first target interface.
[0129] Even if the chip interacts with a variety of different external devices, when applying the solution provided in the embodiments of the present application, the chip developers do not need to pay attention to the differences in the interfaces called by the chip when interacting with each external device. Instead, the chip converts the bus interface according to the first information corresponding to each external device.
[0130] Through the solution provided in the embodiment of the present application, the chip can convert the bus interface called by itself and the bus interface applicable to the first external device according to the needs of information interaction through the correspondence between at least one second interface of the chip and at least one first interface of the first external device, and convert the second target interface called by the chip during this information interaction into the first bus interface applicable to the first external device, and exchange information with the first external device through the first bus interface. This eliminates the need for developers to configure the bus interface of the chip for external devices that require information interaction, and reduces the configuration operations of the bus interface compared to the prior art.
[0131] In the solution provided in the embodiment of the present application, it is necessary to determine first information of a first external device. In a feasible implementation, the first information includes a first object. The first object may also be referred to as a first bus object. The first object includes a first member and a second member; the first member includes identification information of the first external device; the second member includes at least one first interface of the first external device.
[0132] In a feasible implementation, the first member may be a dev member.
[0133] In the solution provided in the embodiment of the present application, when the chip interacts with an external device with the same identification information, the bus interfaces applicable to the external devices are the same. When the chip interacts with an external device with different identification information, the bus interfaces applicable to the external devices are often different. In this case, the bus interface applicable to the first external device can be distinguished by the identification information of the first external device.
[0134] In the solution provided in the embodiment of the present application, the second member includes at least one first interface of the first external device. Exemplarily, the second member may be an ops member (ie, an options member).
[0135] In this case, the embodiment of the present application provides Figure 3 , Figure 3 This is an example diagram of a first object, used to indicate that the first object includes a first member and a second member, where the first member may be a dev member and the second member may be an ops member.
[0136] In the solution provided in the embodiment of the present application, the chip can exchange information with a variety of external devices. In this case, see Figure 4 As shown in the workflow diagram, the embodiment of the present application also includes the following steps:
[0137] Step S21: Determine second information of a second external device.
[0138] Among them, the second external device is an external device that needs to interact with the chip for information, the second information includes identification information of the second external device and at least one third interface of the second external device, and the at least one third interface is a bus interface for the second external device to interact with the chip for information.
[0139] In the embodiment of the present application, the second external device also needs to exchange information with the chip, and accordingly, the second external device can be connected to the chip through a bus to achieve information exchange. In addition, in the solution provided in the embodiment of the present application, the chip exchanges information with the second external device through its fourth interface, and accordingly, the second external device exchanges information with the chip through its third interface.
[0140] In addition, according to the needs of the chip for information interaction, the second information of the second external device can be predetermined and stored in the chip. Alternatively, the second information is stored in a memory that can be queried by the chip, and if the chip needs to interact with the second external device, the chip can determine the second information of the second external device by querying the memory.
[0141] Furthermore, during the use of the chip, the second information may be adjusted according to changes in the chip's requirements for information interaction, such as adding new external device information.
[0142] Step S22: Determine a correspondence between at least one fourth interface of the chip and the at least one third interface according to the identification information of the second external device, wherein the at least one fourth interface is a bus interface for information exchange between the chip and the second external device.
[0143] In the solution provided in the embodiment of the present application, a configuration file may be set, and the configuration file includes the correspondence between at least one bus interface of the external device corresponding to each identification information and at least one bus interface of the chip. In this case, the correspondence between at least one fourth interface of the chip and at least one third interface may be determined through the configuration file and the identification information of the second external device.
[0144] In addition, in the solution provided in the embodiment of the present application, it is necessary to determine the correspondence between the at least one fourth interface and the at least one third interface. In a feasible implementation, the third interface with the corresponding relationship can be mounted with the fourth interface, and the corresponding relationship between the two bus interfaces is represented by the mounting relationship between the two.
[0145] Step S23: after calling the fourth target interface required for this information interaction, determine the third target interface corresponding to the fourth target interface according to the corresponding relationship, the fourth interface includes the fourth target interface, and the third interface includes the third target interface.
[0146] Step S24: Exchange information with the second external device through the third target interface.
[0147] Through the above steps, the chip can not only exchange information with the first external device, but also exchange information with the second external device. Moreover, when exchanging information with the second external device, the corresponding relationship between the third interface and the fourth interface can be used to determine the third target interface of the external device corresponding to the fourth target interface called by the chip during the information exchange process. The chip can exchange information with the second external device through the third target interface, which reduces the developer's configuration of the chip's bus interface.
[0148] The second external device and the first external device may be different external devices. Through the above embodiments, the chip can realize information interaction with a variety of different external devices, meeting the needs of chip information interaction.
[0149] In order to clarify the embodiments of the present application, the chip can exchange information with different external devices. Figure 5 See also Figure 5 In the scenario diagram shown, in this example, the chip is a SoC chip, and the chip can exchange information with an SDIO external device through the SDIO bus. In this example, the SDIO external device is a WIFI device. In addition, the chip can also exchange information with an I2C external device through the I2C bus. In this example, the I2C external device is a touch panel (TP) device.
[0150] If the chip needs to exchange information with the WIFI device, and the chip exchanges information with the WIFI device through its own second interface, and the WIFI device exchanges information with the chip through its own first interface. In this case, the chip will determine the correspondence between its own second interface and the first interface. In addition, if the chip calls the second target interface in the second interface during this information exchange, the first target interface corresponding to the second target interface can be determined according to the correspondence, and information can be exchanged with the WIFI device through the first target interface.
[0151] If the chip needs to exchange information with the I2C device, and the chip exchanges information with the I2C device through its own fourth interface, and the I2C device exchanges information with the chip through its own third interface. In this case, the chip will determine the correspondence between its own fourth interface and the third interface. In addition, if the chip calls the fourth target interface in the fourth interface during this information exchange, the third target interface corresponding to the fourth target interface can be determined according to the correspondence, and information can be exchanged with the I2C device through the third target interface.
[0152] Through the above examples, it can be determined that in the solution provided in the embodiments of the present application, the chip can interact with a variety of different external devices for information.
[0153] Furthermore, in the solution provided in the embodiment of the present application, the second interface includes a second device interface for information interaction with the first external device; the fourth interface includes a fourth device interface for information interaction with the second external device; the second device interface is the same as the fourth device interface.
[0154] Since the second device interface is the same as the fourth device interface, the chip can call the same bus interface when performing information exchange with the first external device and the second external device respectively.
[0155] Exemplarily, the second device interface and the fourth device interface are both bus interfaces for reading data from external devices, and the second device interface is the same as the fourth device interface. In this case, the chip can call the second device interface when reading data from the first external device and when reading data from the second external device, that is, the interfaces called by the chip are the same.
[0156] In the prior art, it is often necessary to configure a corresponding bus interface for the chip for different external devices. In this case, when the chip interacts with different external devices, different bus interfaces are usually called, so developers are also required to configure the chip interface calls.
[0157] In the solution provided in the embodiment of the present application, the chip calls its own bus interface during the process of information interaction with an external device, and can convert the bus interface called by itself into a bus interface applicable to the external device based on the correspondence between its own bus interface and the bus interface applicable to the external device, and interact with the external device through the bus interface applicable to the external device.
[0158] In this case, if the second device interface used by the chip to perform information interaction with the first external device is the same as the fourth device interface used by the chip to perform information interaction with the second external device, the chip can call the second device interface when performing information interaction with the first external device, and the chip can still call the second device interface when performing information interaction with the second external device for the same requirement. In other words, the chip can call the same bus interface when performing information interaction with different external devices.
[0159] Therefore, compared with the prior art, the solution of the embodiment of the present application can also reduce the configuration of interface calls performed on the chip.
[0160] For example, in the prior art, in order to meet the need of the chip to read data from the first external device, a bus interface A is configured for the chip, and when the developer configures this information interaction, the chip needs to call bus interface A. In addition, in order to meet the need of the chip to read data from the second external device, a bus interface B is configured for the chip, and when the developer configures this information interaction, the chip needs to call bus interface B.
[0161] In the solution provided in the embodiment of the present application, the bus interface called by the chip when reading data from each external device can be set to be bus interface C. In this case, when the chip reads data in the first external device and data in the second external device, the chip can call bus interface C, thereby reducing the configuration of interface calls by developers.
[0162] Further, in an embodiment of the present application, the second interface includes at least one second functional module, the first interface includes at least one first functional module, and the correspondence between the second interface and the first interface includes the correspondence between the at least one second functional module and the at least one first functional module.
[0163] A bus interface often includes at least one functional module, where a functional module is a collection of program elements such as data descriptions and executable statements. A functional module included in a bus interface can often be used to complete at least one information exchange function, or more than one functional module can jointly complete an information exchange function.
[0164] In one example, a bus interface includes multiple functional modules, one of which can be used to complete a function of reading data, another functional module can be used to complete a function of writing data, and the other functional modules can be used to complete a reset function.
[0165] In another example, a bus interface includes a functional module, and the functional module is used to implement an information interaction function. During the information interaction process, the chip can call multiple bus interfaces.
[0166] In one example, a bus interface that can be called by a chip includes multiple functional modules, and the configuration information of the bus interface is as follows:
[0167]
[0168] Among them, "int32_t(*Init)(struct BusDev*dev)" is a functional module for implementing the initialization function; "void(*DeInit)(struct BusDev*dev)" is a functional module for implementing the deinitialization function; "int32_t(*ReadData)(struct BusDev*dev,uint32_t addr,uint32_t cnt,uint8_t*buf)" is a functional module for implementing the function of reading data; "int32_t(*WriteData)(structBusDev*dev,uint32_t addr,uint32_t cnt,uint8_t*buf)" is a functional module for implementing the function of writing data; "int32_t(*GetBusInfo)(struct BusDev*dev,void*busCfg)" is a functional module for implementing the transaction function of obtaining the relevant configuration information of the bus; "int32_t(*SetBusInfo)(structBusDev*dev,struct HdfConfigWiFiBus*busCfg)" is a functional module used to implement the relevant configuration functions of setting the bus.
[0169] In this case, in the solution provided in the embodiment of the present application, the correspondence between the second interface and the first interface includes the correspondence between the at least one second functional module and the at least one first functional module. If the second functional module corresponds to the first functional module, it indicates that the information interaction function performed by the second functional module is the same as that performed by the first functional module.
[0170] If the second interface includes at least one second functional module and the first interface includes at least one first functional module, then in the solution provided in the embodiment of the present application, the chip can call the second functional module when performing information interaction with the first external device. Correspondingly, the chip can perform information interaction with the first external device through the first functional module corresponding to the called second functional module.
[0171] In this case, in the solution provided in the embodiment of the present application, after calling the second target interface required for this information interaction, determining the first target interface corresponding to the second target interface according to the corresponding relationship includes the following steps:
[0172] The first step is to determine a second target functional module in the second target interface according to the requirement of information interaction with the first external device;
[0173] In a second step, according to the corresponding relationship, a first target function module corresponding to the second target function module is determined, and the first target interface includes the first target function module.
[0174] Correspondingly, performing information interaction with the first external device through the first target interface includes:
[0175] Information interaction is performed with the first external device through the first target function module in the first target interface.
[0176] Through the above steps, if the first interface and the second interface include multiple functional modules, information interaction can be performed through some of the functional modules according to the needs of this information interaction without calling all the functional modules, thereby improving the processing efficiency of the chip.
[0177] In order to clarify the solution provided by the embodiment of the present application, the embodiment of the present application provides an example and provides Figure 6 , Figure 6 The following is a schematic diagram of the information interaction scenario in this example.
[0178] In this example, the chip can exchange information with an SDIO external device, a PCI external device, and a USB external device respectively, and when external devices of the same type exchange information with the chip, the applicable bus interface is the same.
[0179] In order to realize information interaction between the chip and external devices, it is necessary to determine the first information of each external device. In this example, the first information of the SDIO external device needs to be determined; in addition, this example also needs to determine the first information corresponding to the PCI external device, and also needs to determine the first information of the USB external device.
[0180] The first information of each external device often includes identification information of the external device and a bus interface of the external device.
[0181] In addition, in order to realize information interaction between the chip and the external device, it is necessary to determine the correspondence between the bus interface called by the chip and the bus interface applicable to the external device.
[0182] exist Figure 6 In the corresponding example, the correspondence between the bus interface of the chip for information interaction and the bus interface of the SDIO external device for information interaction can be indicated by the following description:
[0183] "ops.Initv=HdfSdioCreateDev;
[0184] ops.ReadData=HdfSdioReadN;
[0185] ops.WriteData = HdfSdioWriteN
[0186] ..."
[0187] The description indicates that in this example, when the chip interacts with the SDIO external device, the bus interface called for initialization is "ops.Initv", and the bus interface used by the SDIO external device for initialization is "HdfSdioCreateDev"; in addition, when the chip interacts with the SDIO external device, the bus interface called for reading data is "ops.ReadData", and the bus interface used by the SDIO external device to read data is "HdfSdioReadN"; in addition, when the chip interacts with the SDIO external device, the bus interface called for writing data is "ops.WriteData", and the bus interface used by the SDIO external device to write data is "HdfSdioWriteN".
[0188] In this case, when the chip needs to read data from the SDIO external device, it calls the bus interface "ops.ReadData", and based on the above correspondence, it can be determined that this bus interface corresponds to the bus interface "HdfSdioReadN" applicable to the SDIO external device. In this case, after calling the bus interface "ops.ReadData", the chip will read the data of the SDIO external device through the bus interface "HdfSdioReadN".
[0189] Furthermore, in this example, when the chip exchanges information with other external devices (such as PCI external devices and USB external devices), the bus interfaces called may include "ops.Initv", "ops.ReadData" and "ops.WriteData". In this case, when the chip needs to read data from different external devices, the bus interface called is "ops.ReadData", and when it needs to write data to different external devices, the bus interface called is "ops.WriteData".
[0190] Through the solution provided in the embodiment of the present application, the chip realizes information interaction with the external device through the first information of the external device. In order to clarify this process, an example is disclosed below.
[0191] See also Figure 7 As shown in the schematic diagram, in this example, the chip can exchange information with the SDIO external device and the I2C external device. Accordingly, the chip can determine the first information of the SDIO external device and determine the first information of the I2C external device.
[0192] The first information of the SDIO external device includes the identification information of the SDIO external device and the bus interface of the SDIO external device for information exchange with the chip. In addition, the first information of the I2C external device includes the identification information of the I2C external device and the bus interface of the I2C external device for information exchange with the chip.
[0193] In this example, see Figure 7 When the chip interacts with the SDIO external device and the I2C external device respectively, the bus interface used to set the initialization parameters is "OPS.SetInfo", the bus interface used to read data is "OPS.ReadData", and the bus interface used to write data is "OPS.WriteData".
[0194] When the SDIO external device exchanges information with the chip, the bus interfaces used include the bus interface "SdioSetInfo" for setting initialization parameters, the bus interface "SdioReadInfo" for reading data, and the bus interface "SdioWriteData" for writing data.
[0195] When the I2C external device exchanges information with the chip, the bus interfaces used include the bus interface "I2CSetInfo" for setting initialization parameters, the bus interface "I2CSetInfo" for reading data, and the bus interface "I2CWriteData" for writing data.
[0196] Correspondingly, the bus interface "OPS.SetInfo" corresponds to the bus interface "SdioSetInfo", the bus interface "OPS.ReadData" corresponds to the bus interface "SdioReadInfo", and the bus interface "OPS.WriteData" corresponds to the bus interface "SdioWriteData".
[0197] In addition, the bus interface "OPS.SetInfo" corresponds to the bus interface "I2CSetInfo", the bus interface "OPS.ReadData" corresponds to the bus interface "I2CReadInfo", and the bus interface "OPS.WriteData" corresponds to the bus interface "I2CWriteData".
[0198] In this case, if the chip reads data in the SDIO external device, the bus interface "OPS.ReadData" can be called, and then the data can be read through the bus interface "SdioReadInfo" corresponding to the bus interface "OPS.ReadData".
[0199] If the chip writes data to an I2C external device, the bus interface "OPS.WriteData" can be called, and then the data can be written through the bus interface "I2CReadInfo" corresponding to the bus interface "OPS.WriteData".
[0200] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0201] As an implementation of the above embodiments, the embodiments of the present application disclose an information interaction device. The embodiments of the present application provide an information interaction device, which can be arranged in a chip, or the information interaction device can be a chip, or the information interaction device can also be in other forms. Moreover, the information interaction device can exchange information with an external device through a bus.
[0202] See also Figure 8 As shown in the schematic diagram, the information interaction device includes: a processor 1110 and a transceiver interface 1120.
[0203] The processor 1110 is used to determine first information of a first external device, where the first external device is an external device that needs to exchange information with the chip, and the first information includes identification information of the first external device and at least one first interface of the first external device, where the at least one first interface is a bus interface for the first external device to exchange information with the chip;
[0204] The processor 1110 is further configured to determine, according to the identification information of the first external device, a correspondence between at least one second interface of the chip and the at least one first interface, where the at least one second interface is a bus interface for the chip to perform information exchange with the first external device;
[0205] The processor 1110 is further configured to, after calling the second target interface required for this information interaction, determine, according to the corresponding relationship, a first target interface corresponding to the second target interface, the second interface including the second target interface, and the first interface including the first target interface;
[0206] The transceiver interface 1120 is used to exchange information with the first external device through the first target interface.
[0207] The first external device may be a variety of external devices. For example, the first external device may be any one of an I2C external device, an SDIO external device, and a PCI external device. Of course, the first external device may also be other external devices that can be connected to the chip through a bus and exchange information with the chip, which is not limited in the present embodiment. In the solution provided in the present embodiment, the first external device exchanges information with the chip through at least one first interface of the first external device.
[0208] Through the solution provided in the embodiment of the present application, the chip can convert the bus interface called by itself into the bus interface applicable to the first external device according to the needs of information interaction through the correspondence between at least one second interface of the chip and at least one first interface of the first external device, and convert the second target interface called by the chip during this information interaction into the first bus interface applicable to the first external device, and exchange information with the first external device through the first bus interface. This eliminates the need for developers to configure the bus interface of the chip for external devices that require information interaction. Compared with the prior art, the configuration operations of the bus interface can be reduced.
[0209] In the solution provided in the embodiment of the present application, the chip can exchange information with multiple external devices. In this case, the processor is also used to determine second information of a second external device, where the second external device is an external device that needs to exchange information with the chip, and the second information includes identification information of the second external device and at least one third interface of the second external device, where the at least one third interface is a bus interface for the second external device to exchange information with the chip;
[0210] The processor is further configured to determine, according to the identification information of the second external device, a correspondence between at least one fourth interface of the chip and the at least one third interface, wherein the at least one fourth interface is a bus interface for the chip to perform information exchange with the second external device;
[0211] The processor is further configured to, after calling the fourth target interface required for this information interaction, determine, according to the corresponding relationship, a third target interface corresponding to the fourth target interface;
[0212] The transceiver interface is further used to exchange information with the second external device through the third target interface, the fourth interface includes the fourth target interface, and the third interface includes the third target interface.
[0213] The second external device and the first external device are different external devices. Through the above embodiments, the chip can realize information interaction with a variety of different external devices, meeting the needs of chip information interaction.
[0214] Further, in a feasible design, the second interface includes a second device interface for information interaction with the first external device; the fourth interface includes a fourth device interface for information interaction with the second external device; the second device interface is the same as the fourth device interface.
[0215] Through the above solution, if the second device interface used by the chip to perform information interaction with the first external device is the same as the fourth device interface used by the chip to perform information interaction with the second external device, then when the chip performs information interaction with the first external device, the chip can call the second device interface, then, when the chip performs information interaction with the second external device for the same requirement, the chip can still call the second device interface. In other words, the chip can call the same bus interface when performing information interaction with different external devices.
[0216] Therefore, compared with the prior art, the solution of the embodiment of the present application can also reduce the configuration of interface calls performed on the chip.
[0217] In addition, in the solution provided in the embodiment of the present application, a bus interface may include one or more functional modules. In this case, the second interface includes at least one second functional module, the first interface includes at least one first functional module, and the corresponding relationship between the second interface and the first interface includes the corresponding relationship between the at least one second functional module and the at least one first functional module.
[0218] If the second interface includes at least one second functional module and the first interface includes at least one first functional module, then in the solution provided in the embodiment of the present application, the chip can call the second functional module when performing information interaction with the first external device. Correspondingly, the chip can perform information interaction with the first external device through the first functional module corresponding to the called second functional module.
[0219] In this case, in the solution provided in the embodiment of the present application, the processor is specifically used to determine the second target function module in the second target interface according to the requirement of information interaction with the first external device;
[0220] According to the corresponding relationship, determining a first target function module corresponding to the second target function module, wherein the first target interface includes the first target function module;
[0221] The performing information interaction with the first external device through the first target interface includes:
[0222] Information interaction is performed with the first external device through the first target function module in the first target interface.
[0223] Through the above scheme, if the first interface and the second interface include multiple functional modules, information interaction can be performed through some of the functional modules according to the needs of this information interaction without calling all the functional modules, thereby improving the processing efficiency of the chip.
[0224] In a feasible design, the first information includes a first object;
[0225] The first object includes a first member and a second member;
[0226] The first member includes identification information of the first external device;
[0227] The second member includes at least one first interface of the first external device.
[0228] Correspondingly, corresponding to the above method, the present application embodiment also discloses a terminal device. Fig. 9 As shown in the structural schematic diagram, the terminal device includes:
[0229] at least one processor 1101 and a memory,
[0230] Wherein, the memory is used to store program instructions;
[0231] The processor is used to call and execute the program instructions stored in the memory so that the terminal device executes Figure 2 and Figure 4 All or part of the steps in the corresponding embodiments.
[0232] Furthermore, the terminal device may also include: a transceiver 1102 and a bus 1103 , and the memory includes a random access memory 1104 and a read-only memory 1105 .
[0233] The processor is coupled to the transceiver, random access memory and read-only memory through the bus. When the terminal device needs to be operated, the basic input and output system solidified in the read-only memory or the bootloader boot system in the embedded system is used to start the terminal device and guide the terminal device into a normal operating state. After the terminal device enters the normal operating state, the application program and the operating system are run in the random access memory, so that the terminal device executes Figure 2 and Figure 4 All or part of the steps in the corresponding embodiments.
[0234] The device of the embodiment of the present invention may correspond to the above Figure 2 and Figure 4 The information interaction device in the corresponding embodiment, and the processor in the device can implement Figure 2 and Figure 4 For the sake of brevity, the functions of the information interaction device in the corresponding embodiment or the various steps and methods implemented are not described in detail here.
[0235] The terminal device may be a chip, or a terminal device with a built-in chip, or other forms. Furthermore, the terminal device may exchange information with external devices via a bus.
[0236] In a specific implementation, the present application also provides a computer-readable storage medium, which includes instructions. The computer-readable storage medium set in any device can implement the following when it is executed on a computer: Figure 2 and Figure 4 The computer-readable storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0237] In addition, another embodiment of the present application further discloses a computer program product comprising instructions, when the computer program product is run on an electronic device, the electronic device can implement the following steps: Figure 2 and Figure 4 All or part of the steps in the corresponding embodiments.
[0238] The various illustrative logic units and circuits described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital information processor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or the design of any combination of the above functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital information processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital information processor core, or any other similar configuration to implement.
[0239] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two. The software unit can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a UE. Optionally, the processor and the storage medium can also be arranged in different components in the UE.
[0240] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0241] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0242] The same or similar parts between the various embodiments of this specification can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment part.
[0243] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention or some parts of the embodiments.
[0244] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the embodiment of the road constraint determination device disclosed in this application, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0245] The above-described embodiments of the present invention do not limit the protection scope of the present invention.
Claims
1. An information interaction method, characterized in that: include: Determine first information of a first external device, where the first external device is an external device that needs to perform information interaction with the chip, and the first information includes identification information of the first external device and at least one first interface of the first external device, where the at least one first interface is a bus interface for the first external device to perform information interaction with the chip; Determine, according to the identification information of the first external device, a correspondence between at least one second interface of the chip and the at least one first interface, wherein the at least one second interface is a bus interface for the chip to perform information exchange with the first external device; After calling the second target interface required for this information interaction, determining, according to the corresponding relationship, a first target interface corresponding to the second target interface, the second interface includes the second target interface, the first interface includes the first target interface, and the first target interface is connected to the second target interface; Exchanging information with the first external device through the first target interface; The method further comprises: Determine second information of a second external device, where the second external device is an external device that needs to perform information interaction with the chip, and the second information includes identification information of the second external device and at least one third interface of the second external device, where the at least one third interface is a bus interface for the second external device to perform information interaction with the chip; Determine, according to the identification information of the second external device, a correspondence between at least one fourth interface of the chip and the at least one third interface, wherein the at least one fourth interface is a bus interface for the chip to perform information exchange with the second external device; After calling the fourth target interface required for this information interaction, determining the third target interface corresponding to the fourth target interface according to the corresponding relationship, and performing information interaction with the second external device through the third target interface, the fourth interface includes the fourth target interface, the third interface includes the third target interface, and the third target interface is connected to the fourth target interface; If the chip performs information exchange of the same requirement through the second target interface and the fourth target interface, the second target interface and the fourth target interface are the same.
2. The method according to claim 1, characterized in that The second interface includes at least one second functional module, the first interface includes at least one first functional module, and the corresponding relationship between the second interface and the first interface includes the corresponding relationship between the at least one second functional module and the at least one first functional module.
3. The method according to claim 2, characterized in that After calling the second target interface required for the current information interaction, determining the first target interface corresponding to the second target interface according to the corresponding relationship includes: Determining a second target functional module in the second target interface according to a requirement for information interaction with the first external device; According to the corresponding relationship, determining a first target function module corresponding to the second target function module, wherein the first target interface includes the first target function module; The performing information interaction with the first external device through the first target interface includes: Information interaction is performed with the first external device through the first target function module in the first target interface.
4. The method according to any one of claims 1 to 3, characterized in that: The first information includes a first object; The first object includes a first member and a second member; The first member includes identification information of the first external device; The second member includes at least one first interface of the first external device.
5. An information interaction device, characterized in that: include: Processor and transceiver interface; The processor is used to determine first information of a first external device, where the first external device is an external device that needs to exchange information with the chip, and the first information includes identification information of the first external device and at least one first interface of the first external device, where the at least one first interface is a bus interface for the first external device to exchange information with the chip; The processor is further configured to determine, according to the identification information of the first external device, a correspondence between at least one second interface of the chip and the at least one first interface, wherein the at least one second interface is a bus interface for the chip to perform information exchange with the first external device; The processor is further configured to, after calling the second target interface required for this information interaction, determine, according to the corresponding relationship, a first target interface corresponding to the second target interface, the second interface includes the second target interface, the first interface includes the first target interface, and the first target interface is connected to the second target interface; The transceiver interface is used to exchange information with the first external device through the first target interface; The processor is further configured to determine second information of a second external device, where the second external device is an external device that needs to perform information interaction with the chip, and the second information includes identification information of the second external device and at least one third interface of the second external device, where the at least one third interface is a bus interface for the second external device to perform information interaction with the chip; The processor is further configured to determine, according to the identification information of the second external device, a correspondence between at least one fourth interface of the chip and the at least one third interface, wherein the at least one fourth interface is a bus interface for the chip to perform information exchange with the second external device; The processor is further configured to, after calling the fourth target interface required for this information interaction, determine, according to the corresponding relationship, a third target interface corresponding to the fourth target interface; The transceiver interface is further used to perform information exchange with the second external device through the third target interface, the fourth interface includes the fourth target interface, the third interface includes the third target interface, and the third target interface is connected to the fourth target interface; If the chip performs information exchange of the same requirement through the second target interface and the fourth target interface, the second target interface and the fourth target interface are the same.
6. The device according to claim 5, characterized in that The second interface includes at least one second functional module, the first interface includes at least one first functional module, and the corresponding relationship between the second interface and the first interface includes the corresponding relationship between the at least one second functional module and the at least one first functional module.
7. The device according to claim 6, characterized in that The processor is specifically configured to determine a second target functional module in the second target interface according to a requirement for information interaction with the first external device; According to the corresponding relationship, determining a first target function module corresponding to the second target function module, wherein the first target interface includes the first target function module; The performing information interaction with the first external device through the first target interface includes: Information interaction is performed with the first external device through the first target function module in the first target interface.
8. The device according to any one of claims 5 to 7, characterized in that The first information includes a first object; The first object includes a first member and a second member; The first member includes identification information of the first external device; The second member includes at least one first interface of the first external device.
9. A terminal device, characterized in that: include: at least one processor and memory, The memory is used to store program instructions; The processor is used to call and execute the program instructions stored in the memory so that the terminal device executes the information interaction method described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the information interaction method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Multiple peripheral adapter device driver architecture
US5586268A
