Clock control method, device and system
The clock signal is generated and output by the clock management device, and the clock signal is controlled according to the clock request type of the slave device, which solves the problems of the host device management complexity and inaccurate clock management, and realizes the reduction of system power consumption and the slave device clock Accurate control.
Patent Information
- Application Number
- CN202411310549.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In a multi-master-slave interactive system, the host device manages the clock of the slave device, resulting in increased complexity and inaccurate clock management, and the power consumption cannot be effectively reduced.
The clock management device generates and outputs a clock signal, obtains the set of clock requests of the slave device, controls the clock signal output according to the request type, reduces the management complexity of the host device, and accurately controls the clock of the slave device, and reduces system power consumption.
It reduces the complexity of the host equipment and system power consumption, realizes precise control of the slave equipment clock, and improves the overall performance and efficiency of the system.
Smart Images

Figure CN119292448A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of clock management, and in particular to a clock control method, device and system. Background Art
[0002] When there are multiple master-slave devices interacting in the system, in order to reduce power consumption, the host device is often used to manage the status of each slave device, and manage its power supply or clock according to the status of the slave device. Although this method can reduce the power consumption of the integrated circuit, since the host device needs to manage the slave device, the complexity of the host device will increase, the performance will decrease, and the clock management of the slave device will not be very accurate. Summary of the invention
[0003] In view of this, the present invention provides a clock control method, device and system to solve the problems of low accuracy of clock management of slave devices and high complexity of host devices.
[0004] In a first aspect, the present invention provides a clock control method, which is applied to a clock management device, and the method comprises:
[0005] Generate a clock signal and output the clock signal to a slave device in a slave device cluster; the slave device cluster includes at least one slave device, and the at least one slave device is connected to a clock management device;
[0006] Obtain a clock request set of a slave device cluster, and determine the request type corresponding to each clock request in the clock request set to obtain a request type set; each clock request corresponds to a slave device one by one;
[0007] Controls the output of the clock signal based on the request type set.
[0008] In this way, on the one hand, a clock management device is used to manage and control the clock signal of the slave device, instead of relying on the host device for management and control, thereby reducing the complexity of the host device; on the other hand, according to the request type of the clock request of each slave device in the slave device cluster, the output of the clock signal is controlled, and the clock signal of the slave device is accurately controlled, thereby reducing system power consumption.
[0009] In an optional implementation, respectively determining a signal type corresponding to each clock request in the clock request set to obtain a request type set includes:
[0010] If the signal value of the first clock request is a first preset value, determining that the request type corresponding to the first clock request is a shutdown request;
[0011] If the signal value of the second clock request is the second preset value, determining that the request type corresponding to the second clock request is an open request;
[0012] A request type set is determined based on the request types corresponding to the respective clock requests.
[0013] In this way, the request type of each clock request is determined according to the signal value of the clock request, thereby determining the demand of each slave device for the clock signal.
[0014] In an optional implementation, controlling the output of the clock signal based on the request type set includes:
[0015] If there is a request type of open request in the request type set, the clock signal is output to the slave device cluster;
[0016] If all request types in the request type set are shutdown requests, the output of clock signals to the slave device cluster is stopped.
[0017] In this way, all requests in the request type set are shutdown requests, that is, all slave devices in the slave device set no longer need clock signals, and the clock signals output to the slave device cluster are turned off, thereby accurately controlling the clock signals of the slave devices.
[0018] In an optional implementation manner, if all request types in the request type set are shutdown requests, after stopping outputting the clock signal to the slave device cluster, the method further includes:
[0019] The advanced scalable channel of the host device is monitored to obtain an access status set of the host device; the host device is connected to each slave device in the slave device cluster through the advanced scalable channel and the advanced scalable interface; the access status set includes at least one access status, and at least one access status corresponds to each slave device in the slave device cluster; the access status is used to characterize the access status of the slave device corresponding to the host device;
[0020] If there is at least one target access state in the access state set, a clock signal is generated and output to the slave device cluster; the target access state is used to indicate that the host device has a request to access the slave device corresponding to the target access state;
[0021] Obtain a target clock request of a slave device corresponding to a target access state, and determine a request type of the target clock request;
[0022] If the request types of the target clock requests are all shutdown requests, the output of clock signals to the slave device cluster is stopped.
[0023] In this way, after the clock signal output to the slave device cluster is turned off, when the host device accesses one of the slave devices, a clock signal is generated and output, so that the slave device can normally respond to and process the operation instruction after receiving the operation instruction sent by the host device; at the same time, when all slave devices have processed the operation instruction and changed the request type of the clock request to a shutdown request, the clock signal output by the slave device cluster is turned off, thereby accurately controlling the clock signal output to the slave device.
[0024] In an optional implementation, stopping outputting a clock signal to a slave device cluster includes:
[0025] The enable signal corresponding to the clock signal is set to a third preset value to turn off the clock signal.
[0026] In this way, the shut-down and output of the clock signal are controlled by the enable signal corresponding to the clock signal.
[0027] In a second aspect, the present invention provides a clock control method, which is applied to a slave device, and the method comprises:
[0028] Processing the received operation instruction based on the clock signal output by the connected clock management device;
[0029] If the operation instruction is processed, the request type of the clock request is set to a shutdown request, and the clock request is sent to the clock management device; the clock request is used to instruct the clock management device to stop outputting the clock signal;
[0030] If the clock signal is not obtained, the device mode is switched to standby mode.
[0031] In this way, after the operation instruction is processed, the request type of the clock request is switched to a shutdown request, and the clock request is sent to the clock management device, so that the clock management device turns off the clock signal according to the clock request, thereby enabling the clock management device to accurately control the clock signal of the slave device; at the same time, when the slave device fails to obtain the clock signal, the device mode is switched to standby mode, thereby reducing power consumption.
[0032] In an optional embodiment, the method further includes:
[0033] In response to the received operation instruction, switching the device mode from the standby mode to the working mode;
[0034] Setting the request type of the clock request to an open request, and sending the clock request to the clock management device;
[0035] The clock signal output by the clock management device is obtained, and the operation instruction is processed based on the clock signal.
[0036] In this way, when receiving an operation instruction, the slave device switches the device mode to the working mode to respond to and process the operation instruction in a timely manner.
[0037] In a third aspect, the present invention provides a clock control device, which is applied to a clock management device, and the device includes:
[0038] A clock signal output module, used to generate a clock signal and output the clock signal to a slave device in a slave device cluster; the slave device cluster includes at least one slave device, and at least one slave device is connected to a clock management device;
[0039] A request type determination module is used to obtain a clock request set of a slave device cluster, and respectively determine the request type corresponding to each clock request in the clock request set to obtain a signal type set; each clock request corresponds to a slave device one by one;
[0040] The clock signal control module is used to control the output of the clock signal based on the request type set.
[0041] In a fourth aspect, the present invention provides a clock control device, which is applied to a slave device, and the device comprises:
[0042] An operation instruction processing module, used to process the received operation instruction based on the clock signal output by the connected clock management device;
[0043] A clock request sending module, used to set the request type of the clock request to a shutdown request if the operation instruction is processed, and send the clock request to the clock management device; the clock request is used to instruct the clock management device to stop outputting the clock signal;
[0044] The device mode switching module is used to switch the device mode to the standby mode if the clock signal is not obtained.
[0045] In a fifth aspect, the present invention provides a clock control system, comprising: a host device, a slave device cluster, and a clock management device;
[0046] The host device is connected to each slave device in the slave device cluster, and the clock management device is connected to the host device and each slave device respectively;
[0047] The clock management device is used to execute the clock control method of the first aspect or any corresponding embodiment thereof;
[0048] The slave device is used to execute the clock control method of the second aspect or any corresponding embodiment thereof.
[0049] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the clock control method of the first aspect or the second aspect or any corresponding embodiment thereof.
[0050] In a seventh aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the clock control method of the first aspect or the second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is a schematic structural diagram of a clock control system according to an embodiment of the present invention;
[0053] Figure 2 is a flow chart of a clock control method according to an embodiment of the present invention;
[0054] Figure 3 is a flow chart of another clock control method according to an embodiment of the present invention;
[0055] Figure 4 is a flow chart of another clock control method according to an embodiment of the present invention;
[0056] Figure 5 is a flow chart of a clock control method according to an embodiment of the present invention;
[0057] Figure 6 is a flow chart of another clock control method according to an embodiment of the present invention;
[0058] Figure 7 is a flowchart of a clock management device in a clock control method according to an embodiment of the present invention;
[0059] Figure 8 is a flowchart of a slave device in a clock control method according to an embodiment of the present invention.
[0060] Fig. 9 is a timing diagram of a clock control method according to an embodiment of the present invention;
[0061] Fig.10 is another timing diagram of the clock control method according to an embodiment of the present invention
[0062] Fig.11 is a structural block diagram of a clock control device according to an embodiment of the present invention;
[0063] Fig.12 is a structural block diagram of a clock control device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0065] When there are multiple master-slave devices interacting in the system, in order to reduce power consumption, the host device is often used to manage the status of each slave device, and manage its power supply or clock according to the status of the slave device. Although this method can reduce the power consumption of the integrated circuit, since the host device needs to manage the slave device, the complexity of the host device will increase, the performance will decrease, and the clock management of the slave device will not be very accurate.
[0066] Based on this, an embodiment of the present invention provides a clock control method, which is applied to a clock management device, including: generating a clock signal and outputting the clock signal to a slave device in a slave device cluster; the slave device cluster includes at least one slave device, and at least one slave device is connected to the clock management device; obtaining a clock request set of the slave device cluster, and respectively determining the request type corresponding to each clock request in the clock request set to obtain a request type set; each clock request corresponds to a slave device one-to-one; based on the request type set, controlling the output of the clock signal. In this way, on the one hand, the clock management device is used to manage and control the clock signal of the slave device, and no longer relies on the host device for management and control, thereby reducing the complexity of the host device; on the other hand, according to the request type of the clock request of each slave device in the slave device cluster, the output of the clock signal is controlled, and the clock signal of the slave device is accurately controlled, thereby reducing system power consumption.
[0067] On the other hand, an embodiment of the present invention provides a clock control method, which is applied to a slave device, including: processing a received operation instruction based on a clock signal output by a connected clock management device; if the operation instruction processing is completed, setting the request type of the clock request to a shutdown request, and sending the clock request to the clock management device; the clock request is used to instruct the clock management device to stop outputting the clock signal; if the clock signal is not obtained, switching the device mode to a standby mode. In this way, after the operation instruction processing is completed, the request type of the clock request is switched to a shutdown request, and the clock request is sent to the clock management device, so that the clock management device turns off the clock signal according to the clock request, so that the clock management device can accurately control the clock signal of the slave device; at the same time, when the slave device does not obtain the clock signal, the device mode is switched to the standby mode, thereby reducing power consumption.
[0068] Figure 1 is a schematic diagram of the structure of a clock control system according to an embodiment of the present invention. Figure 1 The clock control method provided by the embodiment of the present invention can be applied to Figure 1 In the clock control system shown in FIG. Figure 1 As shown, the clock control system includes a host device, a slave device cluster and a clock management device. The host device is connected to each slave device in the slave device cluster, and the clock management device is connected to the host device and each slave device respectively; the clock management device is used to execute the clock control method corresponding to the clock management device to control the clock signal output to the slave device; the slave device is used to execute the clock control method corresponding to the slave device to process the operation instruction based on the clock signal and feedback the clock request to the clock management device.
[0069] In an optional embodiment, if Figure 1 As shown, the clock control system may include multiple host devices and multiple slave devices. Figure 1 In the example, host device 1, host device 2 and slave device 1, slave device 2, and slave device 3 are taken. In actual applications, more or fewer host devices or slave devices may be included, and no specific limitation is made here. Host device 1 manages slave device 1 and slave device 2, and host device 2 manages slave device 3; slave device 1 only serves host device 1, slave device 3 only serves master device 3, and slave device 2 serves both host device 1 and host device 2.
[0070] In an optional implementation, the host device and the slave device are connected via a NIC (Network InterConnect) bridge, and the NIC bridge uses an AXI (Advanced eXtensible Interface) interface. The interface of the host device is an AXI master interface, and the interface of the slave device is an AXI slave interface; the host device is connected to the NIC bridge via an AXI channel.
[0071] In an optional implementation, the clock management device includes multiple ICG (Integrated Clock Gate) units and a clock control logic unit. The number of ICG units is consistent with the number of host devices, and each ICG unit manages the slave devices connected to the corresponding host device. Figure 1 For example, ICG1 controls the clock signals of slave device 1 and slave device 2, and ICG2 controls the clock signal of slave device 3.
[0072] According to an embodiment of the present invention, a clock control method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0073] In this embodiment, a clock control method is provided, which can be used in the above-mentioned clock management device. Figure 2 is a flow chart of a clock control method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0074] Step S201 : Generate a clock signal, and output the clock signal to a slave device in a slave device cluster.
[0075] In the embodiment of the present invention, the slave device cluster includes at least one slave device, and at least one slave device is connected to the clock management device. Figure 1 As shown, the slave devices in the slave device cluster are respectively connected to the ICG units corresponding to their corresponding master devices. The clock management device generates a clock signal based on the clock logic in the clock control logic unit contained therein, and then the ICG units contained therein output the clock signals to the corresponding slave devices respectively. That is, the clock control of the slave devices managed by different master devices is also independent; Figure 1For example, the clock control of slave device 1, slave device 2, and slave device 3 can be different. In fact, ICG1 outputs clock signals to slave device 1 and slave device 2, but ICG2 turns off the clock signal output to slave device 3. Therefore, the slave devices are managed separately according to the host devices corresponding to the slave devices, so as to achieve precise control of the clock signals of the slave devices.
[0076] Step S202 , obtaining a clock request set of the slave device cluster, and determining the request type corresponding to each clock request in the clock request set, to obtain a request type set.
[0077] In the embodiment of the present invention, the clock request is a request for a clock signal in a slave device, which indicates whether the current slave device requires a clock signal. Each clock request corresponds to a slave device one by one, so that it is possible to determine whether the corresponding slave device requires a clock signal according to the clock request. The clock requests of each slave device in the slave device cluster are obtained, and the request type corresponding to each clock request is determined respectively, so as to obtain a request type set.
[0078] In an optional embodiment, each ICG unit in the clock management device corresponds to a different set of slave devices, and the clock request set it obtains and the request type set finally obtained also correspond to its corresponding set of slave devices; that is, each ICG unit obtains the clock request of its corresponding slave device to obtain the corresponding request type set.
[0079] In an optional implementation, the request type of the clock request is divided into a close request and an open request. The close request indicates that the slave device corresponding to the clock request no longer requires a clock signal and needs to turn off the clock signal; the open request indicates that the slave device corresponding to the clock request requires a clock signal and needs to turn on the clock signal.
[0080] Step S203: controlling the output of the clock signal based on the request type set.
[0081] In the embodiment of the present invention, based on the request type of each clock request in the request type set, the output of the clock signal is controlled; specifically, the output of the clock signal to each slave device is controlled, and the output of the clock signal to each slave device is turned off.
[0082] In an optional implementation, if there is a request type of open request in the request type set, a clock signal is output to the slave device cluster; that is, if there is a slave device requiring a clock signal in the slave device cluster corresponding to the ICG unit, a clock signal is output to each slave device in the slave device cluster to ensure that the slave device can operate normally.
[0083] In an optional embodiment, if all request types in the request type set are shutdown requests, the clock signal is stopped from being output to the slave device cluster; that is, when all slave devices in the slave device cluster corresponding to the ICG unit no longer require the clock signal, the clock signal is stopped from being output to each slave device in the slave device cluster, so as to accurately control the clock signal while ensuring the normal operation of the slave device.
[0084] In an optional implementation, the output and shutdown of the clock signal are controlled by setting the enable signal of the clock signal. Specifically, the enable signal corresponding to the clock signal is set to a third preset value to shut down the clock signal, thereby stopping the output of the clock signal to the slave device cluster; wherein the third preset value may be a signal value corresponding to a low level. The enable signal corresponding to the clock signal is set to a fourth preset value to turn on the clock signal, thereby outputting the clock signal to the slave device cluster; wherein the fourth preset value may be a signal value corresponding to a high level.
[0085] The clock control method provided in the embodiment of the present invention, on the one hand, adopts a clock management device to manage and control the clock signal of the slave device, instead of relying on the host device for management and control, thereby reducing the complexity of the host device; on the other hand, according to the request type of the clock request of each slave device in the slave device cluster, the output of the clock signal is controlled, and the clock signal of the slave device is accurately controlled, thereby reducing system power consumption.
[0086] In this embodiment, a clock control method is provided, which can be used in the above-mentioned clock management device. Figure 3 is a flow chart of another clock control method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0087] Step S301: Generate a clock signal and output the clock signal to the slave devices in the slave device cluster. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0088] Step S302 , obtaining a clock request set of the slave device cluster, and determining the request type corresponding to each clock request in the clock request set, to obtain a request type set.
[0089] Specifically, step S302 includes:
[0090] Step S3021: If the signal value of the first clock request is the first preset value, determine that the request type corresponding to the first clock request is a shutdown request.
[0091] In the embodiment of the present invention, the first preset value is a signal value corresponding to a high level. If the signal value of the first clock request is the first preset value, it indicates that the signal corresponding to the first clock request is pulled high, and the request type corresponding to the first clock request is determined to be a shutdown request.
[0092] Step S3022: if the signal value of the second clock request is the second preset value, determining that the request type corresponding to the second clock request is an open request;
[0093] In the embodiment of the present invention, the second preset value is a signal value corresponding to a low level. If the signal value of the second clock request is the second preset value, it indicates that the signal corresponding to the second clock request is pulled low, and the request type corresponding to the second clock request is determined to be an open request.
[0094] Step S3023: Determine a request type set based on the request type corresponding to each clock request.
[0095] In the embodiment of the present invention, the request type corresponding to each clock request is determined respectively, and the request type set is determined according to the correspondence between the clock request and the request type or the correspondence between the slave device and the request type. In this way, the request type of each clock request is determined according to the signal value of the clock request, thereby determining the demand of each slave device for the clock signal.
[0096] Step S303: Based on the request type set, control the output of the clock signal. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0097] In this embodiment, a clock control method is provided, which can be used in the above-mentioned clock management device. Figure 4 is a flowchart of another clock control method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0098] Step S401: Generate a clock signal and output the clock signal to the slave devices in the slave device cluster. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.
[0099] Step S402, obtain the clock request set of the slave device cluster, and determine the request type corresponding to each clock request in the clock request set to obtain a request type set. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0100] Step S403: Based on the request type set, control the output of the clock signal. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0101] Step S404: monitor the advanced scalable channel of the host device to obtain an access status set of the host device.
[0102] In the embodiment of the present invention, if all request types in the request type set are shutdown requests, the output of the clock signal to the slave device cluster is stopped. After the output of the clock signal to the slave device cluster is stopped, the ICG unit in the clock management device monitors the Advanced eXtensible Interface (AXI) channel of its corresponding host device to determine whether the host device has access to and operation on the slave device.
[0103] In the embodiment of the present invention, Figure 1 As shown, the host device is connected to each slave device in the slave device cluster through an advanced scalable channel and an advanced scalable interface. The access state set includes at least one access state, and at least one access state corresponds to each slave device in the slave device cluster; the access state is used to characterize the access status of the slave device corresponding to the host device.
[0104] Step S405: If there is at least one target access state in the access state set, a clock signal is generated and output to the slave device cluster.
[0105] In an embodiment of the present invention, the target access state is used to characterize the existence of a request by the host device to access a slave device corresponding to the target access state. Specifically, when the host device has an access operation to a slave device, the signal value of the channel corresponding to the corresponding operation type of the slave device on the advanced scalable channel corresponding to the host device will switch to a signal value corresponding to a high level, thereby monitoring the signal values of each channel on the advanced scalable channel, and determining the access state of the host device to each slave device; correspondingly, when the signal value of a certain channel switches to a signal value corresponding to a high level, it can be determined that the access state of the slave device corresponding to the channel is the target access state. At this time, the ICG unit corresponding to the host device generates a clock signal and outputs the clock signal to the corresponding slave device cluster, so that the host device can access and operate the slave device normally.
[0106] Step S406, obtaining a target clock request of the slave device corresponding to the target access state, and determining a request type of the target clock request.
[0107] In an embodiment of the present invention, since the slave device needs to switch the request type of the clock request to an open request in order to normally obtain the clock signal, when the slave device receives the access operation of the host device, the request type of its clock request will be switched to an open request, and after the operation processing is completed, the request type of its clock request will be switched to a close request. Based on this, after outputting the clock signal to the slave device cluster, the clock request of the slave device is continuously monitored, specifically, the clock request of the slave device corresponding to the target access state is monitored, that is, the target clock request, and the request type of the target clock request is determined to determine whether the slave device has completed the operation processing and whether the clock signal is no longer required. At the same time, if there are multiple slave devices whose access state is the target access state, the target clock requests of the multiple slave devices are monitored and obtained, and their request types are determined.
[0108] Step S407: If the request types of the target clock requests are all shutdown requests, then stop outputting clock signals to the slave device cluster.
[0109] In the embodiment of the present invention, if the request types of the target clock requests are all shutdown requests, the clock signal output to the slave device cluster is stopped. In this way, after the clock signal output to the slave device cluster is shut down, when the host device accesses one of the slave devices, the clock signal is generated and output, so that the slave device can normally respond to and process the operation instruction after receiving the operation instruction sent by the host device; at the same time, when all slave devices have processed the operation instruction and changed the request type of the clock request to the shutdown request, the clock signal output by the slave device cluster is shut down, thereby accurately controlling the clock signal output to the slave device.
[0110] In this embodiment, a clock control method is provided, which can be used in the above-mentioned slave device. Figure 5 is a flow chart of a clock control method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:
[0111] Step S501: Processing a received operation instruction based on a clock signal output by a connected clock management device.
[0112] In the embodiment of the present invention, the received operation instruction is processed based on the timing corresponding to the clock signal output by the connected clock management device, wherein the operation instruction is sent by the host device connected to the slave device, and is a read operation or a write operation.
[0113] Step S502: If the operation instruction processing is completed, the request type of the clock request is set to a shutdown request, and the clock request is sent to the clock management device.
[0114] In the embodiment of the present invention, the clock request, specifically, the clock request of the request type being a shutdown request, is used to instruct the clock management device to stop outputting the clock signal. If the operation instruction is processed, it indicates that the slave device no longer needs the clock signal, so the request type of the clock request is set to a shutdown request, that is, the signal value of the clock request is switched to a signal value corresponding to a high level, and sent to the clock management device to instruct the clock management device to shut down the clock signal, thereby stopping outputting the clock signal.
[0115] Step S503: If the clock signal is not obtained, the device mode is switched to the standby mode.
[0116] In an embodiment of the present invention, if the slave device does not obtain the clock signal, it indicates that the clock management device stops outputting the clock signal. At this time, the slave device switches the device mode to the standby mode, thereby entering a low power consumption state to reduce the overall power consumption of the system.
[0117] The clock control method provided by the embodiment of the present invention switches the request type of the clock request to a shutdown request after the operation instruction processing is completed, and sends the clock request to the clock management device, so that the clock management device shuts down the clock signal according to the clock request, thereby enabling the clock management device to accurately control the clock signal of the slave device; at the same time, the slave device switches the device mode to standby mode when the clock signal is not obtained, thereby reducing power consumption.
[0118] In this embodiment, a clock control method is provided, which can be used in the above-mentioned slave device. Figure 6 is a flow chart of another clock control method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0119] Step S601: Process the received operation instruction based on the clock signal output by the connected clock management device. Figure 5 Step S501 of the illustrated embodiment will not be described in detail here.
[0120] Step S602: If the operation instruction is processed, the request type of the clock request is set to a shutdown request, and the clock request is sent to the clock management device. Figure 5 Step S502 of the illustrated embodiment will not be described in detail here.
[0121] Step S603: If the clock signal is not obtained, the device mode is switched to standby mode. Figure 6 Step S503 of the illustrated embodiment will not be described in detail here.
[0122] Step S604: In response to the received operation instruction, the device mode is switched from the standby mode to the working mode.
[0123] In the embodiment of the present invention, the slave device switches the device mode from the standby mode to the working mode in response to the received operation instruction, so as to enter the working state.
[0124] Step S605: Set the request type of the clock request to an open request, and send the clock request to the clock management device.
[0125] In an embodiment of the present invention, since the request type of the clock request is set to an open request, the clock signal output by the clock management device will be valid. Therefore, the request type of the clock request is set to an open request, and the clock request is sent to the clock management device to ensure that the clock signal can be obtained to process the operation instruction.
[0126] Step S606: Acquire a clock signal output by the clock management device, and process the operation instruction based on the clock signal.
[0127] In an embodiment of the present invention, a received operation instruction is processed based on the timing corresponding to the clock signal output by the connected clock management device. The operation instruction is sent by the host device connected to the slave device, and is a read operation or a write operation. Therefore, when the slave device receives the operation instruction, it switches the device mode to the working mode to respond to and process the operation instruction in a timely manner.
[0128] In an optional embodiment, after the operation instruction processing is completed, the above steps S601-S603 are repeated. On the one hand, the slave device enters the standby state again to reduce the overall power consumption of the system. On the other hand, the request type of the clock request is switched to a shutdown request, and the clock request is sent to the clock management device, so that the clock management device shuts down the clock signal according to the clock request, thereby enabling the clock management device to accurately control the clock signal of the slave device.
[0129] In the embodiment of the present invention, as described in the above embodiment, the control of the clock signal is actually completed by the cooperation of the clock management device and the slave device. Figure 7 is a flowchart of a clock management device in a clock control method according to an embodiment of the present invention, Figure 8 is a flowchart of a slave device in a clock control method according to an embodiment of the present invention. Figure 7 and Figure 8 The process of the clock signal control method according to the embodiment of the present invention is further described.
[0130] like Figure 7As shown, from the perspective of the clock management device: the slave device will adjust the request signal req of its corresponding clock request according to its working state. Specifically, when the slave device has an operation instruction to be processed and is in working mode, the request signal req of its corresponding clock request is at a low level; when the slave device has no operation instruction to be processed and is in standby mode, the request signal req of its corresponding clock request is at a high level. The ICG unit in the clock management device will monitor and process the request signal req, and when the request signals req of all slave devices connected to it are low, the clock signal will be turned off and the clock signal will stop being output to the slave device. After that, the clock management device continuously monitors the AXI channel, and when it receives the information of the AXI and determines that there is a target access state, it recovers the clock and outputs the clock signal to the slave device; at this time, the slave device obtains the clock signal, receives the operation instruction to enter the working state, and pulls down the request signal req of the corresponding clock request.
[0131] like Figure 8 As shown, from the perspective of the slave device: after completing all operation instructions, the slave device pulls up the request signal req of the corresponding clock request, and the clock of the slave device is turned off. Specifically, the slave device does not obtain the clock signal, or obtains the clock signal, but the clock signal is invalid because the request signal req is pulled high. The device mode of the slave device switches to standby mode and enters a low-power state. When the slave device obtains the clock signal again and detects that there is a new operation instruction from the host device on its corresponding AXI channel, the device mode of the slave device switches to working mode and enters the working state. At this time, the request signal req of the corresponding clock request is pulled low, and the operation instruction is executed.
[0132] In an optional embodiment, if Figure 1 As shown, the clock management device may include a plurality of ICG units corresponding to the host devices one by one, and each ICG unit manages the clock signal of the slave device connected to its corresponding host device. Figure 1 In the figure, slave device 2 is connected to host device 1 and host device 2 respectively, and serves host device 1 and host device 2 at the same time; and the ICG unit corresponding to slave device 2 is ICG1 corresponding to host device 1, that is, although slave device 2 serves host device 1 and host device 2 at the same time, its clock signal is only managed by the ICG unit corresponding to host device 1.
[0133] In an optional implementation, for a slave device serving multiple host devices at the same time, it can also be connected to the ICG units corresponding to the multiple host devices at the same time, and the clock signal thereof is jointly controlled by the multiple ICG units.
[0134] In an optional implementation, for a slave device that serves multiple host devices at the same time, its clock signal can be controlled by the ICG unit corresponding to the host device that first accessed the slave device. When a host device accesses the slave device, the ICG unit corresponding to the host device outputs a clock signal; and if the first host device accesses the slave device, another subsequent host device also needs to access the slave device, at this time, the ICG unit corresponding to the other subsequent host device detects that the request type of the clock request of the slave device is an open request, then the clock signal of the slave device is not controlled, that is, the original ICG unit continues to output the clock signal to the slave device, and after the slave device completes the operation instruction of the other subsequent host device, the request type of its clock request is switched to a close request, instructing the original ICG unit to close the clock signal, thereby simplifying the control of the clock signal while ensuring the accuracy of the clock signal control.
[0135] In an optional implementation, for a slave device that serves multiple host devices at the same time, the ICG unit corresponding to the host device accessing the slave device can control its clock signal in sequence according to the access order. When a host device accesses the slave device, the ICG unit corresponding to the host device outputs a clock signal; and if the previous host device accesses the slave device, another subsequent host device also needs to access the slave device. At this time, the ICG unit corresponding to the other subsequent host device detects that the request type of the clock request of the slave device is an open request, and then the clock signal of the slave device is not controlled, that is, the original ICG unit continues to output the clock signal to the slave device, waiting for the slave device to complete the operation instruction of the previous host device, and switches the request type of the clock request to a close request. At this time, the original ICG unit turns off the clock signal. After the slave device switches the request type of the clock request to a close request, the ICG unit corresponding to the subsequent host device outputs the clock signal to the slave device again. Therefore, different clock signals are output according to different host devices, so that the clock signal obtained by the slave device corresponds to the host device, so as to ensure the correct execution and processing of the operation tasks of the host device when different host devices adopt different timing logics.
[0136] In an optional embodiment, if Figure 1 As shown in FIG. 1 , the number of slave devices connected to each host device is different, so the number of slave devices managed by the ICG unit is also different. Figure 1 For example, ICG2 only manages the clock signal of slave device 3, and ICG1 manages the clock signals of slave devices 1 and 2; the following is for these two cases, namely, the ICG unit only manages the clock signal of one slave device, and the ICG unit manages the clock signals of multiple slave devices.
[0137] In an optional embodiment, Fig. 9 is a timing diagram of a clock control method according to an embodiment of the present invention, Fig. 9 1 shows a timing diagram when the ICG unit manages the clock signal of only one slave device. Fig. 9 As shown, req corresponds to the request signal of the clock request of the slave device, clk is the clock signal, arvalid is the status signal of the AXI read channel of the host device, and arredy is the reply signal of the slave device to the host device. The request signal req sent by the slave device is low level. At this time, the slave device requires the clock signal, and the clock signal cannot be turned off. When the slave device completes all operation instructions, the slave device sets the request signal req to a high level, which means that the clock signal of the slave device can be turned off at this time. The ICG unit monitors that the request signal req sent by the slave device is set to a high level, and at this time the AXI channel has no operation on the address corresponding to the slave device, so the clock signal is turned off, and only the status of the AXI channel is monitored. When the ICG unit detects that a read and write operation is initiated on the AXI channel to the slave device, such as a read operation, that is, the arvalid signal of the AXI read channel, the ICG unit restores the clock signal of the slave device. After the clock signal is restored, the slave device can reply to the signal of the AXI channel, return the reply signal arredy to the host device, and enter the working mode at the same time. At this time, the request signal req is also restored to a low level. In an optional embodiment, Fig.10 is another timing diagram of the clock control method according to an embodiment of the present invention, Fig.10 1 shows a timing diagram when the ICG unit manages the clock signals of multiple slave devices. Fig.10As shown, req1 corresponds to the request signal of the clock request of slave device 1, req2 corresponds to the request signal of the clock request of slave device 2, clk is the clock signal, arvalid1 is the status signal of the AXI read channel of the host device to slave device 1, and arvalid2 is the status signal of the AXI read channel of the host device to slave device 2. At T0, the clock signal is generated, and both slave device 1 and slave device 2 are in working state. At T1, slave device 1 is ready to enter the standby mode, so slave device 1 sets its request signal req1 to a high level and applies to turn off the input clock signal. From T1, the request signal req1 of slave device 1 is a high level, but the request signal req2 of slave device 2 is still a low level. At this stage, slave device 2 does not allow the clock signal to be turned off, so the ICG unit is still outputting the clock signal. At T2, the request signal req2 of slave device 2 is also set to a high level. At this time, both slave devices apply to turn off the clock signal, so the ICG unit turns off the clock signal. At time T3, the host device wants to access slave device 2, so arvalid2 on the AXI channel is pulled high; after the ICG unit monitors the pulled-up arvalid2 signal, it re-outputs the clock signal at time T4, after which slave device 2 sets the request signal req2 to a low level and enters the working state. At this time, the request signal req1 of slave device 1 is always set to a high level. When slave device 2 sets the request signal req2 to a high level again after the work is completed, the clock signal will be turned off.
[0138] In the present embodiment, a clock control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0139] This embodiment provides a clock control device, which is applied to a clock management device, such as Fig.11 As shown, the device comprises:
[0140] The clock signal output module 1101 is used to generate a clock signal and output the clock signal to a slave device in a slave device cluster; the slave device cluster includes at least one slave device, and at least one slave device is connected to a clock management device;
[0141] The request type determination module 1102 is used to obtain a clock request set of a slave device cluster, and respectively determine the request type corresponding to each clock request in the clock request set to obtain a signal type set; each clock request corresponds to a slave device one by one;
[0142] The clock signal control module 1103 is used to control the output of the clock signal based on the request type set.
[0143] In an optional implementation, the request type determination module 1102 includes:
[0144] A shutdown request determining unit, configured to determine that the request type corresponding to the first clock request is a shutdown request if the signal value of the first clock request is a first preset value;
[0145] an opening request determining unit, configured to determine, if the signal value of the second clock request is a second preset value, that the request type corresponding to the second clock request is an opening request;
[0146] The request type set determining unit is used to determine a request type set based on the request type corresponding to each clock request.
[0147] In an optional implementation, the clock signal control module 1103 includes:
[0148] A clock signal output unit, used for outputting a clock signal to the slave device cluster if a request type in the request type set is an open request;
[0149] The clock signal closing unit is used to stop outputting the clock signal to the slave device cluster if all request types in the request type set are closing requests.
[0150] In an optional embodiment, the device further includes:
[0151] The access status determination module is used to monitor the advanced scalable channel of the host device to obtain the access status set of the host device; the host device is connected to each slave device in the slave device cluster through the advanced scalable channel and the advanced scalable interface; the access status set includes at least one access status, and at least one access status corresponds to each slave device in the slave device cluster; the access status is used to characterize the access status of the slave device corresponding to the host device;
[0152] The clock signal output module 1101 is further used to generate a clock signal and output the clock signal to the slave device cluster if there is at least one target access state in the access state set; the target access state is used to indicate that the host device has a request to access the slave device corresponding to the target access state;
[0153] The request type determination module 1102 is further used to obtain a target clock request of a slave device corresponding to the target access state, and determine a request type of the target clock request;
[0154] The clock signal control module 1103 is further configured to stop outputting the clock signal to the slave device cluster if the request types of the target clock requests are all shutdown requests.
[0155] In an optional implementation, the stop clock signal control module 1103 includes:
[0156] The enable signal setting unit is used to set the enable signal corresponding to the clock signal to a third preset value to turn off the clock signal.
[0157] This embodiment provides a clock control device, which is applied to a slave device, such as Fig.12 As shown, the device comprises:
[0158] An operation instruction processing module 1201, configured to process a received operation instruction based on a clock signal output by a connected clock management device;
[0159] The clock request sending module 1202 is used to set the request type of the clock request to a shutdown request if the operation instruction processing is completed, and send the clock request to the clock management device; the clock request is used to instruct the clock management device to stop outputting the clock signal;
[0160] The device mode switching module 1203 is used to switch the device mode to the standby mode if the clock signal is not obtained.
[0161] In an optional embodiment, the device further includes:
[0162] The device mode switching module 1203 is further used to switch the device mode from the standby mode to the working mode in response to the received operation instruction;
[0163] The clock request sending module 1202 is further used to set the request type of the clock request to an open request, and send the clock request to the clock management device;
[0164] The operation instruction processing module 1201 is also used to obtain the clock signal output by the clock management device and process the operation instruction based on the clock signal.
[0165] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0166] The clock control device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0167] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0168] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0169] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the present invention.
Claims
1. A clock control method, characterized in that: Applied to a clock management device, the method comprises: Generate a clock signal, and output the clock signal to a slave device in a slave device cluster; the slave device cluster includes at least one slave device, and at least one of the slave devices is connected to the clock management device; Acquire a clock request set of the slave device cluster, and respectively determine a request type corresponding to each clock request in the clock request set to obtain a request type set; each of the clock requests corresponds to the slave device one by one; Based on the set of request types, output of the clock signal is controlled.
2. The method according to claim 1, characterized in that The respectively determining the signal type corresponding to each clock request in the clock request set to obtain a request type set includes: If the signal value of the first clock request is a first preset value, determining that the request type corresponding to the first clock request is a shutdown request; If the signal value of the second clock request is a second preset value, determining that the request type corresponding to the second clock request is an open request; The request type set is determined based on the request type corresponding to each of the clock requests.
3. The method according to claim 1, characterized in that The controlling the output of the clock signal based on the request type set includes: If there is a request type of open request in the request type set, outputting the clock signal to the slave device cluster; If all request types in the request type set are shutdown requests, outputting the clock signal to the slave device cluster is stopped.
4. The method according to claim 3, characterized in that If all request types in the request type set are shutdown requests, after stopping outputting the clock signal to the slave device cluster, the method further includes: The high-level scalable channel of the host device is monitored to obtain an access status set of the host device; the host device is connected to each of the slave devices in the slave device cluster through the high-level scalable channel and the high-level scalable interface; the access status set includes at least one access status, and the at least one access status corresponds to each of the slave devices in the slave device cluster; the access status is used to characterize the access status of the slave device corresponding to the host device; If there is at least one target access state in the access state set, the clock signal is generated and output to the slave device cluster; the target access state is used to indicate that the host device has a request to access the slave device corresponding to the target access state; Acquire a target clock request of a slave device corresponding to the target access state, and determine a request type of the target clock request; If the request types of the target clock requests are all the shutdown requests, outputting the clock signal to the slave device cluster is stopped.
5. The method according to claim 3 or 4, characterized in that: The stopping of outputting the clock signal to the slave device cluster includes: The enable signal corresponding to the clock signal is set to a third preset value to turn off the clock signal.
6. A clock control method, characterized in that: Applied in a slave device, the method includes: Processing the received operation instruction based on the clock signal output by the connected clock management device; If the operation instruction is processed, the request type of the clock request is set to a shutdown request, and the clock request is sent to the clock management device; the clock request is used to instruct the clock management device to stop outputting the clock signal; If the clock signal is not obtained, the device mode is switched to the standby mode.
7. The method according to claim 6, characterized in that The method further comprises: In response to the received operation instruction, switching the device mode from the standby mode to the working mode; Setting the request type of the clock request to an open request, and sending the clock request to the clock management device; The clock signal output by the clock management device is acquired, and the operation instruction is processed based on the clock signal.
8. A clock control device, characterized in that: Applied in a clock management device, the device comprises: A clock signal output module, used to generate a clock signal and output the clock signal to a slave device in a slave device cluster; the slave device cluster includes at least one slave device, and at least one of the slave devices is connected to the clock management device; A request type determination module, used to obtain a clock request set of the slave device cluster, and respectively determine the request type corresponding to each clock request in the clock request set to obtain a signal type set; each of the clock requests corresponds to the slave device one by one; A clock signal control module is used to control the output of the clock signal based on the request type set.
9. A clock control device, characterized in that: Applied in a slave device, the device comprises: An operation instruction processing module, used to process the received operation instruction based on the clock signal output by the connected clock management device; A clock request sending module, configured to set the request type of the clock request to a shutdown request and send the clock request to the clock management device if the operation instruction is processed. The clock request is used to instruct the clock management device to stop outputting the clock signal. The device mode switching module is used to switch the device mode to the standby mode if the clock signal is not obtained.
10. A clock control system, characterized in that: include: Master device, slave device cluster and clock management device; The host device is connected to each slave device in the slave device cluster, and the clock management device is connected to the host device and each slave device respectively; The clock management device is used to execute the clock control method according to any one of claims 1 to 5; The slave device is used to execute the clock control method described in any one of claims 6-7.
Citation Information
Patent Citations
Method for reducing dynamic power dissipation and electronic device
CN102439535A
Clock control method for slaves and baseband chip
CN103092803A
System on chip and transaction processing
CN114595188A
Microcontroller and electronic equipment
CN117148954A
Signal transmission method and device in slave management, equipment and storage medium
CN118034951A