Fixed_point
Newbie level 3
Has anyone come up with a good way of describing a state machine in requirements without access to the state signals, e.g. so it is directly testable?
For instance
1) The state machine shall change state from state A to state B when Z = 1.
2) When in state B, output C shall be set to 1
When writing a test for these requirements you would have a test procedure like:
1) Reset
2) Set Z = 0
3) Check C is 0
4) Set Z = 1
5) Check C is 1
This only implies that you are in state B, but does not directly test it, as C=1 could also be set in some other state (not described above). Is there a better way of writing the requirements so that you can test them without giving the test module access to the state machine state signals?
For instance
1) The state machine shall change state from state A to state B when Z = 1.
2) When in state B, output C shall be set to 1
When writing a test for these requirements you would have a test procedure like:
1) Reset
2) Set Z = 0
3) Check C is 0
4) Set Z = 1
5) Check C is 1
This only implies that you are in state B, but does not directly test it, as C=1 could also be set in some other state (not described above). Is there a better way of writing the requirements so that you can test them without giving the test module access to the state machine state signals?