Front-end circuit of processor, processor, board card device and electronic equipment

By introducing a programmable automatic polling module into the processor and using on-chip access to obtain power status sampling data, the problem of long serial bus access is solved and the performance and efficiency of dynamic management of power consumption frequency are improved.

CN118626421AActive Publication Date: 2024-09-10北京壁仞科技开发有限公司 +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411080296.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-09-10
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

In the dynamic management of power consumption and frequency of existing processors, the serial bus access operation takes a long time, resulting in frequent long interruptions and reducing management performance.

Method used

Introducing a programmable automatic polling module to obtain power status sampling data through on-chip access within the processor, reducing dependence on the serial bus and reducing interruption duration.

Benefits of technology

The management performance of dynamic management of power consumption and frequency is improved, the interruption duration is reduced, and the efficiency of the processor is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626421A
    Figure CN118626421A
Patent Text Reader

Abstract

The invention relates to a front-end circuit of a processor, the processor, a board card device and electronic equipment. Based on the application, a front-end circuit of the processor can comprise a programmable automatic polling module, the programmable automatic polling module can replace a chip management module to drive a serial bus controller, the programmable automatic polling module can also store acquired power supply state sampling data, and in addition, the programmable automatic polling module can drive the serial bus controller through the chip management module. In the power consumption frequency dynamic management process, the chip management module can periodically obtain at least two target sampling data in the power state sampling data from the programmable automatic polling module. The chip management module acquires the at least two target sampling data based on the on-chip access of the processor, and the time consumption of the on-chip access is far shorter than the time consumption of the access operation based on the serial bus, so that the management performance of power consumption frequency dynamic management is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a power consumption frequency dynamic management technology, and in particular to a front-end circuit of a processor, a processor, a board device, and an electronic device. Background Art

[0002] Dynamic Voltage and Frequency Scaling (DVFS) is a processor technology used to balance performance and energy consumption by adjusting the voltage and operating frequency of the processor.

[0003] In the front-end circuit of a processor supporting dynamic management of power consumption and frequency, a chip management module may be included. A power sampling component for sampling various power states may be provided in the board where the processor is located. The power state sampling data sampled by the power sampling component may include at least two target sampling data respectively used to characterize different power states. In addition, the chip management module may implement dynamic management of power consumption and frequency of the processor based on the power state sampling data periodically obtained from the power sampling component.

[0004] Generally, the chip management module needs to drive the serial bus controller to perform serial bus-based access operations on the power sampling component, and obtain at least two target sampling data in the power state sampling data from the power sampling component one by one through multiple serial bus-based access operations. Since the access operation through the serial bus takes a long time, the chip management module will frequently have long interruptions waiting for the access operation to be completed during the period of implementing power consumption frequency dynamic management on the processor due to obtaining power state sampling data. Therefore, the long interruptions mentioned above that frequently occur during the power consumption frequency dynamic management process will result in low management performance of power consumption frequency dynamic management.

[0005] As can be seen from the above, how to improve the management performance of dynamic management of power consumption and frequency has become a technical problem to be solved in related technologies. Summary of the invention

[0006] Embodiments of the present application provide a front-end circuit of a processor, a processor, a board device, and an electronic device, which help to improve the management performance of dynamic management of power consumption and frequency.

[0007] In one embodiment of the present application, a front-end circuit of a processor is provided, comprising: A chip management module, used to implement dynamic management of the power consumption frequency of the processor according to periodically acquired power state sampling data, wherein the power state sampling data includes at least two target sampling data; A serial bus controller, used to connect to a power sampling component via a serial bus, wherein the power sampling component is used to sample at least two target sampling data; A programmable automatic polling module, used to drive the serial bus controller to poll the power sampling component to obtain at least two target sampling data, and to save the at least two target sampling data obtained by polling; The chip management module is configured to periodically acquire the power state sampling data by periodically acquiring at least two target sampling data stored in the programmable automatic polling module through on-chip access inside the processor.

[0008] In some examples, optionally, the driving of the serial bus controller by the programmable automatic polling module is configured by the chip management module, and at least two of the target sampling data acquired by polling are determined based on the configuration of the programmable automatic polling module by the chip management module.

[0009] In some examples, optionally, the programmable automatic polling module is also used to save the operation instruction set generated by the chip management module; the programmable automatic polling module is configured to: poll multiple access operation instructions in the operation instruction set, and sequentially send the multiple access operation instructions to the serial bus controller, so that the serial bus controller performs an access operation for polling the power sampling component to obtain at least two of the target sampling data according to the multiple access operation instructions received sequentially.

[0010] In some examples, optionally, the access destination address of the access operation instruction includes the device bus address of any one of the power sampling devices in the power sampling component, and the device bus addresses included in the access destination addresses of multiple access operation instructions are not all the same, so that the access operation switches between different power sampling devices in the power sampling component, and polls different power sampling devices in the power sampling component to obtain at least two of the target sampling data.

[0011] In some examples, optionally, the multiple access operation instructions include a write operation instruction whose access operation type is a write operation, and a read operation instruction whose access operation type is a read operation, the write operation is used to write sampling configuration data associated with the target sampling data to any one of the power sampling devices in the power sampling component, the sampling configuration data is provided by the chip management module, and the read operation is used to read the target sampling data from any one of the power sampling devices in the power sampling component.

[0012] In some examples, optionally, each of the multiple access operation instructions includes a data transmission length, and the data transmission length is used to indicate the length of data transmitted using the serial bus during a single access operation in which the serial bus controller responds to any one of the access operation instructions.

[0013] In some examples, optionally, the programmable automatic polling module's polling access to the plurality of access operation instructions is configured as follows: in response to the existence of a successfully polled access operation instruction and the current state of the serial bus controller being available, sending the currently successfully polled access operation instruction to the serial bus controller; and, in response to the serial bus controller completing the access operation corresponding to a currently received access operation instruction, polling the next access operation instruction.

[0014] In some examples, optionally, the programmable automatic polling module includes a register group, and the register group is used to save the multiple access operation instructions written by the chip management module and at least two target sampling data obtained by the serial bus controller through the access operation polling; the programmable automatic polling module also includes an automatic polling controller, and the automatic polling controller is used to: sequentially send the multiple access operation instructions saved in the register group to the serial bus controller through polling access to the register group; and write at least two target sampling data obtained by the serial bus controller through the access operation polling into the register group; wherein the periodic acquisition of the power status sampling data by the chip management module is configured to: periodically acquire at least two target sampling data saved in the register group through the on-chip access.

[0015] In some examples, optionally, the registers in the register group are MMIO registers.

[0016] In some examples, optionally, the register group includes an instruction register group and a data register group, a plurality of the access operation instructions are stored in the instruction register group, and at least two of the target sampling data are stored in the data register group.

[0017] In some examples, optionally, the polling access of the automatic polling controller to the register group is controlled by a finite state machine, and the polling access of the automatic polling controller to the register group is controlled based on the state switching of the finite state machine as follows: in response to a successful query of the access operation instruction at the current polling position in the register group and the current state of the serial bus controller being available, the access operation instruction of the current polling position in the register group is sent to the serial bus controller; and, in response to the serial bus controller completing the access operation corresponding to a currently received access operation instruction, the current polling position in the register group is updated according to the address offset used by the chip management module when writing multiple access operation instructions in the register group.

