StreamFMAKernel_exec0.cpp 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. #include "stdsimheader.h"
  2. namespace maxcompilersim {
  3. void StreamFMAKernel::execute0() {
  4. { // Node ID: 8 (NodeInputMappedReg)
  5. }
  6. HWOffsetFix<1,0,UNSIGNED> id9out_result;
  7. { // Node ID: 9 (NodeNot)
  8. const HWOffsetFix<1,0,UNSIGNED> &id9in_a = id8out_io_output_force_disabled;
  9. id9out_result = (not_fixed(id9in_a));
  10. }
  11. { // Node ID: 0 (NodeInputMappedReg)
  12. }
  13. HWOffsetFix<1,0,UNSIGNED> id1out_result;
  14. { // Node ID: 1 (NodeNot)
  15. const HWOffsetFix<1,0,UNSIGNED> &id1in_a = id0out_io_a_force_disabled;
  16. id1out_result = (not_fixed(id1in_a));
  17. }
  18. if ( (getFillLevel() >= (4l)))
  19. { // Node ID: 2 (NodeInput)
  20. const HWOffsetFix<1,0,UNSIGNED> &id2in_enable = id1out_result;
  21. (id2st_read_next_cycle) = ((id2in_enable.getValueAsBool())&(!(((getFlushLevel())>=(4l))&(isFlushingActive()))));
  22. queueReadRequest(m_a, id2st_read_next_cycle.getValueAsBool());
  23. }
  24. { // Node ID: 3 (NodeInputMappedReg)
  25. }
  26. HWOffsetFix<1,0,UNSIGNED> id4out_result;
  27. { // Node ID: 4 (NodeNot)
  28. const HWOffsetFix<1,0,UNSIGNED> &id4in_a = id3out_io_b_force_disabled;
  29. id4out_result = (not_fixed(id4in_a));
  30. }
  31. if ( (getFillLevel() >= (4l)))
  32. { // Node ID: 5 (NodeInput)
  33. const HWOffsetFix<1,0,UNSIGNED> &id5in_enable = id4out_result;
  34. (id5st_read_next_cycle) = ((id5in_enable.getValueAsBool())&(!(((getFlushLevel())>=(4l))&(isFlushingActive()))));
  35. queueReadRequest(m_b, id5st_read_next_cycle.getValueAsBool());
  36. }
  37. { // Node ID: 6 (NodeAdd)
  38. const HWOffsetFix<32,0,TWOSCOMPLEMENT> &id6in_a = id2out_data;
  39. const HWOffsetFix<32,0,TWOSCOMPLEMENT> &id6in_b = id5out_data;
  40. id6out_result[(getCycle()+1)%2] = (add_fixed<32,0,TWOSCOMPLEMENT,TONEAREVEN>(id6in_a,id6in_b));
  41. }
  42. if ( (getFillLevel() >= (10l)) && (getFlushLevel() < (10l)|| !isFlushingActive() ))
  43. { // Node ID: 11 (NodeOutput)
  44. const HWOffsetFix<1,0,UNSIGNED> &id11in_output_control = id9out_result;
  45. const HWOffsetFix<32,0,TWOSCOMPLEMENT> &id11in_data = id6out_result[getCycle()%2];
  46. bool id11x_1;
  47. (id11x_1) = ((id11in_output_control.getValueAsBool())&(!(((getFlushLevel())>=(10l))&(isFlushingActive()))));
  48. if((id11x_1)) {
  49. writeOutput(m_output, id11in_data);
  50. }
  51. }
  52. { // Node ID: 16 (NodeConstantRawBits)
  53. }
  54. { // Node ID: 26 (NodeConstantRawBits)
  55. }
  56. { // Node ID: 13 (NodeConstantRawBits)
  57. }
  58. if ( (getFillLevel() >= (3l)))
  59. { // Node ID: 14 (NodeCounter)
  60. const HWOffsetFix<1,0,UNSIGNED> &id14in_enable = id26out_value;
  61. const HWOffsetFix<49,0,UNSIGNED> &id14in_max = id13out_value;
  62. HWOffsetFix<49,0,UNSIGNED> id14x_1;
  63. HWOffsetFix<1,0,UNSIGNED> id14x_2;
  64. HWOffsetFix<1,0,UNSIGNED> id14x_3;
  65. HWOffsetFix<49,0,UNSIGNED> id14x_4t_1e_1;
  66. id14out_count = (cast_fixed2fixed<48,0,UNSIGNED,TRUNCATE>((id14st_count)));
  67. (id14x_1) = (add_fixed<49,0,UNSIGNED,TRUNCATE>((id14st_count),(c_hw_fix_49_0_uns_bits_2)));
  68. (id14x_2) = (gte_fixed((id14x_1),id14in_max));
  69. (id14x_3) = (and_fixed((id14x_2),id14in_enable));
  70. id14out_wrap = (id14x_3);
  71. if((id14in_enable.getValueAsBool())) {
  72. if(((id14x_3).getValueAsBool())) {
  73. (id14st_count) = (c_hw_fix_49_0_uns_bits_1);
  74. }
  75. else {
  76. (id14x_4t_1e_1) = (id14x_1);
  77. (id14st_count) = (id14x_4t_1e_1);
  78. }
  79. }
  80. else {
  81. }
  82. }
  83. HWOffsetFix<48,0,UNSIGNED> id15out_output;
  84. { // Node ID: 15 (NodeStreamOffset)
  85. const HWOffsetFix<48,0,UNSIGNED> &id15in_input = id14out_count;
  86. id15out_output = id15in_input;
  87. }
  88. if ( (getFillLevel() >= (4l)) && (getFlushLevel() < (4l)|| !isFlushingActive() ))
  89. { // Node ID: 17 (NodeOutputMappedReg)
  90. const HWOffsetFix<1,0,UNSIGNED> &id17in_load = id16out_value;
  91. const HWOffsetFix<48,0,UNSIGNED> &id17in_data = id15out_output;
  92. bool id17x_1;
  93. (id17x_1) = ((id17in_load.getValueAsBool())&(!(((getFlushLevel())>=(4l))&(isFlushingActive()))));
  94. if((id17x_1)) {
  95. setMappedRegValue("current_run_cycle_count", id17in_data);
  96. }
  97. }
  98. { // Node ID: 25 (NodeConstantRawBits)
  99. }
  100. { // Node ID: 19 (NodeConstantRawBits)
  101. }
  102. if ( (getFillLevel() >= (0l)))
  103. { // Node ID: 20 (NodeCounter)
  104. const HWOffsetFix<1,0,UNSIGNED> &id20in_enable = id25out_value;
  105. const HWOffsetFix<49,0,UNSIGNED> &id20in_max = id19out_value;
  106. HWOffsetFix<49,0,UNSIGNED> id20x_1;
  107. HWOffsetFix<1,0,UNSIGNED> id20x_2;
  108. HWOffsetFix<1,0,UNSIGNED> id20x_3;
  109. HWOffsetFix<49,0,UNSIGNED> id20x_4t_1e_1;
  110. id20out_count = (cast_fixed2fixed<48,0,UNSIGNED,TRUNCATE>((id20st_count)));
  111. (id20x_1) = (add_fixed<49,0,UNSIGNED,TRUNCATE>((id20st_count),(c_hw_fix_49_0_uns_bits_2)));
  112. (id20x_2) = (gte_fixed((id20x_1),id20in_max));
  113. (id20x_3) = (and_fixed((id20x_2),id20in_enable));
  114. id20out_wrap = (id20x_3);
  115. if((id20in_enable.getValueAsBool())) {
  116. if(((id20x_3).getValueAsBool())) {
  117. (id20st_count) = (c_hw_fix_49_0_uns_bits_1);
  118. }
  119. else {
  120. (id20x_4t_1e_1) = (id20x_1);
  121. (id20st_count) = (id20x_4t_1e_1);
  122. }
  123. }
  124. else {
  125. }
  126. }
  127. { // Node ID: 22 (NodeInputMappedReg)
  128. }
  129. { // Node ID: 24 (NodeEqInlined)
  130. const HWOffsetFix<48,0,UNSIGNED> &id24in_a = id20out_count;
  131. const HWOffsetFix<48,0,UNSIGNED> &id24in_b = id22out_run_cycle_count;
  132. id24out_result[(getCycle()+1)%2] = (eq_fixed(id24in_a,id24in_b));
  133. }
  134. if ( (getFillLevel() >= (1l)))
  135. { // Node ID: 21 (NodeFlush)
  136. const HWOffsetFix<1,0,UNSIGNED> &id21in_start = id24out_result[getCycle()%2];
  137. if((id21in_start.getValueAsBool())) {
  138. startFlushing();
  139. }
  140. }
  141. };
  142. };