System on chip and method for regulating voltage and frequency
By physically separating the main processing unit and the safety processing unit in the on-chip system, only the safety processing unit is allowed to generate frequency configuration instructions, which solves the problem of safety hazards in frequency modulation and voltage regulation operations in the existing technology, and realizes safe control of frequency and voltage configuration. , improving the stability and security of the system.
Patent Information
- Application Number
- CN202010966080.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-15
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-09-15
AI Technical Summary
Existing dynamic voltage and frequency adjustment systems and adaptive voltage and frequency adjustment systems have security risks in frequency modulation and voltage regulation operations. Attack software can cause system crashes by initiating illegal frequency modulation and voltage regulation requests.
An on-chip system is designed. By physically separating the main processing unit and the security processing unit, only the security processing unit is allowed to generate frequency configuration instructions. The main processing unit cannot generate frequency configuration instructions, thereby preventing attack software from affecting the frequency configuration and improving frequency modulation and voltage regulation. Operational safety.
Through physical separation and hardware protection mechanisms, it is ensured that frequency configuration instructions can only be generated by trusted security processing units, preventing external programs or attack software from tampering with frequency and voltage configurations, and significantly improving the security of frequency and voltage regulation operations.
Smart Images

Figure CN114185836B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of chips, and in particular to a system on chip and a method for adjusting voltage and frequency. Background Art
[0002] The trend of miniaturization of integrated circuits has made processor manufacturers enthusiastic about how to reduce power consumption. There are two main ways to reduce power consumption of processors: dynamic voltage and frequency scaling (DVFS) and adaptive voltage and frequency scaling (AVFS). DVFS dynamically adjusts the system's clock frequency and supply voltage according to the different computing power requirements of the applications running on the processor, thereby achieving the purpose of energy saving. AVFS determines the system's supply voltage by measuring detection data in real time through sensors.
[0003] Whether it is a DVFS system or an AVFS system, the application can initiate a frequency and voltage regulation request through the system interface, and the frequency and voltage regulation controller adjusts the clock frequency and supply voltage according to the frequency and voltage regulation request. Attack software can take advantage of this and cause security problems to the system. For example, the attack software can initiate a frequency and voltage regulation request containing a large frequency. If the processor is set to this frequency, it may cause the system to crash. Summary of the invention
[0004] In view of this, an object of the present disclosure is to provide a system on chip and a method for regulating voltage and frequency to improve the safety of frequency and voltage regulation operations.
[0005] In a first aspect, an embodiment of the present disclosure provides a system on chip, including:
[0006] A main processing unit, used for sending frequency and voltage modulation instructions to the safety processing unit;
[0007] A security processing unit, configured to generate a frequency configuration instruction, and upon receiving the frequency and voltage modulation indication, generate a frequency and voltage modulation instruction;
[0008] A frequency modulation and voltage regulation controller, used to perform frequency and voltage configuration operations according to the frequency configuration instructions, and to adjust the clock frequency and power supply voltage of the main processing unit and / or the security processing unit according to the frequency modulation and voltage regulation instructions;
[0009] The on-chip bus is used to couple the main processing unit, the security processing unit and the frequency and voltage regulation controller.
[0010] Optionally, the frequency and voltage regulation controller is a DVFS controller or an AVFS controller.
[0011] Optionally, the DVFS controller sets at least one frequency-voltage pair according to the frequency configuration instruction, and generates a frequency modulation signal based on the first frequency and generates a voltage modulation signal based on the voltage corresponding to the first frequency when the target frequency of the frequency modulation and voltage modulation instruction matches the first frequency in the at least one frequency-voltage pair. The frequency modulation signal is used to modify the clock frequency of the main processing unit and / or the security processing unit, and the voltage modulation signal is used to modify the power supply voltage of the main processing unit and / or the security processing unit.
[0012] Optionally, the AVFS controller is also coupled to a sensor component, which is used to obtain detection data. The AVFS controller is used to configure at least one frequency according to the frequency configuration instruction, and when the target frequency in the frequency and voltage modulation instruction matches the first frequency of the at least one frequency, adjust the clock frequency based on the first frequency, and determine the supply voltage based on the detection data and the first frequency.
[0013] Optionally, the safety processing unit is further used to: determine whether the frequency and voltage modulation indication is a safety instruction, and generate a frequency and voltage modulation instruction if the frequency and voltage modulation indication is a safety instruction.
[0014] Optionally, the security processing unit determines whether the frequency and voltage modulation indication is a security instruction according to whether the frequency and voltage modulation indication has a specific label.
[0015] Optionally, when the safety processing unit determines that the frequency and voltage regulation instruction is a non-safe instruction, it starts a protection mechanism for the frequency and voltage regulation controller.
[0016] Optionally, the protection mechanism is: locking the frequency and voltage regulation controller; and sending an alarm to the main processing unit.
[0017] Optionally, the DVFS controller includes:
[0018] A plurality of register groups for storing at least one frequency-voltage pair;
[0019] A frequency conversion register, used for storing the target frequency;
[0020] a comparator, configured to compare the target frequency with the at least one frequency-voltage pair, respectively, and output a result signal;
[0021] A frequency conversion generating unit, used for generating the frequency modulation signal according to the result signal;
[0022] A voltage generating unit is used to generate the voltage regulating signal according to the result signal.
[0023] Optionally, the DVFS controller further includes:
[0024] An interrupt generation unit, used for generating an interrupt signal;
[0025] A reset generating unit, used for generating a reset signal;
[0026] A bus response unit, configured to generate a bus error signal;
[0027] The error detection unit is used to sample the result signal and instruct one of the interrupt generation unit, the reset generation unit and the bus response unit to start according to the result signal.
[0028] Optionally, the AVFS controller includes:
[0029] A temperature sensor controller, used for obtaining real-time temperature from a temperature sensor;
[0030] A process sensor controller, used for acquiring a process deviation from a process sensor;
[0031] A voltage sensor controller, used for obtaining real-time voltage from a voltage sensor;
[0032] A voltage calculation unit is used to calculate the supply voltage according to the real-time temperature, process deviation and the first frequency.
[0033] Optionally, the temperature sensor, the process sensor and the voltage sensor are located inside the on-chip system but outside the AVFS controller. Optionally, the on-chip bus includes a first bus and a second bus, the first bus is coupled to the main processing unit, the second bus is coupled to the security processing unit, and the first bus and the second bus are coupled using a communication unit.
[0034] In a second aspect, an embodiment of the present disclosure provides a method for adjusting voltage and frequency, including:
[0035] The main processing unit sends frequency and voltage modulation instructions;
[0036] The security processing unit generates a frequency configuration instruction, and upon receiving the frequency and voltage modulation indication, generates a frequency and voltage modulation instruction; and
[0037] The frequency modulation and voltage regulation controller performs frequency and voltage configuration operations according to the frequency configuration instructions, and adjusts the clock frequency and the supply voltage according to the frequency modulation and voltage regulation instructions.
[0038] In a third aspect, an embodiment of the present disclosure provides a computing device, including:
[0039] The system on chip as described in any one of the above items;
[0040] Off-chip bus;
[0041] a storage device coupled to the system on chip via the off-chip bus;
[0042] A power management circuit is coupled to the frequency and voltage regulation controller in the system on chip.
[0043] The system on chip provided by the embodiment of the present disclosure includes a physically separated main processing unit and a security processing unit. The security processing unit is coupled to a frequency modulation and voltage regulation controller. Only the security processing unit can generate frequency configuration instructions, while the main processing unit cannot generate frequency configuration instructions. That is, the external program executed by the main processing unit cannot generate frequency configuration instructions, and the attack software cannot affect the frequency configuration, thereby improving the security of the frequency modulation and voltage regulation operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and other objects, features and advantages of the present disclosure will become more apparent through the description of the embodiments of the present disclosure with reference to the following drawings, in which:
[0045] Figure 1 is a schematic diagram of the structure of a system on a chip provided by an embodiment of the present disclosure;
[0046] Figure 2 is a schematic diagram of the structure of a system on a chip provided by another embodiment of the present disclosure;
[0047] Figure 3 and 4 yes Figure 1 or Figure 2 A structural diagram of an exemplary embodiment of a frequency and voltage modulation controller;
[0048] Figure 5 is a flow chart of a method for adjusting voltage and frequency provided by an embodiment of the present disclosure;
[0049] Figure 6 is a schematic diagram of the structure of a general computer system used in the embodiments of the present disclosure;
[0050] Figure 7 It is a schematic diagram of the structure of the embedded system used in the embodiment of the present disclosure. DETAILED DESCRIPTION
[0051] The present disclosure is described below based on embodiments, but the present disclosure is not limited to these embodiments. In the detailed description of the present disclosure below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present disclosure without the description of these details. In order to avoid confusing the essence of the present disclosure, well-known methods, processes, and procedures are not described in detail. In addition, the drawings are not necessarily drawn to scale.
[0052] The system on chip of the present disclosure
[0053] Figure 1 Schematic diagram of the structure of the system on chip 100 used in the embodiment of the present disclosure.
[0054] As shown in the reference figure, the static storage unit 110 and the security processing unit 101 are coupled to the on-chip bus 102, and the main processing unit 108 and the high-speed memory 104 are coupled to the on-chip bus 107. The on-chip bus 102 and the on-chip bus 107 are two physically separated buses, which are coupled together via the communication unit 109. The advantage of this is to prevent external programs from being able to directly access the frequency modulation and voltage regulation controller. Of course, the on-chip bus 102 and the on-chip bus 107 are one bus, which does not affect the implementation of the various embodiments of the present disclosure.
[0055] The on-chip buses 102 and 107 are, for example, AXI buses. The AXI bus is the most important part of the AMBA (Advanced Microcontroller Bus Architecture) 3.0 and above protocols proposed by ARM. It is an on-chip bus oriented to high performance, high bandwidth, and low latency. The AIX bus separates the address / control and data phases, supports unaligned data transmission, and supports burst transmission and out-of-order transmission, thus meeting the requirements of ultra-high performance and complex on-chip system design.
[0056] The main processing unit 108 is responsible for reading various instructions, decoding and executing the instructions. The main processing unit 108 is also used to send frequency modulation and voltage regulation instructions to the security processing unit 101 and receive feedback information from the security processing unit 101. The security processing unit 101 has a more trusted instruction execution environment than the main processing unit 108, and its security can be achieved through a combination of software and hardware. For example, the security processing unit 101 can be set to be accessible only by the main processing unit 108 and cannot be accessed from the outside; a hardware protection mechanism is set at the input and output interfaces of the security processing unit 101, and the hardware protection mechanism is used to filter the registers of authenticated or unauthenticated data; the communication between the security processing unit 101 and the main processing unit 108 can be based on an encryption algorithm. In this embodiment, the security processing unit 101 can be dedicated to frequency and voltage configuration and frequency modulation and voltage regulation processing, and only the security processing unit 101 can directly access the frequency modulation and voltage regulation controller 103.
[0057] As shown in the figure, the frequency modulation and voltage regulation controller 103 is coupled to the on-chip bus 102. The frequency modulation and voltage regulation controller 103 is coupled to the clock management unit 105 and the power management circuit 211 located outside the chip respectively. The high-speed memory 104 is coupled to the on-chip bus 107. The on-chip bus 107 is also coupled to the interface circuit not shown, and is coupled to the external device outside the chip through the interface circuit. The external device can be, for example, an input / output device for text, audio and video and various other memories. The main processing unit 108 can access the external device outside the chip through the interface circuit. Different from the high-speed memory 104 set in the on-chip system, the memory located outside the chip can have a larger capacity but a slower speed and a lower cost. In some implementations, the high-speed memory 104 can be a static random access memory (SRAM), and the memory outside the chip is a DRAM (dynamic random access memory) and a flash memory.
[0058] As shown in the figure, the system on chip 100 is also embedded with basic software (such as embedded control system 121) and application programs (such as application program AN). Other application programs can be stored in a memory outside the system on chip 100, and these application programs can be copied to the high-speed memory 104 in the system on chip 100 through the interface circuit, or access resources on the system on chip 100 through the interface circuit.
[0059] The main processing unit 108 executes executable code from the embedded control system 121, the application AN or other applications. If the executable code contains a frequency modulation and voltage regulation instruction, the frequency modulation and voltage regulation instruction is sent to the security processing unit 101, and the security processing unit 101 generates a frequency modulation and voltage regulation instruction for the frequency modulation and voltage regulation controller according to the frequency modulation and voltage regulation instruction. The security processing unit 101 is also used to generate a frequency configuration instruction, and send the frequency configuration instruction and the frequency modulation and voltage regulation instruction to the frequency modulation and voltage regulation controller 103.
[0060] The frequency modulation and voltage regulation controller 103 generates a frequency modulation signal REGF and a voltage regulation signal REGV, sends the frequency modulation signal REGF to the clock management unit 105, and sends the voltage regulation signal REGV to the power management circuit 211. The frequency modulation and voltage regulation controller 103 is also used to send an alarm signal ALARM under abnormal conditions. In the present disclosure, the frequency modulation and voltage regulation controller 103 can be a DVFS controller or an AVFS controller.
[0061] As an implementation of the DVFS controller, the DVFS controller receives a frequency configuration instruction and a frequency and voltage modulation instruction from the on-chip bus 102, reads at least one frequency and voltage pair from the frequency configuration instruction, and stores it in the DVFS controller. At the same time, the DVFS controller obtains the target frequency from the frequency and voltage modulation instruction, compares the target frequency with each frequency and voltage pair in at least one frequency and voltage pair, and when the frequency in a certain frequency and voltage pair matches the target frequency, takes out the corresponding voltage value, generates a voltage modulation signal REGV, and sends it to the power management circuit 211, and the power management circuit 211 adjusts the power supply voltage VCPU provided to the security processing unit 101 and / or the main processing unit 108 accordingly. At the same time, the DVFS controller generates a frequency modulation signal REGF and sends it to the clock management unit 105, and the clock management unit 105 generates a clock signal FCPU for the security processing unit 101 and / or the main processing unit 108. It should be noted that the frequency and voltage correspondence in the frequency configuration instruction is a frequency and voltage pair that has been verified to enable the on-chip system 100 to work normally.
[0062] As an implementation of the AVFS controller, the AVFS controller receives a frequency configuration instruction and a frequency and voltage modulation instruction from the on-chip bus 102, reads at least one frequency from the frequency configuration instruction, and stores it in the AVFS controller. At the same time, the AVFS controller obtains the target frequency from the frequency and voltage modulation instruction, compares the target frequency with at least one frequency, and when a certain frequency matches the target frequency, calculates the voltage value according to the measured real-time temperature and the target frequency, generates a voltage regulation signal REGV according to the voltage value, and sends it to the power management circuit 211, and the power management circuit 211 adjusts the power supply voltage VCPU provided to the security processing unit 101 and / or the main processing unit 108 accordingly. At the same time, the AVFS controller generates a frequency modulation signal REGF according to the target frequency and sends it to the clock management unit 105, and the clock management unit 105 generates a clock signal FCPU for the security processing unit 101 and / or the main processing unit 108. It should be pointed out that at least one frequency included in the frequency configuration instruction should be a frequency point that has been verified to enable the on-chip system 100 to work normally.
[0063] Optionally, the frequency configuration instructions only come from the system program burned into the static storage unit 110, wherein programs, such as the embedded control system 121 and the application AN, do not use the frequency configuration instructions. The system program can be executed in the startup phase after the security processing unit 101 is powered on. The advantage of doing so is that since various interface circuits may not be working properly at this time, it is less likely for external attack software to damage the frequency configuration instructions. For the DVFS controller, multiple frequency-voltage pairs may also be stored in the static storage unit 110. When the system program is executed, the multiple frequency-voltage pairs in the static storage unit 110 are read to generate frequency configuration commands. For the AVFS controller, multiple frequencies may be stored in the static storage unit 110. When the system program is executed, the multiple frequencies in the static storage unit 110 are read to generate frequency configuration commands.
[0064] The frequency and voltage regulation instructions can be generated according to the frequency and voltage regulation indications sent by the main processing unit 108. For example, the embedded control system 121 includes the following functions: regularly collect signals related to the system load and calculate the current system load; then predict the performance required by the system in the next time period based on the current load of the system; then convert the predicted performance into the required frequency, and then call the system interface to modify the processor's clock frequency to the required frequency and modify the power supply voltage at the same time. In this process, when the system interface is executed by the main processing unit 108, a frequency and voltage regulation indication is generated for the security processing unit 101. For another example, the main processing unit 108 generates a frequency and voltage regulation indication when executing the executable code in the application AN or other external programs.
[0065] Optionally, the security processing unit 101 is also used to determine whether the frequency modulation and voltage regulation indication is a security instruction, and if the frequency modulation and voltage regulation indication is a security instruction, generate a frequency modulation and voltage regulation instruction, and if it is a non-security instruction, start the protection mechanism for the frequency modulation and voltage regulation controller 103, for example, lock the frequency modulation and voltage regulation controller 103, or send an alarm message to the main processing unit 108. The security processing unit 101 has multiple ways to determine the security instruction. For example, an instruction containing a set tag is used as a security instruction. For another example, whether the instruction is a security instruction is determined based on the type of digital signature or encryption algorithm contained in the instruction.
[0066] Figure 2 FIG. 2 is a schematic diagram of a system on chip 200 provided in another embodiment of the present disclosure. Figure 1 The difference is that in Figure 2 In the embodiment, the power management circuit 211 is arranged inside the system on chip, and the frequency modulation and voltage regulation controller 103 is integrated inside the security processing unit 101 .
[0067] Figure 3 and Figure 4 yes Figure 1or Figure 2 A structural schematic diagram of an exemplary embodiment of a frequency and voltage modulation controller in FIG. Figure 3 A DVFS controller is shown. As shown in the figure, register F is used to store the target frequency. Register group FV is used to store multiple frequency voltage pairs. Multiple comparators 403 are used to compare the target frequency in register F with the frequency voltage in register group FV. If they match, the voltage generation unit 402 generates a voltage regulation signal REGV, and the frequency conversion generation unit 401 generates a frequency modulation signal FCPU. If the error detection unit 404 detects that the target frequency does not match the frequency in any frequency voltage pair, the interrupt generation unit 405, the reset generation unit 406 or the bus response unit 407 generates an interrupt signal SINT, a reset signal RESET or a bus error signal SBUS. The interrupt signal SINT is processed by an interrupt controller (not shown in the figure). The interrupt controller can be set inside the security processing unit 101 or the main processing unit 108. The interrupt controller defines various processing routines for various interrupt signals. When the corresponding interrupt signal occurs, the corresponding processing routine is started to perform the corresponding processing. The reset signal RESET will be sent to the reset circuit (not shown), and the reset circuit will reset the system on chip and restart it. The bus error signal SBUS will be sent to the on-chip bus 102 for processing.
[0068] Figure 4 As shown in the figure, the AVFS controller 450 includes a register group for storing a frequency point table 451, a voltage calculation unit 452, a temperature sensor controller 453, a process sensor controller 454 and a voltage sensor controller 455. The frequency point table 451 includes a plurality of frequencies, which are generated by the AVFS controller 450 according to the frequency configuration instruction.
[0069] The temperature sensor controller 453 and the temperature sensor 456 are coupled to form a temperature sensor assembly, the process sensor controller 454 and the process sensor 457 are coupled to form a process sensor assembly, and the voltage sensor controller 455 and the voltage sensor 458 are coupled to form a voltage sensor assembly. The temperature sensor 456, the process sensor 457 and the voltage sensor 458 are located inside the system on chip but outside the AVFS controller 450. The sensor controllers 453-455 collect the real-time temperature, process deviation and real-time voltage of the system on chip through the temperature sensor 456, the process sensor 457 and the voltage sensor 458.
[0070] The voltage calculation unit 452 calculates the supply voltage provided to the system on chip according to the target frequency in the frequency and voltage modulation instruction, the real-time temperature of the system, and the process deviation, and provides a voltage regulation signal to the power management circuit 211 according to the supply voltage. When calculating the supply voltage, the voltage calculation unit 452 determines the supply voltage according to the real-time temperature and process deviation of the system based on a predefined voltage calculation rule, or determines the supply voltage according to the real-time temperature based on a predefined voltage calculation rule and then performs a voltage bias according to the process deviation. The supply voltage calculated by the voltage calculation unit 452 can also be compared with the real-time voltage collected by the voltage sensor 458 to determine the effect of the voltage regulation operation, and the voltage calculation rule can be adjusted accordingly.
[0071] To summarize, the system on chip provided by the embodiment of the present disclosure includes a physically separated main processing unit and a security processing unit. The security processing unit is coupled to a frequency and voltage modulation controller. Only the security processing unit can generate frequency configuration instructions, while the main processing unit cannot generate frequency configuration instructions. Therefore, an external program executed by the main processing unit cannot generate frequency configuration instructions, that is, the attack software cannot configure the frequency and voltage, thereby improving the security of the frequency and voltage modulation process.
[0072] Moreover, since the frequency configuration instruction indicates the allowable range of frequency and / or voltage, even if the external program can send frequency and voltage regulation instructions to the security processing unit through the main processing unit, the clock frequency and / or supply voltage cannot be modified to a value outside the allowable range, thereby improving the safety of the frequency and voltage regulation process.
[0073] In addition, the frequency modulation and voltage regulation controller will perform an alarm process when the target frequency does not match any frequency of at least one frequency-voltage pair (or at least one frequency), thereby improving the safety of the frequency modulation and voltage regulation process.
[0074] Method for adjusting voltage and frequency according to the embodiment of the present disclosure
[0075] Figure 5 A flow chart of a method for adjusting voltage and frequency according to an embodiment of the present disclosure is shown. The method is executed by a system on a chip including a main processing unit and a security processing unit. The method can be implemented by hardware, software, or a combination of hardware and software. As shown in the figure, the method includes the following steps.
[0076] In step S501, the main processing unit sends a frequency and voltage modulation instruction.
[0077] In step S502, the security processing unit generates a frequency configuration instruction, and generates a frequency and voltage regulation instruction upon receiving a frequency and voltage regulation indication.
[0078] In step S503, the frequency modulation and voltage regulation controller performs frequency and voltage configuration operations according to the frequency configuration instruction, and adjusts the clock frequency and supply voltage according to the frequency modulation and voltage regulation instruction.
[0079] In this embodiment, the security processing unit has a more trusted instruction execution environment than the main processing unit, and the security of the security processing unit can be achieved through software and hardware. For example, the security processing unit can be set to be accessible only by the main processing unit and cannot be accessed from the outside; a hardware protection mechanism is set at the input and output interfaces of the security processing unit, and the hardware protection mechanism is used to filter the registers of authenticated or unauthenticated data; the communication between the security processing unit and the main processing unit 108 can be based on an encryption algorithm, etc.
[0080] In this embodiment, the frequency configuration instruction is generated by the security processing unit to ensure system safety. For example, the security processing unit may generate the frequency configuration instruction during the initialization phase after the system is powered on.
[0081] In this embodiment, the frequency and voltage modulation instructions can be generated by the security processing unit, but the security processing unit can generate the frequency and voltage modulation instructions according to the frequency and voltage modulation indications sent by the main processing unit, or the security processing unit can determine the generation time of the frequency and voltage modulation instructions by itself.
[0082] Furthermore, the safety processing unit determines whether the frequency and voltage modulation indication is a safety instruction according to whether the frequency and voltage modulation indication has a specific tag.
[0083] Furthermore, when the safety processing unit determines that the frequency and voltage regulation instruction is a non-safe instruction, it starts a protection mechanism for the frequency and voltage regulation controller. The protection mechanism, for example, locks the frequency and voltage regulation controller, or sends an alarm to the main processing unit and refuses to perform the frequency and voltage regulation operation.
[0084] Specific Applications of System-on-Chip
[0085] Figure 6 The general computer architecture used in the embodiments of the present disclosure is shown. As shown in the figure, the computer system 600 may include one or more processors 12 and a memory 14. The system on chip provided in the above embodiments may be used as the processor 12.
[0086] The memory 14 in the computer system 600 may be a main memory (hereinafter referred to as main memory or internal memory), which is used to store instruction information and / or data information represented by data signals, such as storing data (such as calculation results) provided by the processor 12, and may also be used to implement data exchange between the processor 12 and an external storage device 16 (also referred to as auxiliary memory or external memory).
[0087] In some cases, the processor 12 may need to access the memory 14 to obtain data in the memory 14 or modify the data in the memory 14. Since the access speed of the memory 14 is slow, in order to alleviate the speed gap between the processor 12 and the memory 14, the computer system 600 also includes a cache memory 18 coupled to the bus 11, and the cache memory 18 is used to cache some program data or message data in the memory 14 that may be repeatedly called. The cache memory 18 is implemented by a storage device of the type of static random access memory (SRAM) for example. The cache memory 18 can be a multi-level structure, such as a three-level cache structure with a first-level cache (L1Cache), a second-level cache (L2Cache) and a third-level cache (L3Cache), or a cache structure of more than three levels or other types of cache structures. In some embodiments, a portion of the cache memory 18 (such as a first-level cache, or a first-level cache and a second-level cache) can be integrated inside the processor 12 or integrated with the processor 12 in the same system on a chip.
[0088] Based on this, the processor 12 may include an instruction execution unit 123, a memory management unit 122 and other parts. The instruction execution unit 123 initiates a write access request when executing some instructions that need to modify the memory. The write access request specifies the write data and the corresponding physical address that need to be written into the memory; the memory management unit 122 is used to translate the virtual addresses specified by these instructions into the physical addresses mapped by the virtual addresses. The physical address specified by the write access request may be consistent with the physical address specified by the corresponding instruction.
[0089] The information exchange between the memory 14 and the cache memory 18 is usually organized in blocks. In some embodiments, the cache memory 18 and the memory 14 can be divided into data blocks according to the same spatial size, and the data block can be used as the minimum unit of data exchange between the cache memory 18 and the memory 14 (including one or more data of a preset length). For the sake of simplicity and clarity, the data blocks in the cache memory 18 are referred to as cache blocks (which can be called cache lines or cache lines), and different cache blocks have different cache block addresses; the data blocks in the memory 14 are referred to as memory blocks, and different memory blocks have different memory block addresses. The cache block address includes, for example, a physical address tag for locating the data block.
[0090] Due to space and resource limitations, the cache memory 18 cannot cache all the contents in the memory 14, that is, the storage capacity of the cache memory 18 is usually smaller than that of the memory 14, and the cache block addresses provided by the cache memory 18 cannot correspond to all the memory block addresses provided by the memory 14. When the processor 12 needs to access the memory, it first accesses the cache memory 18 via the bus 11 to determine whether the content to be accessed has been stored in the cache memory 18. If so, the cache memory 18 hits, and the processor 12 directly calls the content to be accessed from the cache memory 18; if the content that the processor 12 needs to access is not in the cache memory 18, the cache memory 18, the processor 12 needs to access the memory 14 via the bus 11 to find the corresponding information in the memory 14. Because the access rate of the cache memory 18 is very fast, when the cache memory 18 hits, the efficiency of the processor 12 can be significantly improved, thereby improving the performance and efficiency of the entire computer system 600.
[0091] In addition, the computer system 600 may also include input / output devices such as a storage device 16, a display device 13, an audio device 19, and a mouse / keyboard 15. The storage device 16 is, for example, a hard disk, an optical disk, a flash memory, and other devices for information access coupled to the bus 11 through a corresponding interface. The display device 13 is, for example, coupled to the bus 11 through a corresponding graphics card, and is used to display according to a display signal provided by the bus 11.
[0092] The computer system 600 also typically includes a communication device 17, so that it can communicate with a network or other devices in various ways. The communication device 17 may include, for example, one or more communication modules. As an example, the communication device 17 may include a wireless communication module suitable for a specific wireless communication protocol. For example, the communication device 17 may include a WLAN module for implementing Wi-FiTM communication that complies with the 802.11 standard established by the Institute of Electrical and Electronics Engineers (IEEE); the communication device 17 may also include a WWAN module for implementing wireless wide area communication that complies with cellular or other wireless wide area protocols; the communication device 17 may also include a communication module that uses other protocols, such as a Bluetooth module, or other custom types of communication modules; the communication device 17 may also be a port for serial transmission of data.
[0093] Of course, the structure of different computer systems may vary according to the motherboard, operating system and instruction set architecture. For example, many computer systems are currently provided with an input / output control center connected between the bus 11 and various input / output devices, and the input / output control center can be integrated into the processor 12 or independent of the processor 12.
[0094] Figure 7 701 is a structural diagram of an embedded system used in the embodiment of the present disclosure. The system on chip provided in the above embodiment can be used as the processor 701.
[0095] Although embedded systems are highly similar to computer systems in hardware structure, the characteristics of embedded system applications make them quite different from general computer systems in hardware composition and implementation.
[0096] First, in order to meet the requirements of the embedded system 700 in terms of speed, volume and power consumption, the operating system, application software, special data and other data that need to be stored for a long time usually do not use storage media such as disks with large capacity and slow speed, but mostly use random access memory 702 or flash memory (Flash Memory) 703.
[0097] In addition, in the embedded system 700, an A / D (analog / digital conversion) interface 705 and a serial interface 706 are required for the needs of measurement and control, which are rarely used in general-purpose computers. The A / D interface 705 mainly completes the conversion of analog signals to digital signals and the conversion of digital signals to analog signals required in the test. When the embedded system 700 is applied to industrial production, it often needs to be tested. Since the single-chip microcomputer generates digital signals, it needs to be converted into analog signals for testing during testing. Therefore, unlike general-purpose computers, an A / D (analog / digital conversion) interface 705 is required to complete the relevant conversion. In addition, in industry, multiple embedded systems are often required to be connected in series to complete relevant functions, so a serial interface 706 is required for connecting multiple embedded systems in series, which is mostly not required in general-purpose computers.
[0098] In addition, as a basic processing unit, the embedded system 700 often needs to connect multiple embedded systems 700 into a network in industrial design, so it is necessary to connect the embedded system 700 to the network interface 707. This is also not required in general-purpose computers. In addition, according to the actual application and scale, some embedded systems 700 need to use external buses 704. With the rapid expansion of the application field of embedded systems 700, embedded systems 700 are becoming more and more personalized, and the types of buses used according to their own characteristics are also increasing. In addition, in order to test the internal circuits of the embedded processor 701, the processor chip generally adopts boundary scan test technology. In order to adapt to this test, a debugging interface 708 is adopted.
[0099] With the rapid development of very large scale integration (VLSI) and semiconductor technology, part or all of the above embedded systems can be implemented on a silicon chip, namely, an embedded system on chip (SoC).
[0100] The commercial value of the disclosed embodiments
[0101] The system-on-chip provided by the embodiment of the present disclosure reduces system power consumption while ensuring the safety of frequency and voltage modulation operations by setting a security processing unit dedicated to frequency configuration. It can be used to form computing devices used in various scenarios, such as a large number of cloud servers in a data center. In this scenario, the power consumption of each cloud server is reduced by reducing the power consumption of the processor, thereby reducing the operating cost of each cloud server and the entire data center. For example, electronic devices used in daily life, including terminal devices such as notebooks and mobile phones and certain consumer electronic products, can improve the system battery life of electronic devices by reducing power consumption, thereby improving user experience. It can be seen that the system-on-chip of the embodiment of the present disclosure and the computing device constructed by the system-on-chip have commercial value and economic value on the basis of practical value.
[0102] Those skilled in the art will appreciate that the present disclosure may be implemented as systems, methods, and computer program products. Therefore, the present disclosure may be specifically implemented in the following forms, namely complete hardware, complete software (including firmware, resident software, microcode), and may also be implemented in the form of a combination of software and hardware. In addition, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0103] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media include: an electrical connection of one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this article, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by a processing unit, a device or a device, or used in combination with the program.
[0104] Computer readable signal media may include data signals propagated in baseband or as part of a chopped wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any other suitable combination. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction system, apparatus, or device.
[0105] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., and any suitable combination of the foregoing.
[0106] The computer program code for executing the disclosed embodiments may be written in one or more programming languages or combinations. The programming languages include object-oriented programming languages, such as JAVA, C++, and may also include conventional procedural programming languages, such as C. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0107] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A system on a chip, include: A main processing unit, used for sending frequency and voltage modulation instructions to the safety processing unit; a safety processing unit, configured to generate a frequency configuration instruction, and upon receiving the frequency and voltage modulation instruction, determine whether the frequency and voltage modulation instruction is a safety instruction according to whether the frequency and voltage modulation instruction has a specific tag, and generate a frequency and voltage modulation instruction if the frequency and voltage modulation instruction is a safety instruction; A frequency modulation and voltage regulation controller, used to perform frequency and voltage configuration according to the frequency configuration instruction, and to adjust the clock frequency and supply voltage according to the frequency modulation and voltage regulation instruction; The on-chip bus is used to couple the main processing unit, the security processing unit and the frequency and voltage regulation controller.
2. The system on chip according to claim 1, in, The frequency and voltage regulation controller is a DVFS controller or an AVFS controller.
3. The system on chip according to claim 2, in, The DVFS controller is used to: configure at least one frequency-voltage pair according to the frequency configuration instruction, and when a target frequency of the frequency and voltage modulation instruction matches a first frequency in the at least one frequency-voltage pair, adjust the clock frequency based on the first frequency, and adjust the supply voltage based on a voltage corresponding to the first frequency.
4. The system on chip according to claim 2, in, The AVFS controller is also coupled to a sensor component, which is used to obtain detection data. The AVFS controller is used to configure at least one frequency according to the frequency configuration instruction, and when the target frequency in the frequency and voltage modulation instruction matches the first frequency of the at least one frequency, adjust the clock frequency based on the first frequency, and determine the supply voltage based on the detection data and the first frequency.
5. The system on chip according to claim 1, in, When the safety processing unit determines that the frequency and voltage regulation instruction is a non-safety instruction, it starts a protection mechanism for the frequency and voltage regulation controller.
6. The system on chip according to claim 5, in, The protection mechanism is: locking the frequency and voltage regulation controller; and sending an alarm to the main processing unit.
7. The system on chip according to claim 3, in, The DVFS controller includes: A plurality of register groups for storing at least one frequency-voltage pair; A frequency conversion register, used for storing the target frequency; a comparator, configured to compare the target frequency with the at least one frequency-voltage pair, respectively, and output a result signal; A frequency conversion generating unit, used for generating a frequency modulation signal according to the result signal; A voltage generating unit is used to generate a voltage regulating signal according to the result signal.
8. The system on chip according to claim 7, in, The DVFS controller further includes: An interrupt generation unit, used for generating an interrupt signal; A reset generating unit, used for generating a reset signal; A bus response unit, configured to generate a bus error signal; The error detection unit is used to sample the result signal and instruct one of the interrupt generation unit, the reset generation unit and the bus response unit to start according to the result signal.
9. The system on chip according to claim 4, in, The AVFS controller comprises: A temperature sensor controller, used for obtaining real-time temperature from a temperature sensor; A process sensor controller, used for acquiring a process deviation from a process sensor; A voltage sensor controller, used for obtaining real-time voltage from a voltage sensor; A voltage calculation unit is used to calculate the supply voltage according to the real-time temperature, process deviation and the first frequency.
10. The system on chip according to claim 9, in, The temperature sensor, the process sensor, and the voltage sensor are located inside the system on chip but outside the AVFS controller.
11. The system on chip according to claim 1, in, The on-chip bus includes a first bus and a second bus, the first bus is coupled to the main processing unit, the second bus is coupled to the security processing unit, and the first bus and the second bus are coupled by a communication unit.
12. A method for regulating voltage and frequency, include: The main processing unit sends frequency and voltage modulation instructions; The safety processing unit generates a frequency configuration instruction, and upon receiving the frequency and voltage modulation instruction, determines whether the frequency and voltage modulation instruction is a safety instruction according to whether the frequency and voltage modulation instruction has a specific tag, and generates a frequency and voltage modulation instruction if the frequency and voltage modulation instruction is a safety instruction; and The frequency modulation and voltage regulation controller performs frequency and voltage configuration operations according to the frequency configuration instructions, and adjusts the clock frequency and the supply voltage according to the frequency modulation and voltage regulation instructions.
13. A computing device, include: The system on chip according to any one of claims 1 to 11; Off-chip bus; a storage device coupled to the system on chip via the off-chip bus; A power management circuit is coupled to the frequency and voltage regulation controller in the system on chip.
