[rtems-central commit] spec: Add event manager requirements

Sebastian Huber sebh at rtems.org
Fri May 28 12:42:06 UTC 2021


Module:    rtems-central
Branch:    master
Commit:    2330afe965511e43c6e0da8e08ad980611b592b3
Changeset: http://git.rtems.org/rtems-central/commit/?id=2330afe965511e43c6e0da8e08ad980611b592b3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri May 28 14:38:08 2021 +0200

spec: Add event manager requirements

---

 spec/rtems/event/req/all-events.yml     | 26 +++++++++++
 spec/rtems/event/req/event-constant.yml | 77 +++++++++++++++++++++++++++++++++
 spec/rtems/event/req/pending-events.yml | 15 +++++++
 spec/rtems/event/val/event-constant.yml |  4 +-
 spec/rtems/event/val/events.yml         | 13 +++++-
 5 files changed, 133 insertions(+), 2 deletions(-)

diff --git a/spec/rtems/event/req/all-events.yml b/spec/rtems/event/req/all-events.yml
new file mode 100644
index 0000000..faf95bf
--- /dev/null
+++ b/spec/rtems/event/req/all-events.yml
@@ -0,0 +1,26 @@
+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: interface-function
+  uid: ../if/all-events
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ${../if/all-events:/name} constant shall be a constant expression
+  which evaluates to a value of the bitwise or of ${../if/event-00:/name},
+  ${../if/event-01:/name}, ${../if/event-02:/name}, ${../if/event-03:/name},
+  ${../if/event-04:/name}, ${../if/event-05:/name}, ${../if/event-06:/name},
+  ${../if/event-07:/name}, ${../if/event-08:/name}, ${../if/event-09:/name},
+  ${../if/event-10:/name}, ${../if/event-11:/name}, ${../if/event-12:/name},
+  ${../if/event-13:/name}, ${../if/event-14:/name}, ${../if/event-15:/name},
+  ${../if/event-16:/name}, ${../if/event-17:/name}, ${../if/event-18:/name},
+  ${../if/event-19:/name}, ${../if/event-20:/name}, ${../if/event-21:/name},
+  ${../if/event-22:/name}, ${../if/event-23:/name}, ${../if/event-24:/name},
+  ${../if/event-25:/name}, ${../if/event-26:/name}, ${../if/event-27:/name},
+  ${../if/event-28:/name}, ${../if/event-29:/name}, ${../if/event-30:/name},
+  and ${../if/event-31:/name}.
+type: requirement
diff --git a/spec/rtems/event/req/event-constant.yml b/spec/rtems/event/req/event-constant.yml
new file mode 100644
index 0000000..9f0ec8e
--- /dev/null
+++ b/spec/rtems/event/req/event-constant.yml
@@ -0,0 +1,77 @@
+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: interface-function
+  uid: ../if/event-00
+- role: interface-function
+  uid: ../if/event-01
+- role: interface-function
+  uid: ../if/event-02
+- role: interface-function
+  uid: ../if/event-03
+- role: interface-function
+  uid: ../if/event-04
+- role: interface-function
+  uid: ../if/event-05
+- role: interface-function
+  uid: ../if/event-06
+- role: interface-function
+  uid: ../if/event-07
+- role: interface-function
+  uid: ../if/event-08
+- role: interface-function
+  uid: ../if/event-09
+- role: interface-function
+  uid: ../if/event-10
+- role: interface-function
+  uid: ../if/event-11
+- role: interface-function
+  uid: ../if/event-12
+- role: interface-function
+  uid: ../if/event-13
+- role: interface-function
+  uid: ../if/event-14
+- role: interface-function
+  uid: ../if/event-15
+- role: interface-function
+  uid: ../if/event-16
+- role: interface-function
+  uid: ../if/event-17
+- role: interface-function
+  uid: ../if/event-18
+- role: interface-function
+  uid: ../if/event-19
+- role: interface-function
+  uid: ../if/event-20
+- role: interface-function
+  uid: ../if/event-21
+- role: interface-function
+  uid: ../if/event-22
+- role: interface-function
+  uid: ../if/event-23
+- role: interface-function
+  uid: ../if/event-24
+- role: interface-function
+  uid: ../if/event-25
+- role: interface-function
+  uid: ../if/event-26
+- role: interface-function
+  uid: ../if/event-27
+- role: interface-function
+  uid: ../if/event-28
+- role: interface-function
+  uid: ../if/event-29
+- role: interface-function
+  uid: ../if/event-30
+- role: interface-function
+  uid: ../if/event-31
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ``i``-the event constant shall be a constant expression which evaluates
+  to a value of two to the power of ``i``.
+type: requirement
diff --git a/spec/rtems/event/req/pending-events.yml b/spec/rtems/event/req/pending-events.yml
new file mode 100644
index 0000000..86e0509
--- /dev/null
+++ b/spec/rtems/event/req/pending-events.yml
@@ -0,0 +1,15 @@
+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: interface-function
+  uid: ../if/pending-events
+functional-type: function
+rationale: null
+references: []
+requirement-type: functional
+text: |
+  The ${../if/pending-events:/name} constant shall be a constant expression
+  which evaluates to a value of zero.
+type: requirement
diff --git a/spec/rtems/event/val/event-constant.yml b/spec/rtems/event/val/event-constant.yml
index 7b1e3b2..77ba10c 100644
--- a/spec/rtems/event/val/event-constant.yml
+++ b/spec/rtems/event/val/event-constant.yml
@@ -18,7 +18,9 @@ test-actions:
         ctx->event,
         ( (rtems_event_set) 1 ) << ctx->number
       );
-    links: []
+    links:
+    - role: validation
+      uid: ../req/event-constant
   - brief: |
       Check that the event number bit of the event constant is not set in
       RTEMS_PENDING_EVENTS.
diff --git a/spec/rtems/event/val/events.yml b/spec/rtems/event/val/events.yml
index 42ab27a..f00276a 100644
--- a/spec/rtems/event/val/events.yml
+++ b/spec/rtems/event/val/events.yml
@@ -16,6 +16,15 @@ test-actions:
   checks: []
   links: []
 - action-brief: |
+    Check that ${../if/pending-events:/name} is a constant expression which
+    evaluates to a value of zero.
+  action-code: |
+    RTEMS_STATIC_ASSERT( RTEMS_PENDING_EVENTS == 0, PENDING_EVENTS );
+  checks: []
+  links:
+  - role: validation
+    uid: ../req/pending-events
+- action-brief: |
     Calculate the value of a bitwise or of all 32 event constants.
   action-code: |
     rtems_event_set all;
@@ -31,7 +40,9 @@ test-actions:
       Check that the value is equal to RTEMS_ALL_EVENTS.
     code: |
       T_step_eq_u32( ${step}, all, RTEMS_ALL_EVENTS );
-    links: []
+    links:
+    - role: validation
+      uid: ../req/all-events
   links: []
 - action-brief: |
     Validate the Event Manager directive options.



More information about the vc mailing list