[0018] In some examples, optionally, the finite state machine includes the following states: an idle state, a bus check state, a destination address configuration state, an operation control state, and an operation waiting state; when the finite state machine is in the idle state, the automatic polling controller queries the access operation instruction at the current polling position in the register group, and, in response to the successful query of the access operation instruction at the current polling position in the register group, the finite state machine migrates from the idle state to the bus check state; when the finite state machine is in the bus check state, the automatic polling controller checks whether the current state of the serial bus controller is available and whether the access destination address of the serial bus controller needs to be updated, and, in response to the current state of the serial bus controller being available and the access destination address not needing to be updated, the finite state machine migrates from the bus check state to the operation control state, or, in response to the current state of the serial bus controller being available and the access destination address needing to be updated, the finite state machine migrates from the bus check state to the destination address configuration state. state; when the finite state machine is in the destination address configuration state, the automatic polling controller updates the access destination address of the serial bus controller according to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the update of the access destination address, the finite state machine migrates from the destination address configuration state to the operation control state; when the finite state machine is in the operation control state, the automatic polling controller triggers the serial bus controller to execute the access operation corresponding to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the triggering of the access operation, the finite state machine migrates from the operation control state to the operation waiting state; when the finite state machine is in the operation waiting state, the automatic polling controller waits for the serial bus controller to complete the access operation corresponding to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the execution of the access operation, the finite state machine migrates from the operation waiting state to the idle state and triggers the update of the current polling position in the register group.

[0019] In some examples, optionally, the automatic polling controller's check on whether the current state of the serial bus controller is available includes: checking whether the current working state of the serial bus controller is idle, and whether the controller cache of the serial bus controller is empty, wherein if the current working state of the serial bus controller is idle and the controller cache is currently empty, it indicates that the current state of the serial bus controller is available, otherwise it indicates that the current state of the serial bus controller is unavailable.

[0020] In some examples, optionally, the access destination address of the access operation instruction includes the device bus address of any one of the power sampling devices in the power sampling component, the device bus addresses included in the access destination addresses of multiple access operation instructions are not all the same, and the automatic polling controller checks whether the access destination address of the serial bus controller needs to be updated, including: checking whether the device bus address indicated by the access operation instruction queried at the current polling position in the register group is the same as the device bus address included in the access destination address when the serial bus controller last performed an access operation, wherein if they are the same, it indicates that the access destination address does not need to be updated, otherwise it indicates that the access destination address needs to be updated.

[0021] In some examples, optionally, the multiple access operation instructions include a write operation instruction whose access operation type is a write operation, and a read operation instruction whose access operation type is a read operation, the write operation is used to write sampling configuration data associated with the target sampling data to any power sampling device in the power sampling component, and the read operation is used to read the target sampling data from any power sampling device in the power sampling component; the operation control state includes a write operation control state and a read operation control state, and the operation wait state includes a write operation wait state and a read operation wait state; when the finite state machine is in the total When the finite state machine is in the line check state or the destination address configuration state, the automatic polling controller also queries the access operation type of the access operation instruction at the current polling position in the register group, and selectively migrates to the operation control state, the write operation control state or the read operation control state; when the finite state machine is in the write operation control state, the automatic polling controller triggers the serial bus controller to execute the write operation corresponding to the access operation instruction successfully queried at the current polling position, and writes the sampling configuration data into the controller cache of the serial bus controller, and, in response to the completion of the triggering of the write operation, the finite state machine is reset from the write operation control state to the read operation control state. The operation control state migrates to the write operation waiting state; when the finite state machine is in the write operation waiting state, the automatic polling controller waits for the serial bus controller to complete the write operation of the sampling configuration data, and, in response to the completion of the write operation of the sampling configuration data, the finite state machine migrates from the write operation waiting state to the idle state and triggers the update of the current polling position in the register group; when the finite state machine is in the read operation control state, the automatic polling controller triggers the serial bus controller to execute the read operation corresponding to the access operation instruction successfully queried at the current polling position, and In response to the completion of the triggering of the read operation, the finite state machine migrates from the read operation control state to the read operation waiting state; when the finite state machine is in the read operation waiting state, the automatic polling controller waits for the serial bus controller to complete the read operation of the target sampling data, and, in response to the completion of the read operation of the target sampling data, the automatic polling controller writes the target sampling data stored in the controller cache of the serial bus controller into the register component, and the finite state machine migrates from the read operation waiting state to the idle state and triggers the update of the current polling position in the register group.

[0022] In another embodiment of the present application, a processor is provided, comprising the front-end circuit as described in the above embodiment.

[0023] In another embodiment of the present application, a board device is provided, including a circuit board, a processor as described in the above embodiment, and the power sampling component, and the processor and the power sampling component are both deployed on the circuit board.

[0024] In another embodiment of the present application, an electronic device is provided, comprising the board device as described in the above embodiment.

[0025] Based on the above-mentioned embodiments of the present application, the front-end circuit of the processor may include a programmable automatic polling module, which may replace the chip management module to drive the serial bus controller, and the programmable automatic programming module may also save the acquired power state sampling data, and the chip management module may periodically acquire at least two target sampling data in the power state sampling data from the programmable automatic polling module during the dynamic management of power consumption frequency. Since the acquisition of at least two target sampling data by the chip management module is based on the on-chip access of the processor, and the time taken for the on-chip access is much shorter than the time taken for the access operation based on the serial bus, the interruption time caused by the chip management module acquiring the power state sampling data can be greatly reduced, thereby helping to improve the management performance of the dynamic management of power consumption frequency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The following drawings are only used to illustrate and explain the present application, and do not limit the scope of the present application: Figure 1 is a schematic diagram of an exemplary structure of a front-end circuit of a processor in an embodiment of the present application; Figure 2 is an exemplary structural diagram of a programmable automatic polling module of a front-end circuit in an embodiment of the present application; Figure 3 A schematic diagram showing the principle of obtaining power state sampling data for a front-end circuit in an embodiment of the present application; Figure 4 A schematic diagram of the timing of obtaining power state sampling data for the front-end circuit in an embodiment of the present application; Figure 5 is a timing diagram for obtaining power state sampling data in a comparative example; Figure 6 A schematic diagram of the configuration principle of a programmable automatic polling module of a front-end circuit in an embodiment of the present application; Figure 7 A state transition principle diagram of a finite state machine maintained by a programmable automatic polling module of a front-end circuit in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples.

[0028] Figure 1 Schematic diagram of the front-end circuit of the processor in the embodiment of the present application. Figure 1 In an embodiment of the present application, the front-end circuit 95 of the processor 90 may include a chip management module 10 , a serial bus controller 20 , and a programmable auto polling module (PAPM) 30 .

[0029] In an embodiment of the present application, the chip management module 10 may include an MPU (Micro-Processing Unit) in the front-end circuit 95, and the chip management module 10 may be used to implement dynamic management of the power consumption frequency of the processor 90 based on periodically acquired power status sampling data, wherein the power status sampling data may include at least two target sampling data Data_1~Data_n, where n is a positive integer greater than or equal to 2.

[0030] Exemplarily, in an embodiment of the present application, at least two target sampling data Data_1~Data_n in the power state sampling data may include but are not limited to at least two of the following: at least one of the power consumption state sampling data, current state sampling data, voltage state sampling data and temperature state sampling data of the board power supply (Board power), at least one of the power consumption state sampling data, current state sampling data, voltage state sampling data and temperature state sampling data of the power rail (Power rail), and the power consumption state sampling data and temperature state sampling data of high power consumption components such as a virtual machine (Virtualization Machine, VM) core processor.

