summaryrefslogtreecommitdiffstats
path: root/spec/dev/grlib/req/irqamp-get-timestamp.yml
blob: 448b55fb38a23fc565749529e73d83c6a2cea479 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
copyrights:
- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
enabled-by: true
functional-type: action
links:
- role: interface-function
  uid: ../if/irqamp-get-timestamp
post-conditions:
- name: Result
  states:
  - name: Registers
    test-code: |
      T_not_null( ctx->result );
    text: |
      The return value of ${../if/irqamp-get-timestamp:/name} shall be address
      of the timestamping register block contained in the IRQ(A)MP register
      block specified by the ${../if/irqamp-get-timestamp:/params[0]/name}
      parameter.
  - name: 'Null'
    test-code: |
      T_null( ctx->result );
    text: |
      The return value of ${../if/irqamp-get-timestamp:/name} shall be
      ${/c/if/false:/name}.
  test-epilogue: null
  test-prologue: null
pre-conditions:
- name: NumberOfTimestampRegisterSets
  states:
  - name: Zero
    test-code: |
      ctx->irqamp_regs.itstmp[ 0 ].itstmpc = 0;
    text: |
      While the number of timestamp register sets indicated by the IRQ(A)MP
      register block specified by the
      ${../if/irqamp-get-timestamp:/params[0]/name} parameter is zero.
  - name: Positive
    test-code: |
      ctx->irqamp_regs.itstmp[ 0 ].itstmpc = IRQAMP_ITSTMPC_TSTAMP( 1 );
    text: |
      While the number of timestamp register sets indicated by the IRQ(A)MP
      register block specified by the
      ${../if/irqamp-get-timestamp:/params[0]/name} parameter is positive.
  test-epilogue: null
  test-prologue: null
rationale: null
references: []
requirement-type: functional
skip-reasons: {}
test-action: |
  ctx->result = irqamp_get_timestamp_registers( &ctx->irqamp_regs );
test-brief: null
test-cleanup: null
test-context:
- brief: |
    This member contains the return value of the
    ${../if/irqamp-get-timestamp:/name} call.
  description: null
  member: |
    irqamp_timestamp *result
- brief: |
    This member contains the IRQ(A)MP register block.
  description: null
  member: |
    irqamp irqamp_regs
test-context-support: null
test-description: null
test-header: null
test-includes:
- grlib/irqamp.h
test-local-includes: []
test-prepare: null
test-setup: null
test-stop: null
test-support: null
test-target: testsuites/validation/tc-dev-grlib-irqamp-get-timestamp.c
test-teardown: null
text: ${.:text-template}
transition-map:
- enabled-by: true
  post-conditions:
    Result: Registers
  pre-conditions:
    NumberOfTimestampRegisterSets:
    - Positive
- enabled-by: true
  post-conditions:
    Result: 'Null'
  pre-conditions:
    NumberOfTimestampRegisterSets:
    - Zero
type: requirement