text: // ==============================================================
  // RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
  // Version: 2017.1
  // Copyright (C) 1986-2017 Xilinx, Inc. All Rights Reserved.
  // 
  // ===========================================================
  
  #ifndef _yuv_filter_HH_
  #define _yuv_filter_HH_
  
  #include "systemc.h"
  #include "AESL_pkg.h"
  
  #include "rgb2yuv.h"
  #include "yuv2rgb.h"
  #include "yuv_filter_mul_8nqcK.h"
  #include "yuv_filter_p_yuv_kbM.h"
  
  namespace ap_rtl {
  
  struct yuv_filter : public sc_module {
      // Port declarations 36
      sc_in_clk ap_clk;
      sc_in< sc_logic > ap_rst;
      sc_in< sc_logic > ap_start;
      sc_out< sc_logic > ap_done;
      sc_out< sc_logic > ap_idle;
      sc_out< sc_logic > ap_ready;
      sc_out< sc_lv<22> > in_channels_ch1_address0;
      sc_out< sc_logic > in_channels_ch1_ce0;
      sc_in< sc_lv<8> > in_channels_ch1_q0;
      sc_out< sc_lv<22> > in_channels_ch2_address0;
      sc_out< sc_logic > in_channels_ch2_ce0;
      sc_in< sc_lv<8> > in_channels_ch2_q0;
      sc_out< sc_lv<22> > in_channels_ch3_address0;
      sc_out< sc_logic > in_channels_ch3_ce0;
      sc_in< sc_lv<8> > in_channels_ch3_q0;
      sc_in< sc_lv<16> > in_width;
      sc_in< sc_lv<16> > in_height;
      sc_out< sc_lv<22> > out_channels_ch1_address0;
      sc_out< sc_logic > out_channels_ch1_ce0;
      sc_out< sc_logic > out_channels_ch1_we0;
      sc_out< sc_lv<8> > out_channels_ch1_d0;
      sc_out< sc_lv<22> > out_channels_ch2_address0;
      sc_out< sc_logic > out_channels_ch2_ce0;
      sc_out< sc_logic > out_channels_ch2_we0;
      sc_out< sc_lv<8> > out_channels_ch2_d0;
      sc_out< sc_lv<22> > out_channels_ch3_address0;
      sc_out< sc_logic > out_channels_ch3_ce0;
      sc_out< sc_logic > out_channels_ch3_we0;
      sc_out< sc_lv<8> > out_channels_ch3_d0;
      sc_out< sc_lv<16> > out_width;
      sc_out< sc_logic > out_width_ap_vld;
      sc_out< sc_lv<16> > out_height;
      sc_out< sc_logic > out_height_ap_vld;
      sc_in< sc_lv<8> > Y_scale;
      sc_in< sc_lv<8> > U_scale;
      sc_in< sc_lv<8> > V_scale;
      sc_signal< sc_logic > ap_var_for_const0;
  
  
      // Module declarations
      yuv_filter(sc_module_name name);
      SC_HAS_PROCESS(yuv_filter);
  
      ~yuv_filter();
  
      sc_trace_file* mVcdFile;
  
      ofstream mHdltvinHandle;
      ofstream mHdltvoutHandle;
      yuv_filter_p_yuv_kbM* p_yuv_channels_ch1_U;
      yuv_filter_p_yuv_kbM* p_yuv_channels_ch2_U;
      yuv_filter_p_yuv_kbM* p_yuv_channels_ch3_U;
      yuv_filter_p_yuv_kbM* p_scale_channels_ch1_U;
      yuv_filter_p_yuv_kbM* p_scale_channels_ch2_U;
      yuv_filter_p_yuv_kbM* p_scale_channels_ch3_U;
      rgb2yuv* grp_rgb2yuv_fu_244;
      yuv2rgb* grp_yuv2rgb_fu_264;
      yuv_filter_mul_8nqcK<1,3,8,8,15>* yuv_filter_mul_8nqcK_U26;
      yuv_filter_mul_8nqcK<1,3,8,8,15>* yuv_filter_mul_8nqcK_U27;
      yuv_filter_mul_8nqcK<1,3,8,8,15>* yuv_filter_mul_8nqcK_U28;
      sc_signal< sc_lv<13> > ap_CS_fsm;
      sc_signal< sc_logic > ap_CS_fsm_state1;
      sc_signal< sc_lv<16> > p_yuv_width_reg_441;
      sc_signal< sc_logic > ap_CS_fsm_state2;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_ap_done;
      sc_signal< sc_lv<16> > p_yuv_height_reg_447;
      sc_signal< sc_lv<15> > tmp_i_cast_fu_287_p1;
      sc_signal< sc_lv<15> > tmp_i_cast_reg_453;
      sc_signal< sc_lv<15> > tmp_1_i_cast_fu_291_p1;
      sc_signal< sc_lv<15> > tmp_1_i_cast_reg_458;
      sc_signal< sc_lv<15> > tmp_2_i_cast_fu_295_p1;
      sc_signal< sc_lv<15> > tmp_2_i_cast_reg_463;
      sc_signal< sc_lv<16> > x_fu_304_p2;
      sc_signal< sc_lv<16> > x_reg_471;
      sc_signal< sc_logic > ap_CS_fsm_state3;
      sc_signal< sc_lv<23> > tmp_2_fu_334_p2;
      sc_signal< sc_lv<23> > tmp_2_reg_476;
      sc_signal< sc_lv<1> > exitcond1_i_fu_299_p2;
      sc_signal< sc_lv<16> > y_fu_345_p2;
      sc_signal< sc_lv<16> > y_reg_484;
      sc_signal< sc_logic > ap_CS_fsm_state4;
      sc_signal< sc_lv<64> > tmp_3_cast_fu_360_p1;
      sc_signal< sc_lv<64> > tmp_3_cast_reg_489;
      sc_signal< sc_lv<1> > exitcond_i_fu_340_p2;
      sc_signal< sc_lv<8> > p_yuv_channels_ch1_q0;
      sc_signal< sc_lv<8> > Y_reg_511;
      sc_signal< sc_logic > ap_CS_fsm_state7;
      sc_signal< sc_lv<8> > p_yuv_channels_ch2_q0;
      sc_signal< sc_lv<8> > U_reg_516;
      sc_signal< sc_lv<8> > p_yuv_channels_ch3_q0;
      sc_signal< sc_lv<8> > V_reg_521;
      sc_signal< sc_logic > ap_CS_fsm_state8;
      sc_signal< sc_lv<8> > tmp_10_i_reg_541;
      sc_signal< sc_logic > ap_CS_fsm_state10;
      sc_signal< sc_lv<8> > tmp_11_i_reg_546;
      sc_signal< sc_lv<8> > tmp_12_i_reg_551;
      sc_signal< sc_logic > ap_CS_fsm_state11;
      sc_signal< sc_lv<22> > p_yuv_channels_ch1_address0;
      sc_signal< sc_logic > p_yuv_channels_ch1_ce0;
      sc_signal< sc_logic > p_yuv_channels_ch1_we0;
      sc_signal< sc_lv<22> > p_yuv_channels_ch2_address0;
      sc_signal< sc_logic > p_yuv_channels_ch2_ce0;
      sc_signal< sc_logic > p_yuv_channels_ch2_we0;
      sc_signal< sc_lv<22> > p_yuv_channels_ch3_address0;
      sc_signal< sc_logic > p_yuv_channels_ch3_ce0;
      sc_signal< sc_logic > p_yuv_channels_ch3_we0;
      sc_signal< sc_lv<22> > p_scale_channels_ch1_address0;
      sc_signal< sc_logic > p_scale_channels_ch1_ce0;
      sc_signal< sc_logic > p_scale_channels_ch1_we0;
      sc_signal< sc_lv<8> > p_scale_channels_ch1_q0;
      sc_signal< sc_lv<22> > p_scale_channels_ch2_address0;
      sc_signal< sc_logic > p_scale_channels_ch2_ce0;
      sc_signal< sc_logic > p_scale_channels_ch2_we0;
      sc_signal< sc_lv<8> > p_scale_channels_ch2_q0;
      sc_signal< sc_lv<22> > p_scale_channels_ch3_address0;
      sc_signal< sc_logic > p_scale_channels_ch3_ce0;
      sc_signal< sc_logic > p_scale_channels_ch3_we0;
      sc_signal< sc_lv<8> > p_scale_channels_ch3_q0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_ap_start;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_ap_idle;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_ap_ready;
      sc_signal< sc_lv<22> > grp_rgb2yuv_fu_244_in_channels_ch1_address0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_in_channels_ch1_ce0;
      sc_signal< sc_lv<22> > grp_rgb2yuv_fu_244_in_channels_ch2_address0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_in_channels_ch2_ce0;
      sc_signal< sc_lv<22> > grp_rgb2yuv_fu_244_in_channels_ch3_address0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_in_channels_ch3_ce0;
      sc_signal< sc_lv<22> > grp_rgb2yuv_fu_244_out_channels_ch1_address0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_out_channels_ch1_ce0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_out_channels_ch1_we0;
      sc_signal< sc_lv<8> > grp_rgb2yuv_fu_244_out_channels_ch1_d0;
      sc_signal< sc_lv<22> > grp_rgb2yuv_fu_244_out_channels_ch2_address0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_out_channels_ch2_ce0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_out_channels_ch2_we0;
      sc_signal< sc_lv<8> > grp_rgb2yuv_fu_244_out_channels_ch2_d0;
      sc_signal< sc_lv<22> > grp_rgb2yuv_fu_244_out_channels_ch3_address0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_out_channels_ch3_ce0;
      sc_signal< sc_logic > grp_rgb2yuv_fu_244_out_channels_ch3_we0;
      sc_signal< sc_lv<8> > grp_rgb2yuv_fu_244_out_channels_ch3_d0;
      sc_signal< sc_lv<16> > grp_rgb2yuv_fu_244_ap_return_0;
      sc_signal< sc_lv<16> > grp_rgb2yuv_fu_244_ap_return_1;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_ap_start;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_ap_done;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_ap_idle;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_ap_ready;
      sc_signal< sc_lv<22> > grp_yuv2rgb_fu_264_in_channels_ch1_address0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_in_channels_ch1_ce0;
      sc_signal< sc_lv<22> > grp_yuv2rgb_fu_264_in_channels_ch2_address0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_in_channels_ch2_ce0;
      sc_signal< sc_lv<22> > grp_yuv2rgb_fu_264_in_channels_ch3_address0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_in_channels_ch3_ce0;
      sc_signal< sc_lv<22> > grp_yuv2rgb_fu_264_out_channels_ch1_address0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_out_channels_ch1_ce0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_out_channels_ch1_we0;
      sc_signal< sc_lv<8> > grp_yuv2rgb_fu_264_out_channels_ch1_d0;
      sc_signal< sc_lv<22> > grp_yuv2rgb_fu_264_out_channels_ch2_address0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_out_channels_ch2_ce0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_out_channels_ch2_we0;
      sc_signal< sc_lv<8> > grp_yuv2rgb_fu_264_out_channels_ch2_d0;
      sc_signal< sc_lv<22> > grp_yuv2rgb_fu_264_out_channels_ch3_address0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_out_channels_ch3_ce0;
      sc_signal< sc_logic > grp_yuv2rgb_fu_264_out_channels_ch3_we0;
      sc_signal< sc_lv<8> > grp_yuv2rgb_fu_264_out_channels_ch3_d0;
      sc_signal< sc_lv<16> > grp_yuv2rgb_fu_264_ap_return_0;
      sc_signal< sc_lv<16> > grp_yuv2rgb_fu_264_ap_return_1;
      sc_signal< sc_lv<16> > x_i_reg_222;
      sc_signal< sc_lv<16> > y_i_reg_233;
      sc_signal< sc_logic > ap_CS_fsm_state12;
      sc_signal< sc_logic > ap_reg_grp_rgb2yuv_fu_244_ap_start;
      sc_signal< sc_logic > ap_reg_grp_yuv2rgb_fu_264_ap_start;
      sc_signal< sc_logic > ap_CS_fsm_state13;
      sc_signal< sc_logic > ap_CS_fsm_state5;
      sc_signal< sc_logic > ap_CS_fsm_state6;
      sc_signal< sc_lv<13> > tmp_fu_310_p1;
      sc_signal< sc_lv<15> > tmp_1_fu_322_p1;
      sc_signal< sc_lv<23> > p_shl_cast_fu_314_p3;
      sc_signal< sc_lv<23> > p_shl3_cast_fu_326_p3;
      sc_signal< sc_lv<23> > tmp_5_i_cast_fu_351_p1;
      sc_signal< sc_lv<23> > tmp_3_fu_355_p2;
      sc_signal< sc_lv<8> > grp_fu_370_p0;
      sc_signal< sc_lv<8> > grp_fu_370_p1;
      sc_signal< sc_lv<8> > grp_fu_378_p0;
      sc_signal< sc_lv<8> > grp_fu_378_p1;
      sc_signal< sc_lv<8> > grp_fu_386_p0;
      sc_signal< sc_lv<8> > grp_fu_386_p1;
      sc_signal< sc_lv<15> > grp_fu_370_p2;
      sc_signal< sc_lv<15> > grp_fu_378_p2;
      sc_signal< sc_lv<15> > grp_fu_386_p2;
      sc_signal< sc_lv<13> > ap_NS_fsm;
      sc_signal< sc_lv<15> > grp_fu_370_p10;
      sc_signal< sc_lv<15> > grp_fu_378_p10;
      sc_signal< sc_lv<15> > grp_fu_386_p10;
      static const sc_logic ap_const_logic_1;
      static const sc_logic ap_const_logic_0;
      static const sc_lv<13> ap_ST_fsm_state1;
      static const sc_lv<13> ap_ST_fsm_state2;
      static const sc_lv<13> ap_ST_fsm_state3;
      static const sc_lv<13> ap_ST_fsm_state4;
      static const sc_lv<13> ap_ST_fsm_state5;
      static const sc_lv<13> ap_ST_fsm_state6;
      static const sc_lv<13> ap_ST_fsm_state7;
      static const sc_lv<13> ap_ST_fsm_state8;
      static const sc_lv<13> ap_ST_fsm_state9;
      static const sc_lv<13> ap_ST_fsm_state10;
      static const sc_lv<13> ap_ST_fsm_state11;
      static const sc_lv<13> ap_ST_fsm_state12;
      static const sc_lv<13> ap_ST_fsm_state13;
      static const sc_lv<32> ap_const_lv32_0;
      static const sc_lv<32> ap_const_lv32_1;
      static const sc_lv<32> ap_const_lv32_2;
      static const sc_lv<1> ap_const_lv1_0;
      static const sc_lv<32> ap_const_lv32_3;
      static const sc_lv<32> ap_const_lv32_6;
      static const sc_lv<32> ap_const_lv32_7;
      static const sc_lv<32> ap_const_lv32_9;
      static const sc_lv<32> ap_const_lv32_A;
      static const sc_lv<16> ap_const_lv16_0;
      static const sc_lv<1> ap_const_lv1_1;
      static const sc_lv<32> ap_const_lv32_B;
      static const sc_lv<32> ap_const_lv32_C;
      static const sc_lv<32> ap_const_lv32_4;
      static const sc_lv<32> ap_const_lv32_5;
      static const sc_lv<16> ap_const_lv16_1;
      static const sc_lv<10> ap_const_lv10_0;
      static const sc_lv<8> ap_const_lv8_0;
      static const sc_lv<32> ap_const_lv32_E;
      static const bool ap_const_boolean_1;
      // Thread declarations
      void thread_ap_var_for_const0();
      void thread_ap_clk_no_reset_();
      void thread_ap_CS_fsm_state1();
      void thread_ap_CS_fsm_state10();
      void thread_ap_CS_fsm_state11();
      void thread_ap_CS_fsm_state12();
      void thread_ap_CS_fsm_state13();
      void thread_ap_CS_fsm_state2();
      void thread_ap_CS_fsm_state3();
      void thread_ap_CS_fsm_state4();
      void thread_ap_CS_fsm_state5();
      void thread_ap_CS_fsm_state6();
      void thread_ap_CS_fsm_state7();
      void thread_ap_CS_fsm_state8();
      void thread_ap_done();
      void thread_ap_idle();
      void thread_ap_ready();
      void thread_exitcond1_i_fu_299_p2();
      void thread_exitcond_i_fu_340_p2();
      void thread_grp_fu_370_p0();
      void thread_grp_fu_370_p1();
      void thread_grp_fu_370_p10();
      void thread_grp_fu_378_p0();
      void thread_grp_fu_378_p1();
      void thread_grp_fu_378_p10();
      void thread_grp_fu_386_p0();
      void thread_grp_fu_386_p1();
      void thread_grp_fu_386_p10();
      void thread_grp_rgb2yuv_fu_244_ap_start();
      void thread_grp_yuv2rgb_fu_264_ap_start();
      void thread_in_channels_ch1_address0();
      void thread_in_channels_ch1_ce0();
      void thread_in_channels_ch2_address0();
      void thread_in_channels_ch2_ce0();
      void thread_in_channels_ch3_address0();
      void thread_in_channels_ch3_ce0();
      void thread_out_channels_ch1_address0();
      void thread_out_channels_ch1_ce0();
      void thread_out_channels_ch1_d0();
      void thread_out_channels_ch1_we0();
      void thread_out_channels_ch2_address0();
      void thread_out_channels_ch2_ce0();
      void thread_out_channels_ch2_d0();
      void thread_out_channels_ch2_we0();
      void thread_out_channels_ch3_address0();
      void thread_out_channels_ch3_ce0();
      void thread_out_channels_ch3_d0();
      void thread_out_channels_ch3_we0();
      void thread_out_height();
      void thread_out_height_ap_vld();
      void thread_out_width();
      void thread_out_width_ap_vld();
      void thread_p_scale_channels_ch1_address0();
      void thread_p_scale_channels_ch1_ce0();
      void thread_p_scale_channels_ch1_we0();
      void thread_p_scale_channels_ch2_address0();
      void thread_p_scale_channels_ch2_ce0();
      void thread_p_scale_channels_ch2_we0();
      void thread_p_scale_channels_ch3_address0();
      void thread_p_scale_channels_ch3_ce0();
      void thread_p_scale_channels_ch3_we0();
      void thread_p_shl3_cast_fu_326_p3();
      void thread_p_shl_cast_fu_314_p3();
      void thread_p_yuv_channels_ch1_address0();
      void thread_p_yuv_channels_ch1_ce0();
      void thread_p_yuv_channels_ch1_we0();
      void thread_p_yuv_channels_ch2_address0();
      void thread_p_yuv_channels_ch2_ce0();
      void thread_p_yuv_channels_ch2_we0();
      void thread_p_yuv_channels_ch3_address0();
      void thread_p_yuv_channels_ch3_ce0();
      void thread_p_yuv_channels_ch3_we0();
      void thread_tmp_1_fu_322_p1();
      void thread_tmp_1_i_cast_fu_291_p1();
      void thread_tmp_2_fu_334_p2();
      void thread_tmp_2_i_cast_fu_295_p1();
      void thread_tmp_3_cast_fu_360_p1();
      void thread_tmp_3_fu_355_p2();
      void thread_tmp_5_i_cast_fu_351_p1();
      void thread_tmp_fu_310_p1();
      void thread_tmp_i_cast_fu_287_p1();
      void thread_x_fu_304_p2();
      void thread_y_fu_345_p2();
      void thread_ap_NS_fsm();
      void thread_hdltv_gen();
  };
  
  }
  
  using namespace ap_rtl;
  
  #endif
  