[0031] In an embodiment of the present application, the serial bus controller 20 can support any bus for data transmission based on a serial protocol, such as I2C (Inter-Integrated Circuit), and the serial bus controller (such as an I2C bus controller) 20 can be used to connect a power sampling component 50 through a serial bus (such as an I2C bus), wherein the power sampling component 50 is located outside the chip of the processor 90, and the power sampling component 50 may include at least one power sampling device deployed at a pre-selected sampling position in the board device where the processor 90 is located, and the power sampling component 50 (that is, at least one power sampling device) can be used to sample at least two target sampling data Data_1~Data_n in the power status sampling data.

[0032] Exemplarily, in an embodiment of the present application, the power sampling component 50 may include at least one of a power sensor (PowerSensor), a temperature sensor (Temperature Sensing, TS) and a PMIC (Power Management Integrated Circuit). The sampling object of the power sensor may include sampling data related to at least one of power consumption, current and voltage, and the target sampling data obtained by the power sensor through sampling may include at least one of power consumption state sampling data, current state sampling data and voltage state sampling data; the sampling object of the temperature sensor may include sampling data related to temperature, and the target sampling data obtained by the temperature sensor through sampling may include temperature state sampling data; the sampling object of the PMIC may include sampling data related to at least one of power consumption, current, voltage and temperature, and the target sampling data obtained by the PMIC through sampling may include at least one of power consumption state sampling data, current state sampling data, voltage state sampling data and temperature state sampling data.

[0033] That is, in the embodiment of the present application, the various state sampling data corresponding to the board-level power supply, power rail and high-power consumption components in the power state sampling data (i.e., at least two target sampling data Data_1~Data_n) can be obtained by sampling at least one of the power sensor, temperature sensor and PMIC, and the embodiment of the present application does not impose unnecessary restrictions on this. It can be understood that the above examples are only to reflect the diverse selection of the power sampling component 50, and are not intended to limit the specific composition of the power sampling component 50.

[0034] In an embodiment of the present application, the programmable automatic polling module 30 may be set in the front-end circuit 95 by hardware programming, and the programmable automatic polling module 30 may be used for: The serial bus controller 20 is driven to poll and obtain at least two target sampling data Data_1 to Data_n from the power sampling component 50, that is, the at least two target sampling data Data_1 to Data_n sampled by the power sampling component 50 are polled and obtained; and, The serial bus controller 20 saves at least two target sampled data Data_1 -Data_n obtained by polling from the power sampling component 50 , that is, the at least two target sampled data Data_1 -Data_n sampled by the power sampling component 50 can be polled and obtained and saved in the programmable automatic polling module 30 .

[0035] That is, in the embodiment of the present application, the programmable automatic polling module 30 may be located between the chip management module 10 and the serial bus controller 20 , and the programmable automatic polling module 30 may replace the chip management module 10 to drive the serial bus controller 20 .

[0036] Figure 2 FIG. 1 is an exemplary structural diagram of a programmable automatic polling module of a front-end circuit in an embodiment of the present application. Figure 2 As shown, exemplarily, in an embodiment of the present application, the programmable automatic polling module 30 may include a register group 31 and an automatic polling controller (Auto Polling Controller) 32. The automatic polling controller 32 may be used to drive the serial bus controller 20 to poll and obtain at least two target sampling data Data_1~Data_n from the power sampling component 50, and write the at least two target sampling data Data_1~Data_n obtained by driving the serial bus controller 20 to poll into the register group 31; and the register group 31 may be used to store the at least two target sampling data Data_1~Data_n obtained by the serial bus controller 20 through polling.

[0037] Exemplarily, the register group 31 may include MMIO (Memory-Mapped I / O) registers, that is, the registers in the register group 31 may be MMIO registers. The access address of the MMIO register may be mapped in the memory address space of the chip management module 10. Therefore, the chip management module 10 reads and writes the MMIO register (i.e., the register group 31 of the programmable automatic polling module 30) in the same manner as the memory to avoid I / O interruption caused by accessing the MMIO register (i.e., the register group 31 of the programmable automatic polling module 30).

[0038] For example, in the embodiment of the present application, the programmable automatic polling module 30 drives the serial bus controller 20 to poll at least two target sampled data Data_1 to Data_n, which can be continuous polling, for example, continuous polling during the period when the programmable automatic polling module 30 is enabled by the chip management module 10. That is, the programmable automatic polling module 30 can drive the serial bus controller 20 to poll cyclically (for example, cyclically during the period when the programmable automatic polling module 30 is enabled by the chip management module 10) to obtain at least two target sampled data Data_1 to Data_n.

[0039] In this case, after the programmable automatic polling module 30 (for example, the automatic polling controller 32) drives the serial bus controller 20 to poll for the first time to obtain at least two target sampling data Data_1~Data_n, the programmable automatic polling module 30 can start to continuously save (for example, continuously save in the register group 31) at least two target sampling data Data_1~Data_n, and any target sampling data Data_i obtained in each subsequent polling after the first polling can be used to update and replace the target sampling data Data_i saved in the programmable automatic polling module 30 (for example, the register group 31).

[0040] Therefore, the process in which the programmable automatic polling module 30 (e.g., the automatic polling controller 32) drives the serial bus controller 20 to continuously or cyclically poll and obtain at least two target sampled data Data_1 to Data_n can be regarded as a process in which the at least two target sampled data Data_1 to Data_n stored in the programmable automatic polling module 30 (e.g., the register group 31) are continuously updated in accordance with the polling order. That is, the at least two target sampled data Data_1 to Data_n can be continuously stored in the programmable automatic polling module 30 (e.g., the register group 31) after the first polling, and each target sampled data Data_i in the at least two target sampled data Data_1 to Data_n stored in the programmable automatic polling module 30 (e.g., the register group 31) can be dynamically updated in the subsequent polling process according to the polling cycle frequency.

[0041] Exemplarily, in an embodiment of the present application, the programmable automatic polling module 30 (e.g., the automatic polling controller 32) drives the first polling of the serial bus controller 20, preferably earlier than the chip management module 10 starts the dynamic management of the power consumption frequency of the processor 90. For example, the chip management module 10 can enable the programmable automatic polling module 30 before starting the dynamic management of the power consumption frequency of the processor 90.

[0042] Figure 3 The schematic diagram of the principle of obtaining power state sampling data by the front-end circuit in the embodiment of the present application. Please refer to the figure. In the embodiment of the present application, since the programmable automatic polling module 30 can continuously save at least two target sampling data Data_1~Data_n that are continuously polled and dynamically updated, the chip management module 10 can periodically obtain the power state sampling data (i.e., at least two target sampling data Data_1~Data_n) during the period of implementing dynamic power consumption frequency management on the processor 90. It can be configured as follows: periodically obtain the at least two target sampling data Data_1~Data_n stored in the programmable automatic polling module 30 (e.g., the register group 31) through the internal chip access inside the processor.

[0043] Exemplarily, in an embodiment of the present application, the process in which the chip management module 10 periodically obtains at least two target sampling data Data_1~Data_n from the programmable automatic polling module 30 (for example, the register group 31) may be periodically polling to obtain at least two target sampling data Data_1~Data_n stored in the programmable automatic polling module 30 (for example, the register group 31), or may be periodically and concurrently obtaining at least two target sampling data Data_1~Data_n stored in the programmable automatic polling module 30 (for example, the register group 31).

