statechart_fig8_counter.xml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" ?>
  2. <statechart>
  3. <!-- day & atlee dictates "whole", had to add "next_small_step" myself-->
  4. <semantics
  5. input_event_lifeline="whole"
  6. internal_event_lifeline="next_small_step"/>
  7. <inport name="in">
  8. <event name="tk0"/>
  9. </inport>
  10. <outport name="out">
  11. <event name="done"/>
  12. </outport>
  13. <root>
  14. <parallel id="Counter">
  15. <state id="Bit_1" initial="Bit_11">
  16. <state id="Bit_11">
  17. <transition event="tk0" target="../Bit_12"/>
  18. </state>
  19. <state id="Bit_12">
  20. <transition event="tk0" target="../Bit_11">
  21. <raise event="tk1"/>
  22. </transition>
  23. </state>
  24. </state>
  25. <state id="Bit_2" initial="Bit_21">
  26. <state id="Bit_21">
  27. <transition event="tk1" target="../Bit_22"/>
  28. </state>
  29. <state id="Bit_22">
  30. <transition event="tk1" target="../Bit_21">
  31. <raise event="done"/>
  32. </transition>
  33. </state>
  34. </state>
  35. </parallel>
  36. </root>
  37. </statechart>