// ==============================================================
// RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2016.2
// Copyright (C) 1986-2016 Xilinx, Inc. All Rights Reserved.
// 
// ===========================================================

#ifndef _lcddrv_HH_
#define _lcddrv_HH_

#include "systemc.h"
#include "AESL_pkg.h"

#include "lcddrv_init_lcd.h"
#include "lcddrv_lcd_send_cmd.h"
#include "lcddrv_wait_tmr.h"
#include "lcddrv_read_mem.h"

namespace ap_rtl {

struct lcddrv : public sc_module {
    // Port declarations 21
    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_in< sc_lv<1> > dummy_tmr_out_i;
    sc_out< sc_lv<1> > dummy_tmr_out_o;
    sc_in< sc_lv<1> > rs_i;
    sc_out< sc_lv<1> > rs_o;
    sc_in< sc_lv<1> > en_i;
    sc_out< sc_lv<1> > en_o;
    sc_in< sc_lv<4> > data_i;
    sc_out< sc_lv<4> > data_o;
    sc_in< sc_lv<1> > ind;
    sc_in< sc_lv<5> > mem_addr_i;
    sc_out< sc_lv<5> > mem_addr_o;
    sc_in< sc_lv<8> > mem_din;
    sc_in< sc_lv<1> > mem_req_i;
    sc_out< sc_lv<1> > mem_req_o;
    sc_in< sc_lv<1> > mem_ack;
    sc_signal< sc_lv<25> > ap_var_for_const0;


    // Module declarations
    lcddrv(sc_module_name name);
    SC_HAS_PROCESS(lcddrv);

    ~lcddrv();

    sc_trace_file* mVcdFile;