[0044] Figure 4 A timing diagram of the front-end circuit acquiring power status sampling data in an embodiment of the present application. Figure 5 FIG. 1 is a timing diagram for obtaining power supply status sampling data in a comparative example. Figure 4 In FIG. 1 , the arrow marked with “Data_i” between the programmable automatic polling module 30 and the chip management module 10 generally indicates that the chip management module 10 periodically obtains at least two target sampled data Data_1 to Data_n from the programmable automatic polling module 30 (e.g., the register group 31) in a polling manner or in a concurrent manner; and Figure 5 In the comparative example shown, the front-end circuit does not include the programmable automatic polling module 30 in the embodiment of the present application, and the chip management module 10 is responsible for driving the serial bus controller.

[0045] By comparison Figure 4 and Figure 5 It can be clearly seen that no matter whether the chip management module 10 periodically obtains at least two target sampled data Data_1~Data_n from the programmable automatic polling module 30 (for example, the register group 31) in a polling manner or in a concurrent manner, the chip management module 10 obtains at least two target sampled data Data_1~Data_n based on the on-chip access inside the processor 90, and because the time taken for the on-chip access inside the processor 90 is much shorter than the time taken for the serial bus-based access operation performed by driving the serial bus controller 20, based on the embodiment of the present application, the chip management module 10 will not encounter any error when obtaining the power state sampled data. Figure 5 The long interrupt t_int caused by waiting for the access operation based on the serial bus, that is, based on the embodiment of the present application, the interruption duration caused by the chip management module 10 obtaining the power status sampling data can be greatly reduced or even completely eliminated (for example, when the register group 31 of the programmable automatic polling module 30 selects the MMIO register), thereby helping to improve the management performance of the dynamic management of power consumption and frequency.

[0046] For example, by comparing Figure 4 and Figure 5 It can also be seen that in the embodiment of the present application, since at least two target sampled data Data_1~Data_n in the programmable automatic polling module 30 are continuously stored, the first cycle frequency f1 of the chip management module 10 to obtain the power state sampled data (i.e., at least two target sampled data Data_1~Data_n) may not be limited by the second cycle frequency f2 of the programmable automatic polling module 30 driving the serial bus controller 20 to implement polling, f2 is equal to 1 / T_poll, T_poll represents the polling cycle length of obtaining at least two target sampled data Data_1~Data_n by driving the serial bus controller 20 to perform a serial bus-based access operation. Therefore, based on the embodiment of the present application, the first cycle frequency f1 of the chip management module 10 to obtain the power state sampled data (i.e., at least two target sampled data Data_1~Data_n) may be allowed to be higher than the second cycle frequency f2 of driving the serial bus controller 20 to implement polling, thereby being more conducive to improving the management performance of the dynamic management of power consumption frequency.

[0047] In the embodiment of the present application, as described above, the selection of the power sampling device included in the power sampling component 50 can be diversified, and the number and type of at least two target sampling data Data_1~Data_n can also be set according to different requirements of dynamic management of power consumption frequency. Therefore, in order to enable the embodiment of the present application to improve the compatibility with the differentiated configuration of the power sampling component 50 and the adaptability of at least two target sampling data Data_1~Data_n to different requirements of dynamic management of power consumption frequency, the programmable automatic polling module 30 (for example, the automatic polling controller 32) driving the serial bus controller 20 can be configured by the chip management module 10, and the at least two target sampling data Data_1~Data_n obtained by polling can be determined based on the configuration of the programmable automatic polling module 30 (for example, the automatic polling controller 32) by the chip management module 10.

[0048] In the embodiment of the present application, the chip management module 10 configures the programmable automatic polling module 30 by generating an operation instruction set for driving the serial bus controller 20 by the chip management module 10 and sending the operation instruction set to the programmable automatic polling module 30. In this case, the programmable automatic polling module 30 (for example, the register group 31) is also used to save the operation instruction set generated by the chip management module 10; and the programmable automatic polling module 30 (for example, the automatic polling controller 32) can be specifically configured as follows: by polling multiple access operation instructions cmd_1~cmd_m in the operation instruction set saved (for example, saved in the register group 31), the multiple access operation instructions cmd_1~cmd_m are sequentially sent to the serial bus controller 20, so that the serial bus controller 20 performs an access operation for polling and obtaining at least two target sampling data Data_1~Data_n on the power sampling component 50 according to the multiple access operation instructions cmd_1~cmd_m received in sequence, where m is a positive integer greater than or equal to 2.

[0049] Exemplarily, in an embodiment of the present application, if the programmable automatic polling module 30 is configured by the chip management module 10, and the programmable automatic polling module 30 includes a register group 31 and an automatic polling controller 32, then, in addition to being used to store at least two target sampling data Data_1~Data_n obtained by the serial bus controller 20 through access operation polling, the register group 31 can also store multiple access operation instructions cmd_1~cmd_m written by the chip management module 10.

[0050] Figure 6 Schematic diagram of the configuration principle of the programmable automatic polling module of the front-end circuit in the embodiment of the present application. Figure 6 In an embodiment of the present application, if the register group 31 needs to save at least two target sampling data Data_1~Data_n obtained by the serial bus controller 20 through access operation polling, and multiple access operation instructions cmd_1~cmd_m written by the chip management module 10, then the register group 31 may include an instruction register group 311 and a data register group 312, and the multiple access operation instructions cmd_1~cmd_m written by the chip management module 10 may be saved in the instruction register group 311, and the at least two target sampling data Data_1~Data_n obtained by the serial bus controller 20 through access operation polling may be saved in the data register group 312.

[0051] Exemplarily, in an embodiment of the present application, if the programmable automatic polling module 30 is configured by the chip management module 10, and the programmable automatic polling module 30 includes a register group 31 and an automatic polling controller 32, then the automatic polling controller 32 can be specifically configured through hardware programming as follows: through polling access to the register group 31, multiple access operation instructions cmd_1~cmd_m stored in the register group 31 are sequentially sent to the serial bus controller 20, and at least two target sampling data Data_1~Data_n obtained by the serial bus controller 20 through the access operation polling are written into the register group 31.

[0052] Exemplarily, in an embodiment of the present application, the polling access of the automatic polling controller 32 (i.e., the programmable automatic polling module 30) to multiple access operation instructions cmd_1~cmd_m can be configured as follows: in response to the existence of a successfully polled access operation instruction, the currently successfully polled access operation instruction is sent to the serial bus controller 20; and, in response to the serial bus controller 20 completing the access operation corresponding to the currently received access operation instruction, polling the next access operation instruction.

[0053] Further optionally, in the embodiment of the present application, the automatic polling controller 32 (i.e., the programmable automatic polling module 30) may also introduce a status check on the serial bus controller 20 during the polling access process of the multiple access operation instructions cmd_1 to cmd_m, so as to timely discover the abnormal state of the serial bus controller 20 and report it to the chip management module 10. In this case, the automatic polling controller 32 (i.e., the programmable automatic polling module 30) may be configured to poll the multiple access operation instructions cmd_1 to cmd_m as follows: in response to the existence of a successfully polled access operation instruction cmd_j and the current state of the serial bus controller 20 being available, the currently successfully polled access operation instruction cmd_j is sent to the serial bus controller 20; and, in response to the serial bus controller 20 completing the access operation corresponding to the currently received access operation instruction cmd_j, poll the next access operation instruction cmd_j+1 (when j is less than m) or cmd_1 (when j=m).

