Bus control method, electronic device, storage medium, and computer program product
Patent Information
- Application Number
- CN202510464722.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-10-20
AI Technical Summary
在电子设备执行各个功能模块时,多个功能模块均需要对存储器进行访问,容易造成多个功能模块调用的时序冲突,进而使得电子设备的功能异常
[0040]本公开实施例能够基于访问请求,控制总线处于第一总线状态;在总线处于第一总线状态的情况下,控制电子设备通过总线访问存储器的第一数据,并阻止电子设备通过总线访问存储器中第一数据以外的第二数据;第一数据用于在电子设备执行第一功能模块时实现第一功能;第二数据用于在电子设备执行与第一功能模块不同的第二功能模块时实现第二功能。
Smart Images

Figure HDA0005359310320000011 
Figure HDA0005359310320000012 
Figure HDA0005359310320000021
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of bus control technology, and in particular to a bus control method, electronic device, storage medium, and computer program product. Background Technology
[0002] As electronic devices, such as smartphones, become increasingly feature-rich, the number of functional modules within their chips is also growing. The chip's memory stores the data required for each functional module to function. When an electronic device executes its various functional modules, multiple modules need to access this memory, which can easily lead to timing conflicts between these calls, causing malfunctions in the electronic device. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a bus control method, electronic device, storage medium, and computer program product that enables clearer bus control.
[0004] According to a first aspect of the present disclosure, a bus control method is provided, comprising:
[0005] Generate an access request, the access request being used by the electronic device to request access to first data in the memory via the bus;
[0006] Based on the access request, control the bus to be in the first bus state;
[0007] When the bus is in the first bus state, the electronic device is controlled to access the first data in the memory through the bus, and the electronic device is prevented from accessing the second data in the memory other than the first data through the bus;
[0008] The first data is used to implement the first function when the electronic device executes the first functional module;
[0009] The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
[0010] In some embodiments, the method further includes:
[0011] When the electronic device finishes accessing the first data in the memory, the bus is controlled to switch from the first bus state to the second bus state.
[0012] When the bus is in the second bus state, the electronic device is allowed to access the second data in the memory via the bus.
[0013] In some embodiments, the method further includes:
[0014] Determine the control duration for the electronic device to control the bus;
[0015] If the electronic device receives an exit request and the duration for which the electronic device controls the bus reaches the control duration, it is determined that the electronic device ends its access to the first data in the memory.
[0016] The exit request is used to request the withdrawal of access to the first data in the memory.
[0017] In some embodiments, determining the control duration for controlling the bus includes:
[0018] Obtain the access duration required for the electronic device to access the first data in the memory;
[0019] The control duration is determined based on the access duration and the preset fluctuation duration;
[0020] Wherein, the control duration is greater than the access duration.
[0021] In some embodiments, the method further includes:
[0022] The exit request is generated when the electronic device has finished reading the first data from the memory.
[0023] In some embodiments, controlling the bus to be in a first bus state based on the access request includes:
[0024] When the touch and display driver integrated chip of the electronic device receives the access request, it controls the bus to switch from the second bus state to the first bus state.
[0025] In some embodiments, generating the access request includes:
[0026] The access request is generated when the electronic device is detected to be in the vertical blanking interval.
[0027] According to a second aspect of the present disclosure, an electronic device is provided, comprising:
[0028] An access generation unit is configured to generate an access request, the access request being used by an electronic device to request access to first data in a memory via a bus.
[0029] A first control unit is configured to control the bus to be in a first bus state based on the access request;
[0030] The second control unit is configured to, when the bus is in the first bus state, control the electronic device to access the first data in the memory through the bus, and prevent the electronic device from accessing second data other than the first data in the memory through the bus;
[0031] The first data is used to implement the first function when the electronic device executes the first functional module;
[0032] The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
[0033] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0034] processor;
[0035] Memory used to store computer programs or instructions;
[0036] The processor executes the computer program or instructions to implement the steps of the method described in the first aspect above.
[0037] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, the storage medium storing a computer program or instructions that, when executed by a processor, implement the steps of the method described in the first aspect.
[0038] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0039] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0040] The embodiments of this disclosure can control the bus to be in a first bus state based on an access request; when the bus is in the first bus state, control the electronic device to access first data in the memory through the bus, and prevent the electronic device from accessing second data other than the first data in the memory through the bus; the first data is used to implement a first function when the electronic device executes a first functional module; the second data is used to implement a second function when the electronic device executes a second functional module different from the first functional module.
[0041] In other words, by controlling the bus to be in a first bus state, the bus can be controlled by an electronic device to access first data to achieve the first function of the first functional module, but cannot be controlled by the electronic device to access second data to achieve the second function of the second functional module. Thus, by controlling the state of the bus, the control of the bus becomes clearer, thereby reducing timing conflicts caused by different functional modules accessing memory through the bus, and enabling the electronic device to more stably call functional modules to achieve the corresponding functions.
[0042] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0044] Figure 1 This is a flowchart illustrating a bus control method according to an exemplary embodiment. Figure 1 .
[0045] Figure 2 This is a schematic diagram illustrating existing bus time-division multiplexing according to an exemplary embodiment.
[0046] Figure 3 This is a flowchart illustrating a bus control method according to an exemplary embodiment. Figure 2 .
[0047] Figure 4 This is a schematic diagram illustrating time-division multiplexing of the bus according to an exemplary embodiment of the present disclosure.
[0048] Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 1 .
[0049] Figure 6 This is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 2 . Detailed Implementation
[0050] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0051] This disclosure presents a bus control method. Figure 1 This is a flowchart illustrating a bus control method according to an exemplary embodiment. Figure 1 .like Figure 1 As shown, this bus control method is applied in electronic devices. The electronic device executes the bus control method mainly by following these steps:
[0052] Step 101: Generate an access request; the access request is used by the electronic device to request access to the first data in the memory via the bus;
[0053] Step 102: Based on the access request, the control bus is in the first bus state;
[0054] Step 103: When the bus is in the first bus state, control the electronic device to access the first data in the memory through the bus, and prevent the electronic device from accessing the second data in the memory other than the first data through the bus.
[0055] The first data is used to implement the first function when the electronic device executes the first functional module;
[0056] The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
[0057] In this embodiment of the disclosure, the bus control method can be applied to scenarios where electronic devices control the bus when calling different functional modules. Here, the bus control method can control the bus to be in a first bus state, so that when accessing the first data of the memory through the bus, the electronic device can be prevented from accessing the second data of the memory through the bus. That is, the bus can be controlled by the electronic device to access the first data, but cannot be controlled by the electronic device to access the second data. This makes the control of the bus clearer and reduces timing conflicts caused by calling different functional modules.
[0058] In step 101, the electronic device has multiple functional modules, and its memory stores data corresponding to each functional module (such as various compensation data or calibration data). This data can be stored in the memory during the manufacturing process of the electronic device. Thus, when the electronic device calls upon a functional module, it can access the memory via the bus to obtain the data corresponding to that module, thereby enabling the implementation of the respective functions of each functional module using that data.
[0059] For example, an electronic device has at least a first functional module and a second functional module. The memory can store first data corresponding to the first functional module and second data corresponding to the second functional module. In this way, when the first functional module is called, the first data in the memory can be accessed through the bus to realize the first function; or, when the second functional module needs to be called after the first functional module is called, the second data in the memory can be accessed through the bus to realize the second function.
[0060] In this embodiment of the disclosure, the first functional module may be any one of the multiple functional modules in the electronic device.
[0061] It should be noted that the first functional module can be any functional module of the touch and display driver integrated chip in the electronic device. Of course, the first functional module can also be any functional module of other chips in the electronic device besides the display-related chips.
[0062] Here, with the development of smartphones towards higher-end and thinner designs, display-related chips are evolving towards more integrated, lower-cost, and more intelligent technologies, leading to the emergence of Touch and Display Driver Integration (TDDI) chips. TDDI chips are formed by highly integrating display driver chips (Display DIC) and touch chips (Touch IC).
[0063] It should be noted that after the TDDI is powered on, the electronic device will execute different functional modules according to the startup sequence. If the electronic device executes the first functional module, it will generate an access request to request access to the first data in the memory via the bus. This first data is used by the electronic device to implement the first function when executing the first functional module.
[0064] Here, when an electronic device calls different functional modules, it can generate different access requests to request access to the storage via the bus to obtain the data corresponding to the different functional modules, so as to realize the functions of the different functional modules.
[0065] For example, the first functional module may include a temperature compensation module. When the electronic device calls the temperature compensation module, it can generate a first access request to request the electronic device to access the temperature compensation data in the memory through the bus, thereby realizing the temperature compensation function of the electronic device when displaying.
[0066] For example, the first functional module may include a first frame brightness compensation module. When the electronic device calls the first frame brightness compensation module, it can generate a second access request to request the first frame brightness compensation module to access the memory through the bus to read the first frame brightness compensation data, thereby realizing the corresponding first frame brightness compensation function.
[0067] In this embodiment of the disclosure, during the display process after the electronic device TDDI is powered on, the electronic device refreshes the screen based on the vertical synchronization signal (Vsync).
[0068] It should be noted that, in order to ensure the display effect of the electronic device, this embodiment of the disclosure proposes to generate an access request when the electronic device is detected to be in the vertical blanking interval.
[0069] Here, the vertical blanking interval Vporch of the electronic device is the non-display period after the electronic device finishes scanning each frame of the image and before the next frame of the image begins, that is, the electronic device has no content displayed on the screen during Vporch.
[0070] It is understandable that generating an access request when the electronic device is in the vertical blanking interval allows the electronic device to read the first data from the memory via the bus, which can reduce the impact on normal display and improve the display effect of the electronic device.
[0071] In step 102, the bus of the electronic device has a first bus state, which can be used to characterize that the bus is being controlled by the electronic device to transmit data, that is, the bus can be in a data transmission state.
[0072] Here, the electronic device is equipped with a bus flag bit. When the bus flag bit is in different level states, the bus has different bus states. For example, when the bus flag bit is at a high level, the bus has a first bus state; when the bus flag bit is at a low level, the bus has a second bus state that is different from the first bus state.
[0073] It should be noted that after an access request is generated, the bus can be controlled to be in a first bus state based on the access request. Here, if the access request is generated when the electronic device calls the first functional module, the first bus state can be used to characterize that the bus is being controlled by the electronic device to transmit first data.
[0074] In this embodiment of the disclosure, the control bus is in a first bus state based on the access request, which may include: switching the control bus from a second bus state to a first bus state based on the access request.
[0075] In other words, before the electronic device calls the first functional module to generate an access request, the bus can be in the second bus state. When an access request is detected, the bus state can be switched, causing the bus to switch from the second bus state to the first bus state. In this way, by switching the bus state, the electronic device can have clearer control over the bus.
[0076] In step 103, controlling the electronic device to access the first data in the memory via the bus may include: controlling the electronic device to read the first data from the memory to implement the first function. That is, when the electronic device is executing a first functional module, the electronic device can read the first data corresponding to the first functional module in the memory via the bus to implement the first function. In other words, the electronic device can perform one-way communication with the memory via the bus to read the first data in the memory.
[0077] It should be noted that when the bus is in the first bus state, the electronic device will also prevent access to the second data in the memory via the bus. In other words, by switching the bus state to the first bus state, it is possible to allow the bus to be controlled by the electronic device to access the first data to achieve the first function, while simultaneously preventing the bus from being controlled by the electronic device to access the second data to achieve the second function. This reduces timing conflicts and makes bus control clearer.
[0078] For example, the first functional module includes a temperature compensation module, and the corresponding first data includes temperature compensation data; the second functional module includes a first frame brightness compensation module, and the corresponding second data includes brightness compensation data.
[0079] When the electronic device calls the temperature compensation module, the control bus is in the first bus state, which allows the electronic device to access the temperature compensation data in the memory through the bus to realize the temperature compensation function, and prevents the electronic device from accessing the brightness compensation data in the memory through the bus.
[0080] In this embodiment of the disclosure, the second functional module can be any other functional module in the electronic device that is different from the first functional module. For example, the first and second functional modules can be different functional modules of a touch and display driver integrated chip. Of course, the first and second functional modules can also be functional modules of other chips in the electronic device besides the display-related chip. This embodiment of the disclosure does not limit this.
[0081] It is understood that the embodiments of this disclosure can control the bus to be in a first bus state based on an access request; when the bus is in the first bus state, control the electronic device to access the first data in the memory through the bus, and prevent the electronic device from accessing the second data in the memory other than the first data through the bus; the first data is used to implement the first function when the electronic device executes the first functional module; the second data is used to implement the second function when the electronic device executes the second functional module different from the first functional module.
[0082] In other words, by controlling the bus to be in a first bus state, the bus can be controlled by an electronic device to access first data to achieve the first function of the first functional module, but cannot be controlled by the electronic device to access second data to achieve the second function of the second functional module. Thus, by controlling the state of the bus, the control of the bus becomes clearer, thereby reducing timing conflicts caused by different functional modules accessing memory through the bus, and enabling the electronic device to more stably call functional modules to achieve the corresponding functions.
[0083] In some embodiments, the method further includes:
[0084] When the electronic device finishes accessing the first data in the memory, the control bus switches from the first bus state to the second bus state.
[0085] When the bus is in the second bus state, electronic devices are allowed to access second data in the memory via the bus.
[0086] In this embodiment of the disclosure, the bus of the electronic device also has a second bus state that is different from the first bus state. The second bus state can be used to characterize that the electronic device has released control of the bus and the bus is in an idle state.
[0087] It should be noted that when the bus switches from the first bus state to the second bus state, it indicates that the bus of the electronic device is switching from the data transmission state to the idle state. In other words, the change in the bus state can be used to detect the change in the control of the electronic device over the bus, thereby making the control of the bus clearer.
[0088] In this embodiment of the disclosure, when the bus is in a second bus state, the electronic device is allowed to access the second data in the memory via the bus. That is, when the bus of the electronic device is in an idle state, the electronic device can wait for the second functional module to be called. At this time, the electronic device no longer prevents access to the second data in the memory via the bus when executing the second functional module; instead, it allows access to the second data in the memory via the bus.
[0089] It should be noted that, when the electronic device allows access to the second data in the memory via the bus, the electronic device can generate an access request when executing the second functional module to request access to the second data in the memory via the bus, control the bus to switch from the second bus state to the first bus state, and finally control the electronic device to access the second data via the bus. That is, after calling the first functional module to complete the first data access, the same bus control method can be used to call the second functional module to complete the second data access.
[0090] For example, the first functional module includes a temperature compensation module, and the corresponding first data includes temperature compensation data; the second functional module includes a first frame brightness compensation module, and the corresponding second data includes brightness compensation data.
[0091] When the electronic device calls the temperature compensation module, the control bus is in the first bus state, which allows the electronic device to access the temperature compensation data in the memory through the bus to realize the temperature compensation function, and prevents the electronic device from accessing the brightness compensation data in the memory through the bus.
[0092] Once the electronic device has completed accessing the temperature compensation data (i.e., when it finishes accessing the stored temperature compensation data), the control bus switches from the first bus state to the second bus state. If the electronic device needs to access brightness compensation data, the control bus switches from the second bus state to the first bus state, allowing the electronic device to access the brightness compensation data in memory via the bus to achieve the brightness compensation function.
[0093] It is understood that, in the embodiments of this disclosure, when the bus is in a first bus state, the electronic device is controlled to access first data through the bus and prevented from accessing second data through the bus; when the bus is switched to a second bus state, the electronic device is controlled to allow access to second data through the bus.
[0094] In other words, by switching the bus state from the first bus state to the second bus state, the first functional module and the second functional module can use the same bus at different times. This not only realizes the time-division multiplexing of the bus, but also makes the control of the bus clearer when calling different functional modules by switching the bus state.
[0095] In some embodiments, the method further includes:
[0096] Determine the control duration for electronic devices to control the bus;
[0097] When the electronic device receives an exit request and the duration of the electronic device control bus reaches the control duration, it is determined that the electronic device ends its access to the first data in the memory.
[0098] The exit request is used to request the termination of access to the first data in the memory.
[0099] In this embodiment of the disclosure, the control duration is the duration for which the electronic device controls the bus to transmit the first data. The control duration can be determined based on the time required for the electronic device to call the first functional module to read the first data. Alternatively, the control duration of different functional modules can be obtained by looking up the mapping relationship table between the control duration and the functional modules. This embodiment of the disclosure does not impose any limitations on this.
[0100] In some embodiments, determining the control duration for the electronic device to control the bus includes:
[0101] The access time required to obtain the first data accessed by the electronic device to its memory;
[0102] The control duration is determined based on the access duration and the preset fluctuation duration;
[0103] Among them, the control duration is longer than the access duration.
[0104] In this embodiment of the disclosure, the electronic device can determine the access duration required for the electronic device to access the first data based on the total amount of first data transmitted.
[0105] It should be noted that, in addition to determining the access duration based on the total amount of first data transmitted, the access duration can also be determined by combining parameters such as memory bandwidth and bus efficiency. This disclosure does not limit this approach.
[0106] In this embodiment of the disclosure, considering the fluctuations of the internal oscillator (OSC) of the electronic device and the differences between chips of different electronic devices, the control duration is determined based on the access duration and the preset fluctuation duration during the process of determining the control duration, so that the control duration is greater than the access duration. This can reduce the situation of switching the bus state during the transmission of the first data on the bus, thereby enabling better control of the bus and further clarifying the control of the bus.
[0107] It should be noted that determining the control duration based on the access duration and the preset fluctuation duration may include: obtaining the control duration based on the sum of the access duration and the preset fluctuation duration.
[0108] In this embodiment of the disclosure, before the electronic device accesses the memory for the specified control duration, the bus of the electronic device remains in a first bus state, during which time the electronic device can enter a waiting phase. During this waiting phase, the electronic device can access the first data in the memory via the bus.
[0109] It should be noted that the start time can be the moment the access request is received, and the waiting control duration can be set so that the electronic device can access the memory within the specified control duration.
[0110] In this embodiment of the disclosure, the electronic device receives an exit request to request the exit from access to the first data in the memory.
[0111] In some embodiments, the method further includes:
[0112] Once the electronic device has finished reading the first data from the memory, an exit request is generated.
[0113] In this embodiment of the disclosure, the interaction between the electronic device and the memory and TDDI via the bus includes three stages: the first stage is the access stage, the second stage is the data reading stage, and the third stage is the exit stage.
[0114] In the first phase, the electronic device generates an access request and sends the access request to TDDI.
[0115] In the second stage, the electronic device reads the first data from the memory via the bus;
[0116] In the third stage, after reading the first data, the electronic device generates an exit request and sends the exit request to TDDI.
[0117] It is understandable that by generating an exit request after reading the first data, the control bus can be switched from the first bus state to the second bus state after reading the first data, thereby enabling better release of control and facilitating electronic devices to access the second data in the memory via the bus.
[0118] In this embodiment of the disclosure, the electronic device determines whether it has ended access to the first data in the memory based on the exit request and the control duration, and then determines whether to switch the bus from the first bus state to the second bus state.
[0119] It should be noted that when TDDI receives an exit request and the duration of the TDDI control bus reaches the control duration, the TDDI control bus can be used to switch from the first bus state to the second bus state.
[0120] Here, if TDDI does not receive an exit request, and / or the TDDI control bus duration has not reached the control duration, the electronic device's bus can be kept in the first bus state. This allows for better control over the bus state.
[0121] It is understood that, on the one hand, the embodiments of this disclosure do not directly control the switching of bus states based on the access duration, but rather control the switching of bus states based on the control duration of the electronic device controlling the bus, which makes the switching of bus states more accurate; on the other hand, in addition to considering the control duration, the embodiments of this disclosure can also combine the exit request to determine whether the access has ended, which can further make the switching of bus states more accurate.
[0122] In some embodiments, based on an access request, the control bus is in a first bus state, including:
[0123] When the touch and display driver integrated chip of an electronic device receives an access request, the control bus switches from the second bus state to the first bus state.
[0124] In this embodiment of the disclosure, the electronic device has a TDDI (Digital Transmission Device). When the electronic device calls a first functional module to implement a first function, it generates an access request. This access request is sent to the TDDI. At this time, upon receiving the access request, the TDDI can control the bus to switch from a second bus state to a first bus state.
[0125] It is understood that the embodiments of this disclosure control the switching of the bus state through TDDI, which makes the control of the bus clearer and reduces the timing conflicts caused by different functional modules accessing the memory through the bus.
[0126] To better understand the bus control method in one or more of the above embodiments, the following examples of embodiments of this disclosure are provided:
[0127] Figure 2 This is a schematic diagram illustrating existing bus time-division multiplexing according to an exemplary embodiment. Taking the execution of a first functional module IPA and a second functional module IPB by an electronic device as an example, the stages in which the electronic device interacts with the memory and TDDI via the bus when calling IPA and IPB include: access stage A, data read stage B, and exit stage C.
[0128] like Figure 2 As shown, when the electronic device executes IPA, the bus is in the first bus state, meaning the bus flag (BUSflag) remains high. At this time, the electronic device can access the stored first data through single-ended communication with the memory via the bus. When the electronic device finishes accessing the first data, because the bus remains in the first bus state and has not switched to the second bus state, the control of the electronic device over the bus to access the first data is not released; that is, the control of the bus is occupied. Consequently, the electronic device cannot access the second data through the bus when executing the second functional module, causing the second function to malfunction.
[0129] Based on this, this disclosure proposes a bus control method. Figure 3 This is a flowchart illustrating a bus control method according to an exemplary embodiment. Figure 2 .like Figure 3 As shown, the bus control method includes the following steps:
[0130] 301. Generate access request;
[0131] Here, electronic devices can send access requests to TDDI;
[0132] 302. Based on the access request, the control bus is in the first bus state;
[0133] Here, upon receiving the access request, TDDI controls the bus to enter the first bus state based on the access request. This TDDI control of the bus to enter the first bus state includes: TDDI switching the bus flag bit of the electronic device to a high level;
[0134] 303. When the bus is in the first bus state, control the electronic device to access the first data in the memory through the bus, and prevent the electronic device from accessing the second data in the memory other than the first data through the bus;
[0135] Here, during the process of the electronic device accessing the first data stored via the bus, TDDI will wait until the duration of TDDI control of the bus reaches the control duration.
[0136] 304. When the electronic device finishes accessing the first data in the memory, the control bus switches from the first bus state to the second bus state;
[0137] Here, when the electronic device finishes reading the first data, it generates an exit request and sends the exit request to TDDI. When TDDI receives the exit request and the control bus duration reaches the control duration, it determines that the electronic device has ended its access to the first data in the memory. At this time, TDDI controls the bus to switch from the first bus state to the second bus state.
[0138] The aforementioned control bus switches from the first bus state to the second bus state, including: IDDI switching the bus flag bit of the electronic device from high level to low level.
[0139] 305. When the bus is in the second bus state, electronic devices are allowed to access the second data of the memory via the bus.
[0140] It is understood that, in the embodiments of this disclosure, when the electronic device finishes accessing the first data in the memory, the bus will be controlled to switch from the first bus state to the second bus state. In this way, the control right to access the first data on the bus can be released by switching the bus state, so that the electronic device can access the second data through the bus when executing the second functional module.
[0141] For example, Figure 4 This is a schematic diagram illustrating time-division multiplexing of the bus according to an exemplary embodiment of the present disclosure. For example... Figure 4As shown, when the electronic device finishes accessing the first data in the memory, the bus switches from the first bus state to the second bus state when the electronic device executes IPA, that is, the bus flag bit switches from high level to low level. At this time, when the electronic device executes the second functional module IPB, the bus can switch from the second bus state to the first bus state, that is, the bus flag bit switches from low level to high level. Thus, the electronic device can interact with the memory and IDDI through the bus to execute the above three different stages A, B and C.
[0142] It is understood that by controlling the bus state of electronic devices through the bus control method proposed in the embodiments of this disclosure, time-division multiplexing of IPA and IPB can be achieved, that is, IPA and IPB can use the same bus at different times, reducing the functional abnormalities of electronic devices caused by timing conflicts.
[0143] This disclosure also proposes an electronic device. Figure 5 This is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 1 .like Figure 2 As shown, the electronic device mainly includes:
[0144] Access generation unit 501 is configured to generate an access request, the access request being used by an electronic device to request access to first data in memory via a bus;
[0145] The first control unit 502 is configured to control the bus to be in a first bus state based on the access request;
[0146] The second control unit 503 is configured to, when the bus is in the first bus state, control the electronic device to access the first data in the memory through the bus, and prevent the electronic device from accessing second data other than the first data in the memory through the bus;
[0147] The first data is used to implement the first function when the electronic device executes the first functional module;
[0148] The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
[0149] In some embodiments, the electronic device further includes:
[0150] The third control module is configured to control the bus to switch from the first bus state to the second bus state when the electronic device ends its access to the first data in the memory;
[0151] An access module is configured to allow the electronic device to access the second data of the memory via the bus when the bus is in the second bus state.
[0152] In some embodiments, the electronic device further includes:
[0153] The duration determination module is configured to determine the control duration for the electronic device to control the bus;
[0154] The termination determination module is configured to determine that the electronic device terminates access to the first data in the memory when the electronic device receives an exit request and the duration for which the electronic device controls the bus reaches the control duration.
[0155] The exit request is used to request the withdrawal of access to the first data in the memory.
[0156] In some embodiments, the duration determination module is further configured to obtain the access duration required for the electronic device to access the first data in the memory; and to determine the control duration based on the access duration and a preset fluctuation duration; wherein the control duration is greater than the access duration.
[0157] In some embodiments, the electronic device further includes:
[0158] The exit generation module is configured to generate the exit request when the electronic device has finished reading the first data from the memory.
[0159] In some embodiments, the first control unit is further configured to control the bus to switch from a second bus state to the first bus state when the touch and display driver integrated chip of the electronic device receives the access request.
[0160] In some embodiments, the access generation module is further configured to generate the access request when the electronic device is detected to be in a vertical blanking interval.
[0161] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0162] Figure 6 This is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 2 For example, electronic device 600 can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0163] Reference Figure 6 The electronic device 600 may include one or more of the following components: processing component 602, memory 604, power supply component 606, multimedia component 608, audio component 610, input / output (I / O) interface 612, sensor component 614, and communication component 616.
[0164] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0165] Memory 604 is configured to store various types of data to support operation on electronic device 600. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, and videos. Memory 604 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 storage, flash memory, magnetic disk, or optical disk.
[0166] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.
[0167] Multimedia component 608 includes a screen that provides an output interface between electronic device 600 and 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 touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When electronic device 600 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0168] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0169] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0170] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 may detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or one of its components, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.
[0171] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wide Band (UWB), Bluetooth (BT), and other technologies.
[0172] In an exemplary embodiment, the electronic device 600 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.
[0173] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including executable instructions or a computer program, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0174] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform any of the bus control methods described in the embodiments of this disclosure. For example, the method includes:
[0175] Generate an access request, the access request being used by the electronic device to request access to first data in the memory via the bus;
[0176] Based on the access request, control the bus to be in the first bus state;
[0177] When the bus is in the first bus state, the electronic device is controlled to access the first data in the memory through the bus, and the electronic device is prevented from accessing the second data in the memory other than the first data through the bus;
[0178] The first data is used to implement the first function when the electronic device executes the first functional module;
[0179] The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
[0180] This disclosure provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the bus control methods described in this disclosure.
[0181] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0182] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A bus control method, characterized in that, include: Generate an access request, the access request being used by the electronic device to request access to first data in the memory via the bus; Based on the access request, control the bus to be in the first bus state; When the bus is in the first bus state, the electronic device is controlled to access the first data in the memory through the bus, and the electronic device is prevented from accessing the second data in the memory other than the first data through the bus; The first data is used to implement the first function when the electronic device executes the first functional module; The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
2. The method according to claim 1, characterized in that, The method further includes: When the electronic device finishes accessing the first data in the memory, the bus is controlled to switch from the first bus state to the second bus state. When the bus is in the second bus state, the electronic device is allowed to access the second data in the memory via the bus.
3. The method according to claim 2, characterized in that, The method further includes: Determine the control duration for the electronic device to control the bus; If the electronic device receives an exit request and the duration for which the electronic device controls the bus reaches the control duration, it is determined that the electronic device ends its access to the first data in the memory. The exit request is used to request the withdrawal of access to the first data in the memory.
4. The method according to claim 3, characterized in that, The determination of the control duration for controlling the bus includes: Obtain the access duration required for the electronic device to access the first data in the memory; The control duration is determined based on the access duration and the preset fluctuation duration; Wherein, the control duration is greater than the access duration.
5. The method according to claim 3, characterized in that, The method further includes: The exit request is generated when the electronic device has finished reading the first data from the memory.
6. The method according to any one of claims 1 to 5, characterized in that, The step of controlling the bus to be in a first bus state based on the access request includes: When the touch and display driver integrated chip of the electronic device receives the access request, it controls the bus to switch from the second bus state to the first bus state.
7. The method according to any one of claims 1 to 5, characterized in that, The generation of the access request includes: The access request is generated when the electronic device is detected to be in the vertical blanking interval.
8. An electronic device, characterized in that, include: An access generation unit is configured to generate an access request, the access request being used by an electronic device to request access to first data in a memory via a bus. A first control unit is configured to control the bus to be in a first bus state based on the access request; The second control unit is configured to, when the bus is in the first bus state, control the electronic device to access the first data in the memory through the bus, and prevent the electronic device from accessing second data other than the first data in the memory through the bus; The first data is used to implement the first function when the electronic device executes the first functional module; The second data is used to implement the second function when the electronic device executes a second function module that is different from the first function module.
9. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.