DCVS Duty Cycle Helper APIs with usage examples.
Header file: HAP_dcvs.h
This is the most straightforward and therefore the recommended simplified API to enable DCVS Duty Cycle.
User has to pass the context (power client identifier to be used in a HAP_power_set call) to this API. The function calls into HAP_power_set API with the provided context and selects DCVS duty cycle mode via HAP_power_set_DCVS_v3 request type. User optionally can provide max_active_time and periodicity. The DCVS algorithm selects appropriate operating levels to keep the activity time within the provided maximum allowed time and uses periodicity as a hint while predicting activity.
User does not need to specify any clock corners, the DCVS algorithm will select appropriate clock corners based on performance power tradeoff and max_active_time, periodicity if provided by user.
Below example shows usage of HAP_set_dcvs_v3_duty_cycle API.
Here DCVS Duty cycle starts with NOM as active corner and LOW SVS (SVS2) corner for idle cycle. After observing active time more than user defined max active time (10ms), the DCVS algorithm increases the clock to next level NOM PLUS to attain active time <=10ms.
This API is useful in setting the max_active_time and periodicity in an existing DCVS request structure.
User can set the DCVS params as per application requirement in DCVS request structure with request type set to HAP_power_set_DCVS_v3 and pass it as an argument to this function.
This API sets the user given max_active_time and periodicity in the given request structure. After invoking this function, user will have to call HAP_power_set() using the same request structure.
Here DCVS duty cycle apply LOW SVS (SVS2) for idle cycle and active cycle corner in the range of Max to Target (TURBO PLUS to NOM PLUS) to maintain the user given max_active_time (20ms).
This API helps to select core clock frequency level within target voltage corner.
By default, the highest core clock frequency available at the requested target corner is selected. Using this API, user can select either the highest (HAP_DCVS_CLK_PERF_HIGH) or the lowest (HAP_DCVS_CLK_PERF_LOW) core clock frequency at any given target corner. If there is only one core clock frequency available at the requested target corner, both the high and low settings will select the same.
User can set the DCVS params as per application requirement in DCVS request structure with request type set to HAP_power_set_DCVS_v3 and pass the same as an arguement to this function along with perf_mode arguement which specifies the core clock frequency level (HAP_DCVS_CLK_PERF_HIGH/HAP_DCVS_CLK_PERF_LOW).
This API sets the user provided perf_mode for core clock in the given request structure. After invoking this function, user will have to call HAP_power_set() using the same request structure.
Here DCVS will vote for minimum available core clock frequency at NOM target corner.
This API helps to select bus clock frequency level within target voltage corner.
By default, the highest bus clock frequency available at the requested target corner is selected. Using this API, user can select either the highest (HAP_DCVS_CLK_PERF_HIGH) or the lowest (HAP_DCVS_CLK_PERF_LOW) bus clock frequency at any given target corner. If there is only one bus clock frequency available at the requested target corner, both the high and low settings will select the same.
User can set the DCVS params as per application requirement in DCVS request structure with request type set to HAP_power_set_DCVS_v3 and pass the same as an arguement to this function along with perf_mode arguement which specifies the bus clock frequency level (HAP_DCVS_CLK_PERF_HIGH/HAP_DCVS_CLK_PERF_LOW).
This API sets the user provided perf_mode for bus clock in the given request structure. After invoking this function, user will have to call HAP_power_set() using the same request structure.
Here DCVS will vote for minimum available bus clock frequency at TURBO target corner.