[0054] For example, in the embodiment of the present application, the instruction number m of the multiple access operation instructions cmd_1~cmd_m may be equal to or greater than the data number n of at least two target sampled data Data_1~Data_n. The reason why the instruction number m is greater than the data number n is that the access operation for obtaining a certain target sampled data Data_i requires an additional write operation in addition to the read operation. Therefore, in the multiple access operation instructions cmd_1~cmd_m, in addition to including n read operation instructions for driving the serial bus controller 20 to read at least two target sampled data Data_1~Data_n respectively through n serial bus-based read operations, at least one write operation instruction for driving the serial bus controller 20 to perform a write operation may also be additionally included.

[0055] For example, for at least one of the power consumption state sampling data, current state sampling data, voltage state sampling data, and temperature state sampling data of the power rail, before driving the serial bus controller 20 to perform a corresponding read operation on the corresponding power sampling device in the power sampling component 50, it is also necessary to send sampling configuration data such as a power rail identifier to the power sampling device through a write operation on the power sampling device, so that the power sampling device can be configured to sample one of the multiple power rails indicated by the power rail identifier. Therefore, the target sampling data Data_i obtained by the read operation on the power sampling device thereafter can represent at least one of the power consumption state sampling data, current state sampling data, voltage state sampling data, and temperature state sampling data of the power rail indicated by the power rail identifier.

[0056] That is, in the embodiment of the present application, the plurality of access operation instructions cmd_1~cmd_m may include a write operation instruction whose access operation type is a write operation, and a read operation instruction whose access operation type is a read operation, that is, each access operation instruction cmd_j may include an operation type for characterizing the corresponding access operation. The write operation is used to write sampling configuration data associated with the target sampling data Data_i to any power sampling device in the power sampling component 50, and the read operation is used to read the target sampling data Data_i from any power sampling device in the power sampling component 50. The sampling configuration data, as the write data corresponding to the write operation instruction, may be provided by the chip management module 10 and stored in the programmable automatic polling module 30 (e.g., the instruction register group 311 or the data register group 312 of the register group 31).

[0057] Thus, in the embodiment of the present application, the programmable automatic polling module 30 (for example, the automatic polling controller 32) drives the serial bus controller 20, and can support the switching of the data transmission direction in the serial bus by being compatible with the two types of access operations, namely, the transmission of the sampling configuration data as write data from the serial bus controller 20 to any one of the power sampling devices in the power sampling component 50, and the switching between the transmission of the target sampling data Data_i as read data from any one of the power sampling devices in the power sampling component 50 to the serial bus controller 20.

[0058] Exemplarily, in an embodiment of the present application, each access operation instruction cmd_j of the multiple access operation instructions cmd_1~cmd_m may include an access destination address, and the access destination address of the access operation instruction cmd_j includes the device bus address of any power sampling device in the power sampling component 50, so that the access destination address of the access operation instruction cmd_j can realize the addressing of the serial bus controller 20 for reading the target sampling data Data_i.

[0059] For example, in the embodiment of the present application, at least two target sampled data Data_1 to Data_n may be obtained by sampling the same power sampling device in the power sampling component 50, or at least two target sampled data Data_1 to Data_n may be obtained by sampling different power sampling devices in the power sampling component 50. If at least two target sampled data Data_1 to Data_n are obtained by sampling different power sampling devices in the power sampling component 50, then the device bus addresses included in the access destination addresses of the multiple access operation instructions cmd_1 to cmd_m (for example, n read operation instructions therein) may not be all the same, so that the access operation (for example, n read operations) performed by the programmable automatic polling module 30 (for example, the automatic polling controller 32) driving the serial bus controller 20 may be switched between different power sampling devices in the power sampling component 50, so that at least two target sampled data Data_1 to Data_n may be obtained by polling different power sampling devices in the power sampling component 50.

[0060] Exemplarily, in the embodiment of the present application, each access operation instruction cmd_j in the plurality of access operation instructions cmd_1 to cmd_m may further include a data transmission length, and the data transmission length is used to indicate the length of data transmitted using the serial bus during a single access operation of the serial bus controller 20 in response to any access operation instruction cmd_j. For example, for a write operation instruction, the length of data transmitted using the serial bus indicated by its data transmission length refers to the data length of the sampling configuration data used as write data when the write operation corresponding to the write operation instruction is executed; for a read operation instruction, the length of data transmitted using the serial bus indicated by its data transmission length refers to the data length of the target sampling data Data_i used as read data when the read operation corresponding to the read operation instruction is executed.

[0061] As can be seen above, in the embodiment of the present application, each access operation instruction cmd_j among the multiple access operation instructions cmd_1 to cmd_m may include at least one of an access type, an access destination address, and a data transmission length in addition to the instruction content.

[0062] Exemplarily, in an embodiment of the present application, in order to facilitate the programmable automatic polling module 30 (e.g., the automatic polling controller 32) to automatically implement the polling access to multiple access operation instructions cmd_1~cmd_m, and drive the serial bus controller 20 based on the polling results of the multiple access operation instructions cmd_1~cmd_m, FSM (Finite State Machine, finite state machine) can be used to control the automatic polling controller 32 of the programmable automatic polling module 30. In this case, the polling access of the automatic polling controller 32 to the multiple access operation instructions cmd_1~cmd_m (i.e., the register group 31) is controlled by the FSM, and the polling access of the automatic polling controller 32 to the multiple access operation instructions cmd_1~cmd_m (i.e., the register group 31) can be controlled as follows based on the state switching of the FSM: In response to a successful query of the access operation instruction cmd_j at the current polling position in the register group 31 (i.e., there is currently a successfully polled access operation instruction cmd_j), and the current state of the serial bus controller 20 is available, the access operation instruction cmd_j at the current polling position in the register group 31 (i.e., the currently successfully polled access operation instruction cmd_j) is sent to the serial bus controller 20; and, In response to the serial bus controller 20 completing the access operation corresponding to a currently received access operation instruction cmd_j, the current polling position in the register group 31 is updated according to the address offset used by the chip management module 10 when writing multiple access operation instructions cmd_1~cmd_m in the register group 31 to poll the next access operation instruction cmd_j+1 (when j is less than m) or cmd_1 (when j=m).

[0063] Figure 7 This is a state transition principle diagram of the finite state machine maintained by the programmable automatic polling module of the front-end circuit in the embodiment of the present application. Figure 7 The FSM for controlling the automatic polling controller 32 may include the following states: an idle state IDLE, a bus check state CHECK, a destination address configuration state CONFIG, an operation control state CTRL, and an operation wait state WAIT. Figure 7 In the example, multiple access operation instructions cmd_1~cmd_m may include a write operation instruction whose access operation type is a write operation, and a read operation instruction whose access operation type is a read operation. Therefore, the operation control state CTRL may include a write operation control state TX_CTRL and a read operation control state RX_CTRL, and the operation wait state includes a write operation wait state TX_WAIT and a read operation wait state RX_WAIT.