    ofstream mHdltvinHandle;
    ofstream mHdltvoutHandle;
    lcddrv_init_lcd* grp_lcddrv_init_lcd_fu_167;
    lcddrv_lcd_send_cmd* grp_lcddrv_lcd_send_cmd_fu_179;
    lcddrv_wait_tmr* grp_lcddrv_wait_tmr_fu_198;
    lcddrv_read_mem* grp_lcddrv_read_mem_fu_206;
    sc_signal< sc_lv<22> > ap_CS_fsm;
    sc_signal< sc_logic > ap_sig_cseq_ST_st1_fsm_0;
    sc_signal< bool > ap_sig_37;
    sc_signal< sc_lv<1> > dummy_tmr_out_0_data_reg;
    sc_signal< sc_logic > dummy_tmr_out_0_vld_reg;
    sc_signal< sc_logic > dummy_tmr_out_0_ack_out;
    sc_signal< sc_lv<1> > dummy_tmr_out_1_data_reg;
    sc_signal< sc_lv<1> > dummy_tmr_out_1_data_in;
    sc_signal< sc_logic > dummy_tmr_out_1_vld_reg;
    sc_signal< sc_logic > dummy_tmr_out_1_vld_in;
    sc_signal< sc_lv<1> > rs_1_data_reg;
    sc_signal< sc_lv<1> > rs_1_data_in;
    sc_signal< sc_logic > rs_1_vld_reg;
    sc_signal< sc_logic > rs_1_vld_in;
    sc_signal< sc_lv<1> > en_1_data_reg;
    sc_signal< sc_lv<1> > en_1_data_in;
    sc_signal< sc_logic > en_1_vld_reg;
    sc_signal< sc_logic > en_1_vld_in;
    sc_signal< sc_lv<4> > data_1_data_reg;
    sc_signal< sc_lv<4> > data_1_data_in;
    sc_signal< sc_logic > data_1_vld_reg;
    sc_signal< sc_logic > data_1_vld_in;
    sc_signal< sc_lv<5> > mem_addr_1_data_reg;
    sc_signal< sc_logic > mem_addr_1_vld_reg;
    sc_signal< sc_logic > mem_addr_1_vld_in;
    sc_signal< sc_lv<1> > mem_req_1_data_reg;
    sc_signal< sc_logic > mem_req_1_vld_reg;
    sc_signal< sc_logic > mem_req_1_vld_in;
    sc_signal< sc_lv<4> > reg_231;
    sc_signal< sc_logic > ap_sig_cseq_ST_st10_fsm_9;
    sc_signal< bool > ap_sig_381;
    sc_signal< sc_logic > grp_lcddrv_read_mem_fu_206_ap_done;
    sc_signal< sc_logic > ap_sig_cseq_ST_st18_fsm_17;
    sc_signal< bool > ap_sig_392;
    sc_signal< sc_lv<5> > pos_2_fu_242_p2;
    sc_signal< sc_lv<5> > pos_2_reg_276;
    sc_signal< sc_logic > ap_sig_cseq_ST_st9_fsm_8;
    sc_signal< bool > ap_sig_403;
    sc_signal< sc_lv<4> > tmp_2_fu_248_p1;
    sc_signal< sc_lv<4> > tmp_2_reg_281;
    sc_signal< sc_lv<5> > tmp_3_fu_258_p1;
    sc_signal< sc_lv<5> > tmp_3_reg_289;
    sc_signal< sc_logic > ap_sig_cseq_ST_st17_fsm_16;
    sc_signal< bool > ap_sig_414;
    sc_signal< sc_lv<1> > exitcond_fu_252_p2;
    sc_signal< sc_lv<6> > pos_3_fu_263_p2;
    sc_signal< sc_lv<6> > pos_3_reg_294;
    sc_signal< sc_lv<4> > tmp_4_fu_269_p1;
    sc_signal< sc_lv<4> > tmp_4_reg_299;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_ap_start;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_ap_done;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_ap_idle;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_ap_ready;
    sc_signal< sc_lv<1> > grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld;
    sc_signal< sc_lv<1> > grp_lcddrv_init_lcd_fu_167_en;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_en_ap_vld;
    sc_signal< sc_lv<1> > grp_lcddrv_init_lcd_fu_167_rs;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_rs_ap_vld;
    sc_signal< sc_lv<4> > grp_lcddrv_init_lcd_fu_167_data;
    sc_signal< sc_logic > grp_lcddrv_init_lcd_fu_167_data_ap_vld;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_ap_start;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_ap_done;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_ap_idle;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_ap_ready;
    sc_signal< sc_lv<1> > grp_lcddrv_lcd_send_cmd_fu_179_mode;
    sc_signal< sc_lv<4> > grp_lcddrv_lcd_send_cmd_fu_179_wd;
    sc_signal< sc_lv<1> > grp_lcddrv_lcd_send_cmd_fu_179_en;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld;
    sc_signal< sc_lv<1> > grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld;
    sc_signal< sc_lv<1> > grp_lcddrv_lcd_send_cmd_fu_179_rs;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld;
    sc_signal< sc_lv<4> > grp_lcddrv_lcd_send_cmd_fu_179_data;
    sc_signal< sc_logic > grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld;
    sc_signal< sc_logic > grp_lcddrv_wait_tmr_fu_198_ap_start;
    sc_signal< sc_logic > grp_lcddrv_wait_tmr_fu_198_ap_done;
    sc_signal< sc_logic > grp_lcddrv_wait_tmr_fu_198_ap_idle;
    sc_signal< sc_logic > grp_lcddrv_wait_tmr_fu_198_ap_ready;
    sc_signal< sc_lv<1> > grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o;
    sc_signal< sc_logic > grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld;
    sc_signal< sc_logic > grp_lcddrv_read_mem_fu_206_ap_start;
    sc_signal< sc_logic > grp_lcddrv_read_mem_fu_206_ap_idle;
    sc_signal< sc_logic > grp_lcddrv_read_mem_fu_206_ap_ready;
    sc_signal< sc_lv<5> > grp_lcddrv_read_mem_fu_206_addr;
    sc_signal< sc_lv<5> > grp_lcddrv_read_mem_fu_206_mem_addr;
    sc_signal< sc_logic > grp_lcddrv_read_mem_fu_206_mem_addr_ap_vld;
    sc_signal< sc_lv<1> > grp_lcddrv_read_mem_fu_206_mem_req;
    sc_signal< sc_logic > grp_lcddrv_read_mem_fu_206_mem_req_ap_vld;
    sc_signal< sc_lv<8> > grp_lcddrv_read_mem_fu_206_ap_return;
    sc_signal< sc_lv<5> > pos_reg_144;
    sc_signal< sc_logic > ap_sig_cseq_ST_st8_fsm_7;
    sc_signal< bool > ap_sig_485;
    sc_signal< sc_logic > ap_sig_cseq_ST_st13_fsm_12;
    sc_signal< bool > ap_sig_495;
    sc_signal< sc_lv<6> > pos_1_reg_156;
    sc_signal< sc_logic > ap_sig_cseq_ST_st16_fsm_15;
    sc_signal< bool > ap_sig_506;
    sc_signal< sc_logic > ap_sig_cseq_ST_st21_fsm_20;
    sc_signal< bool > ap_sig_514;
    sc_signal< sc_logic > ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start;
    sc_signal< sc_logic > ap_sig_cseq_ST_st3_fsm_2;
    sc_signal< bool > ap_sig_524;
    sc_signal< sc_logic > ap_sig_cseq_ST_st4_fsm_3;
    sc_signal< bool > ap_sig_531;
    sc_signal< sc_logic > ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start;
    sc_signal< sc_logic > ap_sig_cseq_ST_st5_fsm_4;
    sc_signal< bool > ap_sig_548;
    sc_signal< sc_logic > ap_sig_cseq_ST_st7_fsm_6;
    sc_signal< bool > ap_sig_555;
    sc_signal< sc_lv<1> > exitcond1_fu_236_p2;
    sc_signal< sc_logic > ap_sig_cseq_ST_st12_fsm_11;
    sc_signal< bool > ap_sig_569;
    sc_signal< sc_logic > ap_sig_cseq_ST_st15_fsm_14;
    sc_signal< bool > ap_sig_577;
    sc_signal< sc_logic > ap_sig_cseq_ST_st20_fsm_19;
    sc_signal< bool > ap_sig_586;
    sc_signal< sc_logic > ap_sig_cseq_ST_st6_fsm_5;
    sc_signal< bool > ap_sig_594;
    sc_signal< sc_logic > ap_sig_cseq_ST_st14_fsm_13;
    sc_signal< bool > ap_sig_602;
    sc_signal< sc_logic > ap_sig_cseq_ST_st11_fsm_10;
    sc_signal< bool > ap_sig_610;
    sc_signal< sc_logic > ap_sig_cseq_ST_st19_fsm_18;
    sc_signal< bool > ap_sig_619;
    sc_signal< sc_logic > ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start;
    sc_signal< sc_logic > ap_sig_cseq_ST_st22_fsm_21;
    sc_signal< bool > ap_sig_706;
    sc_signal< sc_logic > ap_reg_grp_lcddrv_read_mem_fu_206_ap_start;
    sc_signal< sc_lv<22> > ap_NS_fsm;
    static const sc_logic ap_const_logic_1;
    static const sc_logic ap_const_logic_0;
    static const sc_lv<22> ap_ST_st1_fsm_0;
    static const sc_lv<22> ap_ST_st2_fsm_1;
    static const sc_lv<22> ap_ST_st3_fsm_2;
    static const sc_lv<22> ap_ST_st4_fsm_3;
    static const sc_lv<22> ap_ST_st5_fsm_4;
    static const sc_lv<22> ap_ST_st6_fsm_5;
    static const sc_lv<22> ap_ST_st7_fsm_6;
    static const sc_lv<22> ap_ST_st8_fsm_7;
    static const sc_lv<22> ap_ST_st9_fsm_8;
    static const sc_lv<22> ap_ST_st10_fsm_9;
    static const sc_lv<22> ap_ST_st11_fsm_10;
    static const sc_lv<22> ap_ST_st12_fsm_11;
    static const sc_lv<22> ap_ST_st13_fsm_12;
    static const sc_lv<22> ap_ST_st14_fsm_13;
    static const sc_lv<22> ap_ST_st15_fsm_14;
    static const sc_lv<22> ap_ST_st16_fsm_15;
    static const sc_lv<22> ap_ST_st17_fsm_16;
    static const sc_lv<22> ap_ST_st18_fsm_17;
    static const sc_lv<22> ap_ST_st19_fsm_18;
    static const sc_lv<22> ap_ST_st20_fsm_19;
    static const sc_lv<22> ap_ST_st21_fsm_20;
    static const sc_lv<22> ap_ST_st22_fsm_21;
    static const sc_lv<32> ap_const_lv32_0;
    static const sc_lv<1> ap_const_lv1_1;
    static const sc_lv<1> ap_const_lv1_0;
    static const sc_lv<4> ap_const_lv4_0;
    static const sc_lv<5> ap_const_lv5_0;
    static const sc_lv<32> ap_const_lv32_9;
    static const sc_lv<32> ap_const_lv32_11;
    static const sc_lv<32> ap_const_lv32_8;
    static const sc_lv<32> ap_const_lv32_10;
    static const sc_lv<32> ap_const_lv32_7;
    static const sc_lv<32> ap_const_lv32_C;
    static const sc_lv<6> ap_const_lv6_10;
    static const sc_lv<32> ap_const_lv32_F;
    static const sc_lv<32> ap_const_lv32_14;
    static const sc_lv<32> ap_const_lv32_2;
    static const sc_lv<32> ap_const_lv32_3;
    static const sc_lv<32> ap_const_lv32_4;
    static const sc_lv<32> ap_const_lv32_6;
    static const sc_lv<32> ap_const_lv32_B;
    static const sc_lv<32> ap_const_lv32_E;
    static const sc_lv<32> ap_const_lv32_13;
    static const sc_lv<32> ap_const_lv32_5;
    static const sc_lv<32> ap_const_lv32_D;
    static const sc_lv<32> ap_const_lv32_A;
    static const sc_lv<32> ap_const_lv32_12;
    static const sc_lv<4> ap_const_lv4_8;
    static const sc_lv<4> ap_const_lv4_C;
    static const sc_lv<25> ap_const_lv25_989680;
    static const sc_lv<32> ap_const_lv32_15;
    static const sc_lv<5> ap_const_lv5_10;
    static const sc_lv<5> ap_const_lv5_1;
    static const sc_lv<6> ap_const_lv6_20;
    static const sc_lv<6> ap_const_lv6_1;
    // Thread declarations
    void thread_ap_var_for_const0();
    void thread_ap_clk_no_reset_();
    void thread_ap_done();
    void thread_ap_idle();
    void thread_ap_ready();
    void thread_ap_sig_37();
    void thread_ap_sig_381();
    void thread_ap_sig_392();
    void thread_ap_sig_403();
    void thread_ap_sig_414();
    void thread_ap_sig_485();
    void thread_ap_sig_495();
    void thread_ap_sig_506();
    void thread_ap_sig_514();
    void thread_ap_sig_524();
    void thread_ap_sig_531();
    void thread_ap_sig_548();
    void thread_ap_sig_555();
    void thread_ap_sig_569();
    void thread_ap_sig_577();
    void thread_ap_sig_586();
    void thread_ap_sig_594();
    void thread_ap_sig_602();
    void thread_ap_sig_610();
    void thread_ap_sig_619();
    void thread_ap_sig_706();
    void thread_ap_sig_cseq_ST_st10_fsm_9();
    void thread_ap_sig_cseq_ST_st11_fsm_10();
    void thread_ap_sig_cseq_ST_st12_fsm_11();
    void thread_ap_sig_cseq_ST_st13_fsm_12();
    void thread_ap_sig_cseq_ST_st14_fsm_13();
    void thread_ap_sig_cseq_ST_st15_fsm_14();
    void thread_ap_sig_cseq_ST_st16_fsm_15();
    void thread_ap_sig_cseq_ST_st17_fsm_16();
    void thread_ap_sig_cseq_ST_st18_fsm_17();
    void thread_ap_sig_cseq_ST_st19_fsm_18();
    void thread_ap_sig_cseq_ST_st1_fsm_0();
    void thread_ap_sig_cseq_ST_st20_fsm_19();
    void thread_ap_sig_cseq_ST_st21_fsm_20();
    void thread_ap_sig_cseq_ST_st22_fsm_21();
    void thread_ap_sig_cseq_ST_st3_fsm_2();
    void thread_ap_sig_cseq_ST_st4_fsm_3();
    void thread_ap_sig_cseq_ST_st5_fsm_4();
    void thread_ap_sig_cseq_ST_st6_fsm_5();
    void thread_ap_sig_cseq_ST_st7_fsm_6();
    void thread_ap_sig_cseq_ST_st8_fsm_7();
    void thread_ap_sig_cseq_ST_st9_fsm_8();
    void thread_data_1_data_in();
    void thread_data_1_vld_in();
    void thread_data_o();
    void thread_dummy_tmr_out_0_ack_out();
    void thread_dummy_tmr_out_1_data_in();
    void thread_dummy_tmr_out_1_vld_in();
    void thread_dummy_tmr_out_o();
    void thread_en_1_data_in();
    void thread_en_1_vld_in();
    void thread_en_o();
    void thread_exitcond1_fu_236_p2();
    void thread_exitcond_fu_252_p2();
    void thread_grp_lcddrv_init_lcd_fu_167_ap_start();
    void thread_grp_lcddrv_lcd_send_cmd_fu_179_ap_start();
    void thread_grp_lcddrv_lcd_send_cmd_fu_179_mode();
    void thread_grp_lcddrv_lcd_send_cmd_fu_179_wd();
    void thread_grp_lcddrv_read_mem_fu_206_addr();
    void thread_grp_lcddrv_read_mem_fu_206_ap_start();
    void thread_grp_lcddrv_wait_tmr_fu_198_ap_start();
    void thread_mem_addr_1_vld_in();
    void thread_mem_addr_o();
    void thread_mem_req_1_vld_in();
    void thread_mem_req_o();
    void thread_pos_2_fu_242_p2();
    void thread_pos_3_fu_263_p2();
    void thread_rs_1_data_in();
    void thread_rs_1_vld_in();
    void thread_rs_o();
    void thread_tmp_2_fu_248_p1();
    void thread_tmp_3_fu_258_p1();
    void thread_tmp_4_fu_269_p1();
    void thread_ap_NS_fsm();
    void thread_hdltv_gen();
};

}

using namespace ap_rtl;

#endif
