浅析RT1170的功耗管理之(2) -- CPU模式、SetPoint 以及 Standby

术语解释

Clock Control Module (CCM) :时钟管理,源控制、时钟频率生成
Low Power Clock Gating (LPCG) :时钟使能管理
General Power Controller (GPC):功耗模式管理,功耗模式的切换以及SP的切换,是功耗管理的核心单元
Power Management Unit (PMU):电源管理,比如DCDC, LDO
System Reset Controller (SRC):复位管理
Resource Domain Controller(RDC):资源域管理器
Unified power management interface (UPI):统一电源管理接口
State Save and Restore Controller (SSARC):状态恢复与保存
Power Gating and Memory Controller (PGMC):电源开关及内存管理器

 

CPU Mode Control (CMC)
UPI CM Mapping (UPI)
Setpoint Control (SPC)
Standby Control (SBC)


Sleep = WAIT/STOP/SUSPEND

 

系统框图

 

 

 

 

 

CPU的四种功耗模式

GPC负责模式的转换

 

 Core

 Cache 

TCM

Bus/Peripheral

Wakeup time

 RUN

active 

active

active

active

-

WAIT 

clock gated

clock gated

active

active

short

STOP 

clock gated

clock gated

clock gated

clock gated

short

SUSPEND

power gated

power gated

power gated

power gated

long

 

资源的四种属性

Private,Public,Shared,Unassigned

 

SetPoint(SP)

SP用于控制Public资源的功耗状态。

 

系统SP的管理

每个Core对应一个CMC
CMC给SPC发SP切换请求
如果不同的core请求不同的SP,需要仲裁。仲裁算法:

有点复杂,慢慢道来:
1.CPU0提供CM0_SPx_MAPPING, CPU1提供CM1_SPx_MAPPING
2.ALLOW = SP_SYS_STAT[SYS_SP_ALLOWED] = CM0_SPx_MAPPING & CM0_SPx_MAPPING.
3.进行判决
If ALLOW = 0, 非法,会触发IRQ。
If ALLOW 只有1个bit为1,则执行对应的SPx。
If ALLOW有多个bit则需要执行仲裁算法(有些复杂,而且感觉没必要)。

  • 如果ALLOW仅和SP_CPU_REQ[SP_ACCEPTED_CPUn]中的一个匹配, 则执行SP_CPU_REQ[SP_ACCEPTED_CPUn].
  • 如果ALLOW和SP_CPU_REQ[SP_ACCEPTED_CPUn]中的多个匹配, 则执行匹配的SP中高优先级的SP.
  • 如果ALLOW和SP_CPU_REQ[SP_ACCEPTED_CPUn]不匹配, 则执行ALLOW中的高优先级的SP.

Standby

从概念上说,Standby是独立于CPU模式和SP之外的一种低功耗模式。
当每个core都进入了WAIT/STOP/SUSPEND后,并且每个core都发起了Standby请求后,系统会进入Standby的模式。
进入Standby后,可以活得更低的功耗。

 

小结

RT1170的功耗状态由CPU mode,SP以及Standby共同决定。

 

posted @ 2020-10-10 14:18  nxa16038  阅读(983)  评论(0)    收藏  举报