diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-17 16:15:55 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-11-19 08:22:34 +0100 |
commit | 025ab9e08258af9e83494602917a704e4d28e6d7 (patch) | |
tree | 217ecbb0a2923bbe60ef74b448de23479ed2610a | |
parent | spec: Improve acfg specification (diff) | |
download | rtems-central-025ab9e08258af9e83494602917a704e4d28e6d7.tar.bz2 |
spec: Clarify event numbers
-rw-r--r-- | spec/rtems/event/req/event-constant.yml | 5 | ||||
-rw-r--r-- | spec/rtems/event/req/event-number.yml | 15 | ||||
-rw-r--r-- | spec/rtems/event/val/event-constant.yml | 2 | ||||
-rw-r--r-- | spec/rtems/event/val/events.yml | 6 |
4 files changed, 23 insertions, 5 deletions
diff --git a/spec/rtems/event/req/event-constant.yml b/spec/rtems/event/req/event-constant.yml index 9f0ec8e9..f030e953 100644 --- a/spec/rtems/event/req/event-constant.yml +++ b/spec/rtems/event/req/event-constant.yml @@ -72,6 +72,7 @@ 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``. + Let :math:`J\in{0, 1, ..., 31}`. The :math:`J`-th event number constant + shall be a constant expression which evaluates to the integer representation + of event number :math:`J`. type: requirement diff --git a/spec/rtems/event/req/event-number.yml b/spec/rtems/event/req/event-number.yml new file mode 100644 index 00000000..b9c5fb70 --- /dev/null +++ b/spec/rtems/event/req/event-number.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: requirement-refinement + uid: group +functional-type: function +rationale: null +references: [] +requirement-type: functional +text: | + Let :math:`J\in{0, 1, ..., 31}`. The event number :math:`J` shall be + represented by the integer :math:`2^J`. +type: requirement diff --git a/spec/rtems/event/val/event-constant.yml b/spec/rtems/event/val/event-constant.yml index 6d9e863d..1a60164a 100644 --- a/spec/rtems/event/val/event-constant.yml +++ b/spec/rtems/event/val/event-constant.yml @@ -21,6 +21,8 @@ test-actions: links: - role: validation uid: ../req/event-constant + - role: validation + uid: ../req/event-number - 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 f00276ad..f3bb1e38 100644 --- a/spec/rtems/event/val/events.yml +++ b/spec/rtems/event/val/events.yml @@ -7,11 +7,11 @@ test-actions: - action-brief: | Run the event constant and number test for all 32 event constants. action-code: | - int i; + unsigned int i; for ( i = 0; i < 32; ++i ) { ${event-constant:/test-run}( events[ i ], i ); - T_step( (unsigned int) i ); /* ${steps/32} */ + T_step( i ); /* ${steps/32} */ } checks: [] links: [] @@ -105,7 +105,7 @@ test-support: | RTEMS_EVENT_28, RTEMS_EVENT_29, RTEMS_EVENT_30, - RTEMS_EVENT_31, + RTEMS_EVENT_31 }; test-target: testsuites/validation/tc-events.c test-teardown: null |