[rtems-central commit] spec: Refine timecounter tick
Sebastian Huber
sebh at rtems.org
Wed Oct 13 11:31:14 UTC 2021
Module: rtems-central
Branch: master
Commit: 7a6feb3b1a70c4a99f2068f61deacbdfb911e616
Changeset: http://git.rtems.org/rtems-central/commit/?id=7a6feb3b1a70c4a99f2068f61deacbdfb911e616
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Oct 13 13:31:06 2021 +0200
spec: Refine timecounter tick
---
spec/score/timecounter/req/tick-large-delta.yml | 17 +++++++++++++++
spec/score/timecounter/val/install.yml | 28 +++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/spec/score/timecounter/req/tick-large-delta.yml b/spec/score/timecounter/req/tick-large-delta.yml
new file mode 100644
index 0000000..bb5cda0
--- /dev/null
+++ b/spec/score/timecounter/req/tick-large-delta.yml
@@ -0,0 +1,17 @@
+SPDX-License-Identifier: CC-BY-SA-4.0
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: requirement-refinement
+ uid: group
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+ While the oldest timehand was not updated for one second or more, while the
+ time interval from the time point of the timehand to the time point of the
+ update is measureable with the timecounter of the timehand, the time point of
+ the timehand shall be incremented by the time interval.
+type: requirement
diff --git a/spec/score/timecounter/val/install.yml b/spec/score/timecounter/val/install.yml
index 82684e7..f9b99a2 100644
--- a/spec/score/timecounter/val/install.yml
+++ b/spec/score/timecounter/val/install.yml
@@ -753,6 +753,33 @@ test-actions:
- role: validation
uid: /rtems/clock/req/get-monotonic
links: []
+- action-brief: |
+ Update the oldest timehand after a large time interval.
+ action-code: |
+ Timecounter *tc;
+ Per_CPU_Control *cpu_self;
+ struct bintime bt;
+
+ tc = &high_quality_high_frequency;
+
+ SetCounter( tc, 0 );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993600 );
+ T_eq_u64( bt.frac, 103079215104 );
+
+ SetCounter( tc, 2 * tc->base.tc_frequency );
+ cpu_self = _Thread_Dispatch_disable();
+ rtems_timecounter_tick();
+ _Thread_Dispatch_enable( cpu_self );
+
+ SetCounter( tc, 2 * tc->base.tc_frequency );
+ rtems_clock_get_realtime_bintime( &bt );
+ T_eq_i64( bt.sec, 567993602 );
+ T_eq_u64( bt.frac, 103079215104 );
+ checks: []
+ links:
+ - role: validation
+ uid: ../req/tick-large-delta
test-brief: |
Tests timecounter installation related functions and directives of the Clock
Manager.
@@ -764,6 +791,7 @@ test-includes:
- rtems.h
- rtems/timecounter.h
- rtems/score/atomic.h
+- rtems/score/threaddispatch.h
test-local-includes:
- tx-support.h
test-setup: null
More information about the vc
mailing list