[0064] like Figure 7 As shown, in an embodiment of the present application, when the FSM is in the idle state IDLE, the automatic polling controller 32 queries the access operation instruction cmd_j at the current polling position in the register group 31, and in response to the successful query of the access operation instruction cmd_j at the current polling position in the register group 31, the FSM migrates from the idle state IDLE to the bus check state CHECK. That is, the state migration trigger condition Cond_idl-ck for the FSM to migrate from the idle state IDLE to the bus check state CHECK may include: the current polling position in the register group 31 successfully queries the access operation instruction cmd_j.

[0065] like Figure 7 As shown, in an embodiment of the present application, when the FSM is in the bus check state CHECK, the automatic polling controller 32 checks whether the current state of the serial bus controller 20 is available and whether the access destination address of the serial bus controller 20 needs to be updated, and: In response to the current state of the serial bus controller 20 being available and the access destination address of the serial bus controller 20 not needing to be updated, the FSM migrates from the bus check state CHECK to the operation control state CTRL, or, In response to the current state of the serial bus controller 20 being available and the access destination address of the serial bus controller 20 needing to be updated, the FSM migrates from the bus check state CHECK to the destination address configuration state CONFIG.

[0066] That is, the state migration trigger condition Cond_ck-ctr of the FSM migrating from the bus check state CHECK to the operation control state CTRL may include: the current state of the serial bus controller 20 is available, and the access destination address of the serial bus controller 20 does not need to be updated; and the state migration trigger condition Cond_ck-cfg of the FSM migrating from the bus check state CHECK to the destination address configuration state CONFIG may include: the current state of the serial bus controller 20 is available, and the access destination address of the serial bus controller 20 needs to be updated.

[0067] Exemplarily, the automatic polling controller 32's check on whether the current status of the serial bus controller 20 is available may include: checking whether the current working status of the serial bus controller 20 is idle, and whether the controller cache of the serial bus controller 20 is empty, wherein, if the current working status of the serial bus controller 20 is idle and the controller cache of the serial bus controller 20 is currently empty, it indicates that the current status of the serial bus controller 20 is available, otherwise it indicates that the current status of the serial bus controller 20 is unavailable.

[0068] For example, the controller cache of the serial bus controller 20 may include two FIFO (First Input First Output) caches, one is a TX FIFO for storing write data, and the other is an RXFIFO for storing read data, and checking whether the controller cache of the serial bus controller 20 is empty includes: if the access operation instruction cmd_j of the current polling position in the register group 31 is a write operation instruction, then checking whether the TX FIFO for storing write data is empty; if the access operation instruction cmd_j of the current polling position in the register group 31 is a read operation instruction, then checking whether the RX FIFO for storing read data is empty.

[0069] Exemplarily, if the operation control state CTRL may include a write operation control state TX_CTRL and a read operation control state RX_CTRL, then, when the FSM is in the bus check state CHECK, it may also selectively migrate to the write operation control state TX_CTRL or the read operation control state RX_CTRL according to the access operation type of the access operation instruction cmd_j in the current polling position in the register group 31. That is, if the access operation instruction cmd_j in the current polling position in the register group 31 is a write operation instruction, then the migrated operation control state CTRL is the write operation control state TX_CTRL; if the access operation instruction cmd_j in the current polling position in the register group 31 is a read operation instruction, then the migrated operation control state CTRL is the read operation control state RX_CTRL.

[0070] That is, the state transition triggering condition Cond_ck-ctr for the FSM to migrate from the bus check state CHECK to the operation control state CTRL may include: the state transition triggering condition Cond_ck-txc for the FSM to migrate from the bus check state CHECK to the write operation control state TX_CTRL, and the state transition triggering condition Cond_ck-rxc for the FSM to migrate from the bus check state CHECK to the read operation control state RX_CTRL. Among them, the state transition triggering condition Cond_ck-txc may include: the current state of the serial bus controller 20 is available, the access destination address of the serial bus controller 20 does not need to be updated, and the access operation instruction cmd_j of the current polling position in the register group 31 is a write operation instruction; and the state transition triggering condition Cond_ck-rxc may include: the current state of the serial bus controller 20 is available, the access destination address of the serial bus controller 20 does not need to be updated, and the access operation instruction cmd_j of the current polling position in the register group 31 is a read operation instruction.

[0071] like Figure 7 As shown, in an embodiment of the present application, when the FSM is in the destination address configuration state CONFIG, the automatic polling controller 32 updates the access destination address of the serial bus controller 20 according to the access operation instruction cmd_j successfully queried at the current polling position, that is, the access destination address of the serial bus controller 20 is updated to the access destination address indicated by the access operation instruction cmd_j of the current polling position in the register group 31, and, in response to the completion of the update of the access destination address of the serial bus controller 20, the FSM migrates from the destination address configuration state CONFIG to the operation control state CTRL.

[0072] That is, the migration triggering condition Cond_cfg-ctr for the FSM to migrate from the destination address configuration state CONFIG to the operation control state CTRL may include: the update of the access destination address of the serial bus controller 20 is completed.

[0073] Exemplarily, if the access destination address of the access operation instruction cmd_j includes the device bus address of any power sampling device in the power sampling component 50, then the automatic polling controller 32 may check whether the access destination address of the serial bus controller 20 needs to be updated, including: checking whether the device bus address indicated by the current polling position query access operation instruction cmd_j in the register group 31 is the same as the device bus address included in the access destination address when the serial bus controller 20 last performed an access operation; wherein, if they are the same, it indicates that the access destination address does not need to be updated; otherwise, it indicates that the access destination address needs to be updated, for example, the device bus addresses included in the access destination addresses of multiple access operation instructions cmd_1~cmd_m are not all the same, and, after the bus controller 20 last performed an access operation, the device bus address indicated by the current polling position query access operation instruction cmd_j in the register group 31 triggered switching between different power sampling devices in the power sampling component 50.

[0074] Exemplarily, if the operation control state CTRL can include a write operation control state TX_CTRL and a read operation control state RX_CTRL, then, similar to the bus check state CHECK, when the FSM is in the address configuration state CONFIG, it can also query the access operation type of the access operation instruction cmd_j based on the current polling position in the register group 31, and selectively migrate to the write operation control state TX_CTRL or the read operation control state RX_CTRL.

[0075] That is, the state transition trigger condition Cond_cfg-ctr for the FSM to migrate from the address configuration state CONFIG to the operation control state CTRL may include: the state transition trigger condition Cond_cfg-txc for the FSM to migrate from the address configuration state CONFIG to the write operation control state TX_CTRL, and the state transition trigger condition Cond_cfg-rxc for the FSM to migrate from the address configuration state CONFIG to the read operation control state RX_CTRL. Among them, the state transition trigger condition Cond_cfg-txc may include: the update of the access destination address of the serial bus controller 20 is completed, and the access operation instruction cmd_j of the current polling position in the register group 31 is a write operation instruction; and the state transition trigger condition Cond_cfg-rxc may include: the update of the access destination address of the serial bus controller 20 is completed, and the access operation instruction cmd_j of the current polling position in the register group 31 is a read operation instruction.

[0076] like Figure 7 As shown, in an embodiment of the present application, when the FSM is in the operation control state CTRL, the automatic polling controller 32 triggers the serial bus controller 20 to execute the access operation corresponding to the access operation instruction cmd_j successfully queried at the current polling position, and, in response to the completion of the triggering of the access operation of the serial bus controller 20 by the automatic polling controller 32, the FSM migrates from the operation control state CTRL to the operation waiting state WAIT.

