AssignmentAsExpression.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. #ifndef ASSIGNMENTASEXPRESSION_H_
  2. #define ASSIGNMENTASEXPRESSION_H_
  3. #include "sc_types.h"
  4. #include "StatemachineInterface.h"
  5. /*! \file Header of the state machine 'AssignmentAsExpression'.
  6. */
  7. class AssignmentAsExpression : public StatemachineInterface
  8. {
  9. public:
  10. AssignmentAsExpression();
  11. ~AssignmentAsExpression();
  12. /*! Enumeration of all states */
  13. typedef enum
  14. {
  15. main_region_Add,
  16. main_region_Multiply,
  17. main_region_Divide,
  18. main_region_Modulo,
  19. main_region_Shift,
  20. main_region_boolean_And,
  21. main_region_boolean_Or,
  22. main_region_boolean_Xor,
  23. main_region_Subtract,
  24. AssignmentAsExpression_last_state
  25. } AssignmentAsExpressionStates;
  26. //! Inner class for default interface scope.
  27. class DefaultSCI
  28. {
  29. public:
  30. /*! Gets the value of the variable 'a' that is defined in the default interface scope. */
  31. sc_integer get_a() const;
  32. /*! Sets the value of the variable 'a' that is defined in the default interface scope. */
  33. void set_a(sc_integer value);
  34. /*! Gets the value of the variable 'b' that is defined in the default interface scope. */
  35. sc_integer get_b() const;
  36. /*! Sets the value of the variable 'b' that is defined in the default interface scope. */
  37. void set_b(sc_integer value);
  38. /*! Gets the value of the variable 'c' that is defined in the default interface scope. */
  39. sc_integer get_c() const;
  40. /*! Sets the value of the variable 'c' that is defined in the default interface scope. */
  41. void set_c(sc_integer value);
  42. /*! Gets the value of the variable 'd' that is defined in the default interface scope. */
  43. sc_integer get_d() const;
  44. /*! Sets the value of the variable 'd' that is defined in the default interface scope. */
  45. void set_d(sc_integer value);
  46. /*! Gets the value of the variable 'e' that is defined in the default interface scope. */
  47. sc_integer get_e() const;
  48. /*! Sets the value of the variable 'e' that is defined in the default interface scope. */
  49. void set_e(sc_integer value);
  50. /*! Gets the value of the variable 'f' that is defined in the default interface scope. */
  51. sc_integer get_f() const;
  52. /*! Sets the value of the variable 'f' that is defined in the default interface scope. */
  53. void set_f(sc_integer value);
  54. /*! Gets the value of the variable 'g' that is defined in the default interface scope. */
  55. sc_integer get_g() const;
  56. /*! Sets the value of the variable 'g' that is defined in the default interface scope. */
  57. void set_g(sc_integer value);
  58. /*! Gets the value of the variable 'h' that is defined in the default interface scope. */
  59. sc_integer get_h() const;
  60. /*! Sets the value of the variable 'h' that is defined in the default interface scope. */
  61. void set_h(sc_integer value);
  62. /*! Gets the value of the variable 'i' that is defined in the default interface scope. */
  63. sc_integer get_i() const;
  64. /*! Sets the value of the variable 'i' that is defined in the default interface scope. */
  65. void set_i(sc_integer value);
  66. /*! Gets the value of the variable 'i1' that is defined in the default interface scope. */
  67. sc_integer get_i1() const;
  68. /*! Sets the value of the variable 'i1' that is defined in the default interface scope. */
  69. void set_i1(sc_integer value);
  70. /*! Gets the value of the variable 'j' that is defined in the default interface scope. */
  71. sc_integer get_j() const;
  72. /*! Sets the value of the variable 'j' that is defined in the default interface scope. */
  73. void set_j(sc_integer value);
  74. /*! Gets the value of the variable 'j1' that is defined in the default interface scope. */
  75. sc_integer get_j1() const;
  76. /*! Sets the value of the variable 'j1' that is defined in the default interface scope. */
  77. void set_j1(sc_integer value);
  78. /*! Gets the value of the variable 'k' that is defined in the default interface scope. */
  79. sc_integer get_k() const;
  80. /*! Sets the value of the variable 'k' that is defined in the default interface scope. */
  81. void set_k(sc_integer value);
  82. /*! Gets the value of the variable 'k1' that is defined in the default interface scope. */
  83. sc_integer get_k1() const;
  84. /*! Sets the value of the variable 'k1' that is defined in the default interface scope. */
  85. void set_k1(sc_integer value);
  86. /*! Gets the value of the variable 'l' that is defined in the default interface scope. */
  87. sc_integer get_l() const;
  88. /*! Sets the value of the variable 'l' that is defined in the default interface scope. */
  89. void set_l(sc_integer value);
  90. /*! Gets the value of the variable 'm' that is defined in the default interface scope. */
  91. sc_integer get_m() const;
  92. /*! Sets the value of the variable 'm' that is defined in the default interface scope. */
  93. void set_m(sc_integer value);
  94. /*! Gets the value of the variable 'n' that is defined in the default interface scope. */
  95. sc_integer get_n() const;
  96. /*! Sets the value of the variable 'n' that is defined in the default interface scope. */
  97. void set_n(sc_integer value);
  98. /*! Gets the value of the variable 'p' that is defined in the default interface scope. */
  99. sc_integer get_p() const;
  100. /*! Sets the value of the variable 'p' that is defined in the default interface scope. */
  101. void set_p(sc_integer value);
  102. /*! Gets the value of the variable 'r' that is defined in the default interface scope. */
  103. sc_integer get_r() const;
  104. /*! Sets the value of the variable 'r' that is defined in the default interface scope. */
  105. void set_r(sc_integer value);
  106. /*! Gets the value of the variable 't' that is defined in the default interface scope. */
  107. sc_integer get_t() const;
  108. /*! Sets the value of the variable 't' that is defined in the default interface scope. */
  109. void set_t(sc_integer value);
  110. /*! Gets the value of the variable 'u' that is defined in the default interface scope. */
  111. sc_integer get_u() const;
  112. /*! Sets the value of the variable 'u' that is defined in the default interface scope. */
  113. void set_u(sc_integer value);
  114. /*! Gets the value of the variable 'v' that is defined in the default interface scope. */
  115. sc_integer get_v() const;
  116. /*! Sets the value of the variable 'v' that is defined in the default interface scope. */
  117. void set_v(sc_integer value);
  118. /*! Gets the value of the variable 'w' that is defined in the default interface scope. */
  119. sc_integer get_w() const;
  120. /*! Sets the value of the variable 'w' that is defined in the default interface scope. */
  121. void set_w(sc_integer value);
  122. private:
  123. friend class AssignmentAsExpression;
  124. sc_integer a;
  125. sc_integer b;
  126. sc_integer c;
  127. sc_integer d;
  128. sc_integer e;
  129. sc_integer f;
  130. sc_integer g;
  131. sc_integer h;
  132. sc_integer i;
  133. sc_integer i1;
  134. sc_integer j;
  135. sc_integer j1;
  136. sc_integer k;
  137. sc_integer k1;
  138. sc_integer l;
  139. sc_integer m;
  140. sc_integer n;
  141. sc_integer p;
  142. sc_integer r;
  143. sc_integer t;
  144. sc_integer u;
  145. sc_integer v;
  146. sc_integer w;
  147. };
  148. /*! Returns an instance of the interface class 'DefaultSCI'. */
  149. DefaultSCI* getDefaultSCI();
  150. /*! Gets the value of the variable 'a' that is defined in the default interface scope. */
  151. sc_integer get_a() const;
  152. /*! Sets the value of the variable 'a' that is defined in the default interface scope. */
  153. void set_a(sc_integer value);
  154. /*! Gets the value of the variable 'b' that is defined in the default interface scope. */
  155. sc_integer get_b() const;
  156. /*! Sets the value of the variable 'b' that is defined in the default interface scope. */
  157. void set_b(sc_integer value);
  158. /*! Gets the value of the variable 'c' that is defined in the default interface scope. */
  159. sc_integer get_c() const;
  160. /*! Sets the value of the variable 'c' that is defined in the default interface scope. */
  161. void set_c(sc_integer value);
  162. /*! Gets the value of the variable 'd' that is defined in the default interface scope. */
  163. sc_integer get_d() const;
  164. /*! Sets the value of the variable 'd' that is defined in the default interface scope. */
  165. void set_d(sc_integer value);
  166. /*! Gets the value of the variable 'e' that is defined in the default interface scope. */
  167. sc_integer get_e() const;
  168. /*! Sets the value of the variable 'e' that is defined in the default interface scope. */
  169. void set_e(sc_integer value);
  170. /*! Gets the value of the variable 'f' that is defined in the default interface scope. */
  171. sc_integer get_f() const;
  172. /*! Sets the value of the variable 'f' that is defined in the default interface scope. */
  173. void set_f(sc_integer value);
  174. /*! Gets the value of the variable 'g' that is defined in the default interface scope. */
  175. sc_integer get_g() const;
  176. /*! Sets the value of the variable 'g' that is defined in the default interface scope. */
  177. void set_g(sc_integer value);
  178. /*! Gets the value of the variable 'h' that is defined in the default interface scope. */
  179. sc_integer get_h() const;
  180. /*! Sets the value of the variable 'h' that is defined in the default interface scope. */
  181. void set_h(sc_integer value);
  182. /*! Gets the value of the variable 'i' that is defined in the default interface scope. */
  183. sc_integer get_i() const;
  184. /*! Sets the value of the variable 'i' that is defined in the default interface scope. */
  185. void set_i(sc_integer value);
  186. /*! Gets the value of the variable 'i1' that is defined in the default interface scope. */
  187. sc_integer get_i1() const;
  188. /*! Sets the value of the variable 'i1' that is defined in the default interface scope. */
  189. void set_i1(sc_integer value);
  190. /*! Gets the value of the variable 'j' that is defined in the default interface scope. */
  191. sc_integer get_j() const;
  192. /*! Sets the value of the variable 'j' that is defined in the default interface scope. */
  193. void set_j(sc_integer value);
  194. /*! Gets the value of the variable 'j1' that is defined in the default interface scope. */
  195. sc_integer get_j1() const;
  196. /*! Sets the value of the variable 'j1' that is defined in the default interface scope. */
  197. void set_j1(sc_integer value);
  198. /*! Gets the value of the variable 'k' that is defined in the default interface scope. */
  199. sc_integer get_k() const;
  200. /*! Sets the value of the variable 'k' that is defined in the default interface scope. */
  201. void set_k(sc_integer value);
  202. /*! Gets the value of the variable 'k1' that is defined in the default interface scope. */
  203. sc_integer get_k1() const;
  204. /*! Sets the value of the variable 'k1' that is defined in the default interface scope. */
  205. void set_k1(sc_integer value);
  206. /*! Gets the value of the variable 'l' that is defined in the default interface scope. */
  207. sc_integer get_l() const;
  208. /*! Sets the value of the variable 'l' that is defined in the default interface scope. */
  209. void set_l(sc_integer value);
  210. /*! Gets the value of the variable 'm' that is defined in the default interface scope. */
  211. sc_integer get_m() const;
  212. /*! Sets the value of the variable 'm' that is defined in the default interface scope. */
  213. void set_m(sc_integer value);
  214. /*! Gets the value of the variable 'n' that is defined in the default interface scope. */
  215. sc_integer get_n() const;
  216. /*! Sets the value of the variable 'n' that is defined in the default interface scope. */
  217. void set_n(sc_integer value);
  218. /*! Gets the value of the variable 'p' that is defined in the default interface scope. */
  219. sc_integer get_p() const;
  220. /*! Sets the value of the variable 'p' that is defined in the default interface scope. */
  221. void set_p(sc_integer value);
  222. /*! Gets the value of the variable 'r' that is defined in the default interface scope. */
  223. sc_integer get_r() const;
  224. /*! Sets the value of the variable 'r' that is defined in the default interface scope. */
  225. void set_r(sc_integer value);
  226. /*! Gets the value of the variable 't' that is defined in the default interface scope. */
  227. sc_integer get_t() const;
  228. /*! Sets the value of the variable 't' that is defined in the default interface scope. */
  229. void set_t(sc_integer value);
  230. /*! Gets the value of the variable 'u' that is defined in the default interface scope. */
  231. sc_integer get_u() const;
  232. /*! Sets the value of the variable 'u' that is defined in the default interface scope. */
  233. void set_u(sc_integer value);
  234. /*! Gets the value of the variable 'v' that is defined in the default interface scope. */
  235. sc_integer get_v() const;
  236. /*! Sets the value of the variable 'v' that is defined in the default interface scope. */
  237. void set_v(sc_integer value);
  238. /*! Gets the value of the variable 'w' that is defined in the default interface scope. */
  239. sc_integer get_w() const;
  240. /*! Sets the value of the variable 'w' that is defined in the default interface scope. */
  241. void set_w(sc_integer value);
  242. /*
  243. * Functions inherited from StatemachineInterface
  244. */
  245. virtual void init();
  246. virtual void enter();
  247. virtual void exit();
  248. virtual void runCycle();
  249. /*!
  250. * Checks if the state machine is active (until 2.4.1 this method was used for states).
  251. * A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
  252. */
  253. virtual sc_boolean isActive() const;
  254. /*!
  255. * Checks if all active states are final.
  256. * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
  257. */
  258. virtual sc_boolean isFinal() const;
  259. /*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
  260. sc_boolean isStateActive(AssignmentAsExpressionStates state) const;
  261. private:
  262. //! the maximum number of orthogonal states defines the dimension of the state configuration vector.
  263. static const sc_integer maxOrthogonalStates = 1;
  264. AssignmentAsExpressionStates stateConfVector[maxOrthogonalStates];
  265. sc_ushort stateConfVectorPosition;
  266. DefaultSCI iface;
  267. // prototypes of all internal functions
  268. sc_boolean check_main_region_Add_tr0_tr0();
  269. sc_boolean check_main_region_Multiply_tr0_tr0();
  270. sc_boolean check_main_region_Divide_tr0_tr0();
  271. sc_boolean check_main_region_Modulo_tr0_tr0();
  272. sc_boolean check_main_region_Shift_tr0_tr0();
  273. sc_boolean check_main_region_boolean_And_tr0_tr0();
  274. sc_boolean check_main_region_boolean_Or_tr0_tr0();
  275. sc_boolean check_main_region_Subtract_tr0_tr0();
  276. void effect_main_region_Add_tr0();
  277. void effect_main_region_Multiply_tr0();
  278. void effect_main_region_Divide_tr0();
  279. void effect_main_region_Modulo_tr0();
  280. void effect_main_region_Shift_tr0();
  281. void effect_main_region_boolean_And_tr0();
  282. void effect_main_region_boolean_Or_tr0();
  283. void effect_main_region_Subtract_tr0();
  284. void enact_main_region_Add();
  285. void enact_main_region_Multiply();
  286. void enact_main_region_Divide();
  287. void enact_main_region_Modulo();
  288. void enact_main_region_Shift();
  289. void enact_main_region_boolean_And();
  290. void enact_main_region_boolean_Or();
  291. void enact_main_region_boolean_Xor();
  292. void enact_main_region_Subtract();
  293. void enseq_main_region_Add_default();
  294. void enseq_main_region_Multiply_default();
  295. void enseq_main_region_Divide_default();
  296. void enseq_main_region_Modulo_default();
  297. void enseq_main_region_Shift_default();
  298. void enseq_main_region_boolean_And_default();
  299. void enseq_main_region_boolean_Or_default();
  300. void enseq_main_region_boolean_Xor_default();
  301. void enseq_main_region_Subtract_default();
  302. void enseq_main_region_default();
  303. void exseq_main_region_Add();
  304. void exseq_main_region_Multiply();
  305. void exseq_main_region_Divide();
  306. void exseq_main_region_Modulo();
  307. void exseq_main_region_Shift();
  308. void exseq_main_region_boolean_And();
  309. void exseq_main_region_boolean_Or();
  310. void exseq_main_region_boolean_Xor();
  311. void exseq_main_region_Subtract();
  312. void exseq_main_region();
  313. void react_main_region_Add();
  314. void react_main_region_Multiply();
  315. void react_main_region_Divide();
  316. void react_main_region_Modulo();
  317. void react_main_region_Shift();
  318. void react_main_region_boolean_And();
  319. void react_main_region_boolean_Or();
  320. void react_main_region_boolean_Xor();
  321. void react_main_region_Subtract();
  322. void react_main_region__entry_Default();
  323. void clearInEvents();
  324. void clearOutEvents();
  325. };
  326. #endif /* ASSIGNMENTASEXPRESSION_H_ */