rpigpio.awlpro 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <!-- Awlsim project file generated by awlsim-0.69.0-pre -->
  3. <awlsim_project date_create="2016-03-16 00:00:00.000000"
  4. date_modify="2019-01-15 19:06:25.218935"
  5. format_version="1">
  6. <!-- CPU core configuration -->
  7. <cpu>
  8. <!-- CPU core feature specification -->
  9. <specs call_stack_size="256"
  10. nr_accus="2"
  11. nr_counters="256"
  12. nr_flags="2048"
  13. nr_inputs="128"
  14. nr_localbytes="1024"
  15. nr_outputs="128"
  16. nr_timers="256"
  17. parenthesis_stack_size="7" />
  18. <!-- CPU core configuration -->
  19. <config clock_memory_byte="-1"
  20. cycle_time_limit_us="1000000"
  21. ext_insns_enable="1"
  22. mnemonics="0"
  23. ob_startinfo_enable="0"
  24. run_time_limit_us="-1" />
  25. </cpu>
  26. <!-- AWL/STL language configuration -->
  27. <language_awl>
  28. <!-- AWL/STL source code -->
  29. <source enabled="1"
  30. name="main"
  31. type="0"><![CDATA[
  32. ORGANIZATION_BLOCK OB 1
  33. BEGIN
  34. // This test only works with the fake RPi.GPIO module
  35. // that directly wires outputs to inputs.
  36. L MW 0
  37. L 0
  38. ==I
  39. SPB zero
  40. L EW 16
  41. __ASSERT== __ACCU 1, W#16#0302
  42. SPA out
  43. zero: L EW 16
  44. __ASSERT== __ACCU 1, W#16#0000
  45. SPA out
  46. out: L MW 0
  47. XOW W#16#FFFF
  48. T MW 0
  49. T AW 16
  50. L MW 16
  51. + 1
  52. T MW 16
  53. L 32
  54. <I
  55. BEB
  56. CALL SFC 46
  57. END_ORGANIZATION_BLOCK
  58. ORGANIZATION_BLOCK OB 100
  59. BEGIN
  60. // Test direct-I/O
  61. // This test only works with the fake RPi.GPIO module
  62. // that directly wires outputs to inputs.
  63. // Only E16.0, E16.1 and E17.1 are used in hw config.
  64. // All other bits read as 0.
  65. L PEW 16
  66. __ASSERT== __ACCU 1, W#16#0000
  67. L PEB 16
  68. __ASSERT== __ACCU 1, W#16#00
  69. L PEB 17
  70. __ASSERT== __ACCU 1, W#16#00
  71. L W#16#FFFF
  72. T PAW 16
  73. L PEW 16
  74. __ASSERT== __ACCU 1, W#16#0302
  75. L PEB 16
  76. __ASSERT== __ACCU 1, W#16#03
  77. L PEB 17
  78. __ASSERT== __ACCU 1, W#16#02
  79. L 0
  80. T PAB 16
  81. L PEW 16
  82. __ASSERT== __ACCU 1, W#16#0002
  83. L PEB 16
  84. __ASSERT== __ACCU 1, W#16#00
  85. L PEB 17
  86. __ASSERT== __ACCU 1, W#16#02
  87. L 0
  88. T PAB 17
  89. L PEW 16
  90. __ASSERT== __ACCU 1, W#16#0000
  91. L PEB 16
  92. __ASSERT== __ACCU 1, W#16#00
  93. L PEB 17
  94. __ASSERT== __ACCU 1, W#16#00
  95. // Initialize state for OB 1
  96. L 0
  97. T MW 0
  98. T MW 16
  99. T AW 16
  100. END_ORGANIZATION_BLOCK
  101. ]]></source>
  102. </language_awl>
  103. <!-- Symbol table configuration -->
  104. <symbols>
  105. <!-- symbol table source code -->
  106. <source enabled="1"
  107. name="Main table"
  108. type="3"><![CDATA[
  109. ]]></source>
  110. </symbols>
  111. <!-- Core server link configuration -->
  112. <core_link>
  113. <!-- Locally spawned core server -->
  114. <spawn_local enable="1"
  115. interpreters="$DEFAULT"
  116. port_range_begin="4183"
  117. port_range_end="8278" />
  118. <!-- Remote server connection -->
  119. <connect host="localhost"
  120. port="4151"
  121. timeout_ms="3000" />
  122. <!-- Transport tunnel -->
  123. <tunnel local_port="-1"
  124. type="0">
  125. <ssh executable="ssh"
  126. port="22"
  127. user="pi" />
  128. </tunnel>
  129. </core_link>
  130. <!-- Hardware modules configuration -->
  131. <hardware>
  132. <!-- Loaded hardware module -->
  133. <module name="rpigpio">
  134. <params>
  135. <param name="I0.0"
  136. value="BCM0" />
  137. <param name="I0.1"
  138. value="BCM1" />
  139. <param name="I1.1"
  140. value="BCM2" />
  141. <param name="Q0.0"
  142. value="BCM0" />
  143. <param name="Q0.1"
  144. value="BCM1" />
  145. <param name="Q1.1"
  146. value="BCM2" />
  147. <param name="enabled"
  148. value="True" />
  149. <param name="inputAddressBase"
  150. value="16" />
  151. <param name="outputAddressBase"
  152. value="16" />
  153. </params>
  154. </module>
  155. </hardware>
  156. <!-- Graphical user interface configuration -->
  157. <gui>
  158. <!-- AWL editor settings -->
  159. <editor autoindent="1"
  160. paste_autoindent="1"
  161. validation="1" />
  162. </gui>
  163. </awlsim_project>