• generic timer


    1.Introduction

      The Generic Timer in the Armv8-A can schedule events and trigger interrupts based on an incrementing counter value. It provides:

    • Generation of timer events as interrupt outputs.
    • Generation of event streams.

    1.1.The Generic Timer

    Provides a system counter, that measures the passing of time in real-time.
    Supports virtual counters that measure the passing of virtual-time. That is, a virtual counter can measure the passing of time on a particular virtual machine.
    Timers, that can trigger events after a period of time has passed. The timers:

    • Can be used as count-up or as count-down timers.
    • Can operate in real-time or in virtual-time.

      ARM generic timer的硬件block主要是SOC上的System counter(多个process共享,用来记录时间的流逝)以及附着在各个processor上的Timer(用于触发timer event)组成,其他的generic timer的硬件电路主要是用来进行交流generic time event的。例如各个processor中的timer和system counter外设进行交互,各个processor中的timer进行信息交互。System counter的功能很简单,就是计算输入时钟已经过了多少个clock,开始的时候是0,每一个clock,System counter会加一。System counter的counter value需要分发到各个timer中,也就是说,从各个timer的角度看,system counter value应该是一致的。Timer其实就是定时器,它可以定义一段指定的时间,当时间到了,就会assert一个外部的输出信号(可以输出到GIC,作为一个interrupt source)。

      从power domain来看,ARM generic timer分成两个部分:System counter和各个Multiprocessor系统中的Timer_x、接口电路等。之所以这么分原因很明显:功耗方面(电源管理)的考量。在power saving mode下,可以shutdown各个processor系统的供电,但是可以保持system counter的供电,这样,至少系统时间可以保持住。

      和power domain类似,clock domain也是不同的,system counter和processor工作在不同的clock下,软件修改了CPU的频率也不会影响system counter的工作节奏,从而也不会改变timer的行为。
     

    2. 手册 timer关键点整理

     

  • 相关阅读:
    Qt中的信号和槽详解
    微信小程序03-文字一左一右显示,行内块元素居中
    绘画的颜料
    把jar包打到本地仓库然后上传到私服
    记录荒废了三年的四年.net开发的第一次面试
    蓝桥杯 (年号字串 C++)
    单例模式--Java
    vue2人脸检测录入
    TDD、BDD、ATDD以及SBE的概念和区别
    CLR C#--计算型异步操作
  • 原文地址:https://blog.csdn.net/xuelin273/article/details/126380759