riscv / riscv-aia

https://jira.riscv.org/browse/RVG-59
Creative Commons Attribution 4.0 International
81 stars 19 forks source link

Add time capture support to ACLINT #35

Closed sebhub closed 2 years ago

sebhub commented 2 years ago

The ACLINT (Advanced Core Local Interruptor) has a Machine-level Timer Device (MTIMER). It is hard to synchronize the MTIMER with an external reference clock. What would help if the MTIMER had a time capture mechanism which can be triggered by an external signal (for example a pulse-per-second signal). When the external capture signal arrives, the current timer value should be stored to a time capture register, a capture status flag should be set, and an interrupt should be generated (if enabled). If the capture status flag is already set, then a capture overflow status flag should be set. The captured time can be used by time synchronization algorithms to synchronize the MTIMER with an external reference clock, see for example RFC 2783

jhauser-us commented 2 years ago

Wrong GitHub repository. The ACLINT repository is here: https://github.com/riscv/riscv-aclint