[0077] Exemplarily, when the FSM is in the write operation control state TX_CTRL, the automatic polling controller 32 triggers the serial bus controller 20 to execute the write operation corresponding to the access operation instruction cmd_j successfully queried at the current polling position, and writes the sampling configuration data as write data into the controller cache of the serial bus controller 20, and, in response to the completion of the triggering of the write operation of the serial bus controller 20 by the automatic polling controller 32, the FSM migrates from the write operation control state TX_CTRL to the write operation waiting state TX_WAIT.

[0078] Exemplarily, when the FSM is in the read operation control state RX_CTRL, the automatic polling controller 32 triggers the serial bus controller 20 to execute the read operation corresponding to the access operation instruction cmd_j successfully queried at the current polling position, and in response to the automatic polling controller 32 completing the triggering of the read operation of the serial bus controller 20, the FSM migrates from the read operation control state RX_CTRL to the read operation waiting state RX_WAIT.

[0079] That is, the state transition trigger condition Cond_ctr-wt for the FSM to migrate from the operation control state CTRL to the operation waiting state WAIT includes the completion of the triggering of the access operation of the serial bus controller 20 by the automatic polling controller 32. In addition, the state transition trigger condition Cond_ctr-wt may include the state transition trigger condition Cond_txc-twt for the FSM to migrate from the write operation control state TX_CTRL to the write operation waiting state TX_WAIT, and the state transition trigger condition Cond_rxc-rwt for the FSM to migrate from the read operation control state RX_CTRL to the read operation waiting state RX_WAIT. Among them, the state transition trigger condition Cond_txc-twt may include the completion of the triggering of the write operation of the serial bus controller 20 by the automatic polling controller 32, and the state transition trigger condition Cond_rxc-rwt may include the completion of the triggering of the read operation of the serial bus controller 20 by the automatic polling controller 32.

[0080] like Figure 7 As shown, in an embodiment of the present application, when the FSM is in the operation waiting state WAIT, the automatic polling controller 32 waits for the serial bus controller 20 to complete the access operation corresponding to the access operation instruction cmd_j successfully queried at the current polling position, and, in response to the completion of the execution of the access operation of the serial bus controller 20, the FSM migrates from the operation waiting state WAIT to the idle state IDLE, and triggers the update of the current polling position in the register group 31.

[0081] Exemplarily, when the FSM is in the write operation waiting state TX_WAIT, the automatic polling controller 32 waits for the serial bus controller 20 to complete the write operation on the sampling configuration data, and, in response to the serial bus controller 20 completing the write operation on the sampling configuration data, the FSM migrates from the write operation waiting state TX_WAIT to the idle state IDLE and triggers the update of the current polling position in the register group 31.

[0082] Exemplarily, when the FSM is in the read operation waiting state RX_WAIT, the automatic polling controller 32 waits for the serial bus controller 20 to complete the read operation on the target sampling data Data_i, and, in response to the serial bus controller 20 completing the read operation on the target sampling data Data_i, the automatic polling controller 32 writes the target sampling data Data_i saved as read data in the controller cache of the serial bus controller 20 into the register component 31, and the FSM migrates from the read operation waiting state RX_WAIT to the idle state IDLE, and triggers the update of the current polling position in the register group 31.

[0083] That is, the state transition trigger condition Cond_wt-id1 of the FSM migrating from the operation waiting state WAIT to the idle state IDLE. Moreover, the state transition trigger condition Cond_wt-id1 of the FSM migrating from the operation waiting state WAIT to the idle state IDLE may include the state transition trigger condition Cond_twt-id1 of the FSM migrating from the write operation waiting state TX_WAIT to the idle state IDLE, and the state transition trigger condition Cond_rwt-id1 of the FSM migrating from the read operation waiting state RX_WAIT to the idle state IDLE. Among them, the state transition trigger condition Cond_twt-id1 may include the completion of the write operation of the serial bus controller 20 to the sampling configuration data, and the state transition trigger condition Cond_rwt-id1 may include the completion of the read operation of the serial bus controller 20 to the target sampling data Data_i.

[0084] It can be understood that, in the embodiments of the present application, the various parts of the contents exemplified can be in an "and / or" relationship. In this article, the meaning of "and / or" refers to the contexts connected by it, which can be in a common limiting relationship of "and", or can also be in an alternative limiting relationship of "or". Therefore, the various parts of the contents with an "and / or" relationship can be understood as including different combinations of situations in which "and / or" between each two parts of the contents respectively represents a common limiting relationship of "and" or an alternative limiting relationship of "or", and this combination of different situations can be considered to be basically equivalent to the limiting scope of "at least one of the parts".

[0085] In an embodiment of the present application, a processor is also provided, which includes the front-end circuit 95 described in the above embodiment. Exemplarily, in an embodiment of the present application, the processor including the front-end circuit 95 may be any one of a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a TPU (Tensor Processing Unit), a NPU (Neural network Processing Unit), a DPU (Deep learning Processing Unit), an APU (Accelerated Processing Unit), and a GPGPU (General-Purpose computing on Graphics Processing Unit). That is, the embodiment of the present application does not limit the type of processor.

[0086] In an embodiment of the present application, a board device is further provided. The board device may include a circuit board, the processor in the above embodiment, and a power sampling component, and the processor and the power sampling component are both deployed on the circuit board.

[0087] In an embodiment of the present application, an electronic device is further provided, and the electronic device includes the board device in the above embodiment.

[0088] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A front-end circuit of a processor, characterized in that: include: A chip management module, configured to implement dynamic management of the power consumption frequency of the processor based on periodically acquired power state sampling data, wherein the power state sampling data includes at least two target sampling data; A serial bus controller, used to connect to a power sampling component via a serial bus, wherein the power sampling component is used to sample at least two target sampling data; A programmable automatic polling module, used to drive the serial bus controller to poll the power sampling component to obtain at least two target sampling data, and to save the at least two target sampling data obtained by polling; The chip management module is configured to periodically acquire the power state sampling data by periodically acquiring at least two target sampling data stored in the programmable automatic polling module through on-chip access inside the processor.

2. The front-end circuit according to claim 1, characterized in that: The driving of the serial bus controller by the programmable automatic polling module is configured by the chip management module, and the at least two target sampling data acquired by polling are determined based on the configuration of the programmable automatic polling module by the chip management module.

3. The front-end circuit according to claim 2, characterized in that: The programmable automatic polling module is also used to store the operation instruction set generated by the chip management module; The programmable automatic polling module is configured to: poll multiple access operation instructions in the operation instruction set, and sequentially send the multiple access operation instructions to the serial bus controller, so that the serial bus controller performs an access operation on the power sampling component for polling to obtain at least two of the target sampling data according to the multiple access operation instructions received sequentially.

