diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-17 15:41:13 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-17 15:41:13 +0200 |
commit | e704cc1193babd25db46055a6de436be687aba18 (patch) | |
tree | 8935e59e23aee3f80232fda964bdb96f20900c80 /model | |
parent | 583ece21a3484fa4a923cfcd2d3a66828485da40 (diff) |
Add mmsubstate driver for sub-state detection evaluation
mmsubstate is a synthetic peripheral which uses a LED to create well-defined
power sub-states in select power states.
Diffstat (limited to 'model')
-rw-r--r-- | model/driver/mmsubstate.dfa | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/model/driver/mmsubstate.dfa b/model/driver/mmsubstate.dfa new file mode 100644 index 0000000..6fb0c62 --- /dev/null +++ b/model/driver/mmsubstate.dfa @@ -0,0 +1,85 @@ +codegen: + instance: moody + includes: + - driver/i2c.h + - driver/mmsubstate.h + flags: + - arch_drivers=i2c + - drivers=mmsubstate + setup: + i2c.setup(); + +parameters: + - substate_count + - substate_duration + - substate_power + - static_p1 + - static_p2 + +states: + - UNINITIALIZED + - SLEEP + - STATIC + - SUB2 + - SUB8 + - SUBVAR + +transition: + sleep: + src: [UNINITIALIZED, STATIC, SUB2, SUB8, SUBVAR] + dst: SLEEP + set_param: + substate_count: 0 + substate_duration: 0 + substate_power: 0 + noSubstates: + src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR] + dst: STATIC + arguments: + - name: power1 + values: [30, 50, 80] + parameter: static_p1 + - name: power2 + values: [30, 50, 80] + parameter: static_p2 + set_param: + substate_count: 0 + substate_duration: 0 + substate_power: 0 + twoSubstates: + src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR] + dst: SUB2 + set_param: + substate_count: 2 + arguments: + - name: switchDuration + values: [5, 10, 15, 20] + parameter: substate_duration + - name: power + values: [50, 100, 150] + parameter: substate_power + eightSubstates: + src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR] + dst: SUB8 + set_param: + substate_count: 8 + arguments: + - name: switchDuration + values: [5, 10, 15, 20] + parameter: substate_duration + - name: power + values: [50, 100, 150] + parameter: substate_power + setSubstates: + src: [SLEEP, STATIC, SUB2, SUB8, SUBVAR] + dst: SUBVAR + arguments: + - name: substateCount + values: [2, 4, 10, 12] + parameter: substate_count + - name: switchDuration + values: [5, 10, 15, 20] + parameter: substate_duration + - name: power + values: [255] + parameter: substate_power |