summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-13 13:31:06 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-10-13 13:34:09 +0200
commit7a6feb3b1a70c4a99f2068f61deacbdfb911e616 (patch)
tree20d32a3bd9ead46c43025bf259795a0d5a97302f
parentmodules: Update rtems (diff)
downloadrtems-central-7a6feb3b1a70c4a99f2068f61deacbdfb911e616.tar.bz2
spec: Refine timecounter tick
-rw-r--r--spec/score/timecounter/req/tick-large-delta.yml17
-rw-r--r--spec/score/timecounter/val/install.yml28
2 files changed, 45 insertions, 0 deletions
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 00000000..bb5cda02
--- /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 82684e72..f9b99a23 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