4. The front-end circuit according to claim 3, characterized in that: The access destination address of the access operation instruction includes the device bus address of any one of the power sampling devices in the power sampling component, and the device bus addresses included in the access destination addresses of multiple access operation instructions are not all the same, so that the access operation is switched between different power sampling devices in the power sampling component, and at least two target sampling data are obtained from different power sampling devices in the power sampling component through polling; and / or, The multiple access operation instructions include a write operation instruction whose access operation type is a write operation, and a read operation instruction whose access operation type is a read operation, wherein the write operation is used to write sampling configuration data associated with the target sampling data to any one of the power sampling devices in the power sampling component, wherein the sampling configuration data is provided by the chip management module, and the read operation is used to read the target sampling data from any one of the power sampling devices in the power sampling component; and / or, Each of the plurality of access operation instructions includes a data transmission length, and the data transmission length is used to indicate the length of data transmitted using the serial bus during a single access operation in which the serial bus controller responds to any of the access operation instructions; and / or, The polling access of the programmable automatic polling module to the plurality of access operation instructions is configured as follows: in response to the current existence of the successfully polled access operation instruction and the current state of the serial bus controller being available, sending the currently successfully polled access operation instruction to the serial bus controller; And, in response to the serial bus controller completing the access operation corresponding to the currently received access operation instruction, polling the next access operation instruction.

5. The front-end circuit according to claim 3, characterized in that: The programmable automatic polling module includes a register group, and the register group is used to store the multiple access operation instructions written by the chip management module and at least two target sampling data obtained by the serial bus controller through the access operation polling; The programmable automatic polling module also includes an automatic polling controller, and the automatic polling controller is used to: sequentially send a plurality of access operation instructions stored in the register group to the serial bus controller through polling access to the register group; and write at least two target sampling data obtained by the serial bus controller through the access operation polling into the register group; The chip management module is configured to periodically acquire the power state sampling data by periodically acquiring at least two target sampling data stored in the register group through the on-chip access.

6. The front-end circuit according to claim 5, characterized in that: The registers in the register group are MMIO registers; and / or, The register group includes an instruction register group and a data register group, a plurality of access operation instructions are stored in the instruction register group, and at least two target sampling data are stored in the data register group.

7. The front-end circuit according to claim 5, characterized in that: The polling access of the automatic polling controller to the register group is controlled by a finite state machine, and the polling access of the automatic polling controller to the register group is controlled based on the state switching of the finite state machine as follows: In response to a successful query of the access operation instruction at the current polling position in the register group and the current state of the serial bus controller being available, sending the access operation instruction at the current polling position in the register group to the serial bus controller; as well as, In response to the serial bus controller completing the access operation corresponding to the currently received access operation instruction, the current polling position in the register group is updated according to the address offset used by the chip management module when writing multiple access operation instructions in the register group.

8. The front-end circuit according to claim 7, characterized in that: The finite state machine includes the following states: idle state, bus check state, destination address configuration state, operation control state, and operation waiting state; When the finite state machine is in the idle state, the automatic polling controller queries the access operation instruction at the current polling position in the register group, and, in response to the current polling position in the register group querying the access operation instruction successfully, the finite state machine migrates from the idle state to the bus check state; When the finite state machine is in the bus check state, the automatic polling controller checks whether the current state of the serial bus controller is available and whether the access destination address of the serial bus controller needs to be updated, and, in response to the current state of the serial bus controller being available and the access destination address not needing to be updated, the finite state machine migrates from the bus check state to the operation control state, or, in response to the current state of the serial bus controller being available and the access destination address needing to be updated, the finite state machine migrates from the bus check state to the destination address configuration state; When the finite state machine is in the destination address configuration state, the automatic polling controller updates the access destination address of the serial bus controller according to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the update of the access destination address, the finite state machine migrates from the destination address configuration state to the operation control state; When the finite state machine is in the operation control state, the automatic polling controller triggers the serial bus controller to perform the access operation corresponding to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the triggering of the access operation, the finite state machine migrates from the operation control state to the operation waiting state; When the finite state machine is in the operation waiting state, the automatic polling controller waits for the serial bus controller to complete the access operation corresponding to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the execution of the access operation, the finite state machine migrates from the operation waiting state to the idle state and triggers the update of the current polling position in the register group.

9. The front-end circuit according to claim 8, characterized in that: The automatic polling controller checks whether the current state of the serial bus controller is available, including: checking whether the current working state of the serial bus controller is idle, and whether the controller cache of the serial bus controller is empty, wherein if the current working state of the serial bus controller is idle, and the controller cache is currently empty, it indicates that the current state of the serial bus controller is available, otherwise it indicates that the current state of the serial bus controller is unavailable; and / or, The access destination address of the access operation instruction includes the device bus address of any one of the power sampling devices in the power sampling component, the device bus addresses included in the access destination addresses of multiple access operation instructions are not all the same, and the automatic polling controller checks whether the access destination address of the serial bus controller needs to be updated, including: checking whether the device bus address indicated by the access operation instruction queried at the current polling position in the register group is the same as the device bus address included in the access destination address when the serial bus controller performed an access operation last time, wherein if they are the same, it means that the access destination address does not need to be updated, otherwise it means that the access destination address needs to be updated.

10. The front-end circuit according to claim 8, characterized in that: The multiple access operation instructions include a write operation instruction whose access operation type is a write operation, and a read operation instruction whose access operation type is a read operation, wherein the write operation is used to write sampling configuration data associated with the target sampling data to any one of the power sampling devices in the power sampling component, and the read operation is used to read the target sampling data from any one of the power sampling devices in the power sampling component; The operation control state includes a write operation control state and a read operation control state, and the operation waiting state includes a write operation waiting state and a read operation waiting state; When the finite state machine is in the bus check state or the destination address configuration state, the access operation type of the access operation instruction is also queried according to the current polling position in the register group, and selectively migrates to the operation control state, the write operation control state or the read operation control state; When the finite state machine is in the write operation control state, the automatic polling controller triggers the serial bus controller to execute the write operation corresponding to the access operation instruction successfully queried at the current polling position, and writes the sampling configuration data into the controller cache of the serial bus controller, and, in response to the completion of the triggering of the write operation, the finite state machine migrates from the write operation control state to the write operation waiting state; When the finite state machine is in the write operation waiting state, the automatic polling controller waits for the serial bus controller to complete the write operation on the sampling configuration data, and, in response to the completion of the write operation on the sampling configuration data, the finite state machine migrates from the write operation waiting state to the idle state and triggers the update of the current polling position in the register group; When the finite state machine is in the read operation control state, the automatic polling controller triggers the serial bus controller to perform a read operation corresponding to the access operation instruction successfully queried at the current polling position, and, in response to the completion of the triggering of the read operation, the finite state machine migrates from the read operation control state to the read operation waiting state; When the finite state machine is in the read operation waiting state, the automatic polling controller waits for the serial bus controller to complete the read operation on the target sampling data, and, in response to the completion of the read operation on the target sampling data, the automatic polling controller writes the target sampling data stored in the controller cache of the serial bus controller into the register component, and the finite state machine migrates from the read operation waiting state to the idle state and triggers the update of the current polling position in the register group.

11. A processor, characterized in that: The method comprises the front-end circuit according to any one of claims 1 to 10.

12. A board device, characterized in that: The invention comprises a circuit board, the processor as claimed in claim 11, and the power sampling component, and the processor and the power sampling component are both disposed on the circuit board.

13. An electronic device, characterized in that: Comprising the board device as claimed in claim 12.

Citation Information

Patent Citations

  • Power consumption management circuit and chip

    CN113495611A

  • Memory controller, electronic system, and method of controlling memory access

    CN118069037A

  • Dynamically Controlling Power Management Of An On-Die Memory Of A Processor

    US20160124490A1

  • Techniques to change a mode of operation for a memory device

    US20180348838A1

  • Switching between polling-mode and interruption-driven modes without loss of I / O replies

    US20230393886A1