// ==============================================================
// 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.
// 
// ===========================================================

#include "lcddrv.h"
#include "AESL_pkg.h"

using namespace std;

namespace ap_rtl {

const sc_logic lcddrv::ap_const_logic_1 = sc_dt::Log_1;
const sc_logic lcddrv::ap_const_logic_0 = sc_dt::Log_0;
const sc_lv<22> lcddrv::ap_ST_st1_fsm_0 = "1";
const sc_lv<22> lcddrv::ap_ST_st2_fsm_1 = "10";
const sc_lv<22> lcddrv::ap_ST_st3_fsm_2 = "100";
const sc_lv<22> lcddrv::ap_ST_st4_fsm_3 = "1000";
const sc_lv<22> lcddrv::ap_ST_st5_fsm_4 = "10000";
const sc_lv<22> lcddrv::ap_ST_st6_fsm_5 = "100000";
const sc_lv<22> lcddrv::ap_ST_st7_fsm_6 = "1000000";
const sc_lv<22> lcddrv::ap_ST_st8_fsm_7 = "10000000";
const sc_lv<22> lcddrv::ap_ST_st9_fsm_8 = "100000000";
const sc_lv<22> lcddrv::ap_ST_st10_fsm_9 = "1000000000";
const sc_lv<22> lcddrv::ap_ST_st11_fsm_10 = "10000000000";
const sc_lv<22> lcddrv::ap_ST_st12_fsm_11 = "100000000000";
const sc_lv<22> lcddrv::ap_ST_st13_fsm_12 = "1000000000000";
const sc_lv<22> lcddrv::ap_ST_st14_fsm_13 = "10000000000000";
const sc_lv<22> lcddrv::ap_ST_st15_fsm_14 = "100000000000000";
const sc_lv<22> lcddrv::ap_ST_st16_fsm_15 = "1000000000000000";
const sc_lv<22> lcddrv::ap_ST_st17_fsm_16 = "10000000000000000";
const sc_lv<22> lcddrv::ap_ST_st18_fsm_17 = "100000000000000000";
const sc_lv<22> lcddrv::ap_ST_st19_fsm_18 = "1000000000000000000";
const sc_lv<22> lcddrv::ap_ST_st20_fsm_19 = "10000000000000000000";
const sc_lv<22> lcddrv::ap_ST_st21_fsm_20 = "100000000000000000000";
const sc_lv<22> lcddrv::ap_ST_st22_fsm_21 = "1000000000000000000000";
const sc_lv<32> lcddrv::ap_const_lv32_0 = "00000000000000000000000000000000";
const sc_lv<1> lcddrv::ap_const_lv1_1 = "1";
const sc_lv<1> lcddrv::ap_const_lv1_0 = "0";
const sc_lv<4> lcddrv::ap_const_lv4_0 = "0000";
const sc_lv<5> lcddrv::ap_const_lv5_0 = "00000";
const sc_lv<32> lcddrv::ap_const_lv32_9 = "1001";
const sc_lv<32> lcddrv::ap_const_lv32_11 = "10001";
const sc_lv<32> lcddrv::ap_const_lv32_8 = "1000";
const sc_lv<32> lcddrv::ap_const_lv32_10 = "10000";
const sc_lv<32> lcddrv::ap_const_lv32_7 = "111";
const sc_lv<32> lcddrv::ap_const_lv32_C = "1100";
const sc_lv<6> lcddrv::ap_const_lv6_10 = "10000";
const sc_lv<32> lcddrv::ap_const_lv32_F = "1111";
const sc_lv<32> lcddrv::ap_const_lv32_14 = "10100";
const sc_lv<32> lcddrv::ap_const_lv32_2 = "10";
const sc_lv<32> lcddrv::ap_const_lv32_3 = "11";
const sc_lv<32> lcddrv::ap_const_lv32_4 = "100";
const sc_lv<32> lcddrv::ap_const_lv32_6 = "110";
const sc_lv<32> lcddrv::ap_const_lv32_B = "1011";
const sc_lv<32> lcddrv::ap_const_lv32_E = "1110";
const sc_lv<32> lcddrv::ap_const_lv32_13 = "10011";
const sc_lv<32> lcddrv::ap_const_lv32_5 = "101";
const sc_lv<32> lcddrv::ap_const_lv32_D = "1101";
const sc_lv<32> lcddrv::ap_const_lv32_A = "1010";
const sc_lv<32> lcddrv::ap_const_lv32_12 = "10010";
const sc_lv<4> lcddrv::ap_const_lv4_8 = "1000";
const sc_lv<4> lcddrv::ap_const_lv4_C = "1100";
const sc_lv<25> lcddrv::ap_const_lv25_989680 = "100110001001011010000000";
const sc_lv<32> lcddrv::ap_const_lv32_15 = "10101";
const sc_lv<5> lcddrv::ap_const_lv5_10 = "10000";
const sc_lv<5> lcddrv::ap_const_lv5_1 = "1";
const sc_lv<6> lcddrv::ap_const_lv6_20 = "100000";
const sc_lv<6> lcddrv::ap_const_lv6_1 = "1";

lcddrv::lcddrv(sc_module_name name) : sc_module(name), mVcdFile(0) {
    grp_lcddrv_init_lcd_fu_167 = new lcddrv_init_lcd("grp_lcddrv_init_lcd_fu_167");
    grp_lcddrv_init_lcd_fu_167->ap_clk(ap_clk);
    grp_lcddrv_init_lcd_fu_167->ap_rst(ap_rst);
    grp_lcddrv_init_lcd_fu_167->ap_start(grp_lcddrv_init_lcd_fu_167_ap_start);
    grp_lcddrv_init_lcd_fu_167->ap_done(grp_lcddrv_init_lcd_fu_167_ap_done);
    grp_lcddrv_init_lcd_fu_167->ap_idle(grp_lcddrv_init_lcd_fu_167_ap_idle);
    grp_lcddrv_init_lcd_fu_167->ap_ready(grp_lcddrv_init_lcd_fu_167_ap_ready);
    grp_lcddrv_init_lcd_fu_167->dummy_tmr_out_i(dummy_tmr_out_0_data_reg);
    grp_lcddrv_init_lcd_fu_167->dummy_tmr_out_o(grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o);
    grp_lcddrv_init_lcd_fu_167->dummy_tmr_out_o_ap_vld(grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld);
    grp_lcddrv_init_lcd_fu_167->en(grp_lcddrv_init_lcd_fu_167_en);
    grp_lcddrv_init_lcd_fu_167->en_ap_vld(grp_lcddrv_init_lcd_fu_167_en_ap_vld);
    grp_lcddrv_init_lcd_fu_167->rs(grp_lcddrv_init_lcd_fu_167_rs);
    grp_lcddrv_init_lcd_fu_167->rs_ap_vld(grp_lcddrv_init_lcd_fu_167_rs_ap_vld);
    grp_lcddrv_init_lcd_fu_167->data(grp_lcddrv_init_lcd_fu_167_data);
    grp_lcddrv_init_lcd_fu_167->data_ap_vld(grp_lcddrv_init_lcd_fu_167_data_ap_vld);
    grp_lcddrv_lcd_send_cmd_fu_179 = new lcddrv_lcd_send_cmd("grp_lcddrv_lcd_send_cmd_fu_179");
    grp_lcddrv_lcd_send_cmd_fu_179->ap_clk(ap_clk);
    grp_lcddrv_lcd_send_cmd_fu_179->ap_rst(ap_rst);
    grp_lcddrv_lcd_send_cmd_fu_179->ap_start(grp_lcddrv_lcd_send_cmd_fu_179_ap_start);
    grp_lcddrv_lcd_send_cmd_fu_179->ap_done(grp_lcddrv_lcd_send_cmd_fu_179_ap_done);
    grp_lcddrv_lcd_send_cmd_fu_179->ap_idle(grp_lcddrv_lcd_send_cmd_fu_179_ap_idle);
    grp_lcddrv_lcd_send_cmd_fu_179->ap_ready(grp_lcddrv_lcd_send_cmd_fu_179_ap_ready);
    grp_lcddrv_lcd_send_cmd_fu_179->mode(grp_lcddrv_lcd_send_cmd_fu_179_mode);
    grp_lcddrv_lcd_send_cmd_fu_179->wd(grp_lcddrv_lcd_send_cmd_fu_179_wd);
    grp_lcddrv_lcd_send_cmd_fu_179->en(grp_lcddrv_lcd_send_cmd_fu_179_en);
    grp_lcddrv_lcd_send_cmd_fu_179->en_ap_vld(grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld);
    grp_lcddrv_lcd_send_cmd_fu_179->dummy_tmr_out_i(dummy_tmr_out_0_data_reg);
    grp_lcddrv_lcd_send_cmd_fu_179->dummy_tmr_out_o(grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o);
    grp_lcddrv_lcd_send_cmd_fu_179->dummy_tmr_out_o_ap_vld(grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld);
    grp_lcddrv_lcd_send_cmd_fu_179->rs(grp_lcddrv_lcd_send_cmd_fu_179_rs);
    grp_lcddrv_lcd_send_cmd_fu_179->rs_ap_vld(grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld);
    grp_lcddrv_lcd_send_cmd_fu_179->data(grp_lcddrv_lcd_send_cmd_fu_179_data);
    grp_lcddrv_lcd_send_cmd_fu_179->data_ap_vld(grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld);
    grp_lcddrv_wait_tmr_fu_198 = new lcddrv_wait_tmr("grp_lcddrv_wait_tmr_fu_198");
    grp_lcddrv_wait_tmr_fu_198->ap_clk(ap_clk);
    grp_lcddrv_wait_tmr_fu_198->ap_rst(ap_rst);
    grp_lcddrv_wait_tmr_fu_198->ap_start(grp_lcddrv_wait_tmr_fu_198_ap_start);
    grp_lcddrv_wait_tmr_fu_198->ap_done(grp_lcddrv_wait_tmr_fu_198_ap_done);
    grp_lcddrv_wait_tmr_fu_198->ap_idle(grp_lcddrv_wait_tmr_fu_198_ap_idle);
    grp_lcddrv_wait_tmr_fu_198->ap_ready(grp_lcddrv_wait_tmr_fu_198_ap_ready);
    grp_lcddrv_wait_tmr_fu_198->tmr(ap_var_for_const0);
    grp_lcddrv_wait_tmr_fu_198->dummy_tmr_out_i(dummy_tmr_out_0_data_reg);
    grp_lcddrv_wait_tmr_fu_198->dummy_tmr_out_o(grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o);
    grp_lcddrv_wait_tmr_fu_198->dummy_tmr_out_o_ap_vld(grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld);
    grp_lcddrv_read_mem_fu_206 = new lcddrv_read_mem("grp_lcddrv_read_mem_fu_206");
    grp_lcddrv_read_mem_fu_206->ap_clk(ap_clk);
    grp_lcddrv_read_mem_fu_206->ap_rst(ap_rst);
    grp_lcddrv_read_mem_fu_206->ap_start(grp_lcddrv_read_mem_fu_206_ap_start);
    grp_lcddrv_read_mem_fu_206->ap_done(grp_lcddrv_read_mem_fu_206_ap_done);
    grp_lcddrv_read_mem_fu_206->ap_idle(grp_lcddrv_read_mem_fu_206_ap_idle);
    grp_lcddrv_read_mem_fu_206->ap_ready(grp_lcddrv_read_mem_fu_206_ap_ready);
    grp_lcddrv_read_mem_fu_206->addr(grp_lcddrv_read_mem_fu_206_addr);
    grp_lcddrv_read_mem_fu_206->mem_addr(grp_lcddrv_read_mem_fu_206_mem_addr);
    grp_lcddrv_read_mem_fu_206->mem_addr_ap_vld(grp_lcddrv_read_mem_fu_206_mem_addr_ap_vld);
    grp_lcddrv_read_mem_fu_206->mem_req(grp_lcddrv_read_mem_fu_206_mem_req);
    grp_lcddrv_read_mem_fu_206->mem_req_ap_vld(grp_lcddrv_read_mem_fu_206_mem_req_ap_vld);
    grp_lcddrv_read_mem_fu_206->mem_din(mem_din);
    grp_lcddrv_read_mem_fu_206->mem_ack(mem_ack);
    grp_lcddrv_read_mem_fu_206->ap_return(grp_lcddrv_read_mem_fu_206_ap_return);

    SC_METHOD(thread_ap_clk_no_reset_);
    dont_initialize();
    sensitive << ( ap_clk.pos() );

    SC_METHOD(thread_ap_done);

    SC_METHOD(thread_ap_idle);
    sensitive << ( ap_start );
    sensitive << ( ap_sig_cseq_ST_st1_fsm_0 );

    SC_METHOD(thread_ap_ready);

    SC_METHOD(thread_ap_sig_37);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_381);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_392);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_403);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_414);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_485);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_495);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_506);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_514);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_524);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_531);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_548);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_555);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_569);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_577);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_586);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_594);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_602);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_610);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_619);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_706);
    sensitive << ( ap_CS_fsm );

    SC_METHOD(thread_ap_sig_cseq_ST_st10_fsm_9);
    sensitive << ( ap_sig_381 );

    SC_METHOD(thread_ap_sig_cseq_ST_st11_fsm_10);
    sensitive << ( ap_sig_610 );

    SC_METHOD(thread_ap_sig_cseq_ST_st12_fsm_11);
    sensitive << ( ap_sig_569 );

    SC_METHOD(thread_ap_sig_cseq_ST_st13_fsm_12);
    sensitive << ( ap_sig_495 );

    SC_METHOD(thread_ap_sig_cseq_ST_st14_fsm_13);
    sensitive << ( ap_sig_602 );

    SC_METHOD(thread_ap_sig_cseq_ST_st15_fsm_14);
    sensitive << ( ap_sig_577 );

    SC_METHOD(thread_ap_sig_cseq_ST_st16_fsm_15);
    sensitive << ( ap_sig_506 );

    SC_METHOD(thread_ap_sig_cseq_ST_st17_fsm_16);
    sensitive << ( ap_sig_414 );

    SC_METHOD(thread_ap_sig_cseq_ST_st18_fsm_17);
    sensitive << ( ap_sig_392 );

    SC_METHOD(thread_ap_sig_cseq_ST_st19_fsm_18);
    sensitive << ( ap_sig_619 );

    SC_METHOD(thread_ap_sig_cseq_ST_st1_fsm_0);
    sensitive << ( ap_sig_37 );

    SC_METHOD(thread_ap_sig_cseq_ST_st20_fsm_19);
    sensitive << ( ap_sig_586 );

    SC_METHOD(thread_ap_sig_cseq_ST_st21_fsm_20);
    sensitive << ( ap_sig_514 );

    SC_METHOD(thread_ap_sig_cseq_ST_st22_fsm_21);
    sensitive << ( ap_sig_706 );

    SC_METHOD(thread_ap_sig_cseq_ST_st3_fsm_2);
    sensitive << ( ap_sig_524 );

    SC_METHOD(thread_ap_sig_cseq_ST_st4_fsm_3);
    sensitive << ( ap_sig_531 );

    SC_METHOD(thread_ap_sig_cseq_ST_st5_fsm_4);
    sensitive << ( ap_sig_548 );

    SC_METHOD(thread_ap_sig_cseq_ST_st6_fsm_5);
    sensitive << ( ap_sig_594 );

    SC_METHOD(thread_ap_sig_cseq_ST_st7_fsm_6);
    sensitive << ( ap_sig_555 );

    SC_METHOD(thread_ap_sig_cseq_ST_st8_fsm_7);
    sensitive << ( ap_sig_485 );

    SC_METHOD(thread_ap_sig_cseq_ST_st9_fsm_8);
    sensitive << ( ap_sig_403 );

    SC_METHOD(thread_data_1_data_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_data );
    sensitive << ( grp_lcddrv_init_lcd_fu_167_data_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_data );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_data_1_vld_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_data_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_data_o);
    sensitive << ( data_1_data_reg );

    SC_METHOD(thread_dummy_tmr_out_0_ack_out);

    SC_METHOD(thread_dummy_tmr_out_1_data_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o );
    sensitive << ( grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld );
    sensitive << ( grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o );
    sensitive << ( grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );
    sensitive << ( ap_sig_cseq_ST_st22_fsm_21 );

    SC_METHOD(thread_dummy_tmr_out_1_vld_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld );
    sensitive << ( grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );
    sensitive << ( ap_sig_cseq_ST_st22_fsm_21 );

    SC_METHOD(thread_dummy_tmr_out_o);
    sensitive << ( dummy_tmr_out_1_data_reg );

    SC_METHOD(thread_en_1_data_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_en );
    sensitive << ( grp_lcddrv_init_lcd_fu_167_en_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_en );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_en_1_vld_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_en_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_en_o);
    sensitive << ( en_1_data_reg );

    SC_METHOD(thread_exitcond1_fu_236_p2);
    sensitive << ( ap_sig_cseq_ST_st9_fsm_8 );
    sensitive << ( pos_reg_144 );

    SC_METHOD(thread_exitcond_fu_252_p2);
    sensitive << ( ap_sig_cseq_ST_st17_fsm_16 );
    sensitive << ( pos_1_reg_156 );

    SC_METHOD(thread_grp_lcddrv_init_lcd_fu_167_ap_start);
    sensitive << ( ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start );

    SC_METHOD(thread_grp_lcddrv_lcd_send_cmd_fu_179_ap_start);
    sensitive << ( ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start );

    SC_METHOD(thread_grp_lcddrv_lcd_send_cmd_fu_179_mode);
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_grp_lcddrv_lcd_send_cmd_fu_179_wd);
    sensitive << ( reg_231 );
    sensitive << ( tmp_2_reg_281 );
    sensitive << ( tmp_4_reg_299 );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_grp_lcddrv_read_mem_fu_206_addr);
    sensitive << ( ap_sig_cseq_ST_st10_fsm_9 );
    sensitive << ( ap_sig_cseq_ST_st18_fsm_17 );
    sensitive << ( tmp_3_reg_289 );
    sensitive << ( pos_reg_144 );

    SC_METHOD(thread_grp_lcddrv_read_mem_fu_206_ap_start);
    sensitive << ( ap_reg_grp_lcddrv_read_mem_fu_206_ap_start );

    SC_METHOD(thread_grp_lcddrv_wait_tmr_fu_198_ap_start);
    sensitive << ( ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start );

    SC_METHOD(thread_mem_addr_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st10_fsm_9 );
    sensitive << ( ap_sig_cseq_ST_st18_fsm_17 );
    sensitive << ( grp_lcddrv_read_mem_fu_206_mem_addr_ap_vld );

    SC_METHOD(thread_mem_addr_o);
    sensitive << ( mem_addr_1_data_reg );

    SC_METHOD(thread_mem_req_1_vld_in);
    sensitive << ( ap_sig_cseq_ST_st10_fsm_9 );
    sensitive << ( ap_sig_cseq_ST_st18_fsm_17 );
    sensitive << ( grp_lcddrv_read_mem_fu_206_mem_req_ap_vld );

    SC_METHOD(thread_mem_req_o);
    sensitive << ( mem_req_1_data_reg );

    SC_METHOD(thread_pos_2_fu_242_p2);
    sensitive << ( pos_reg_144 );

    SC_METHOD(thread_pos_3_fu_263_p2);
    sensitive << ( pos_1_reg_156 );

    SC_METHOD(thread_rs_1_data_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_rs );
    sensitive << ( grp_lcddrv_init_lcd_fu_167_rs_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_rs );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_rs_1_vld_in);
    sensitive << ( grp_lcddrv_init_lcd_fu_167_rs_ap_vld );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld );
    sensitive << ( ap_sig_cseq_ST_st8_fsm_7 );
    sensitive << ( ap_sig_cseq_ST_st13_fsm_12 );
    sensitive << ( ap_sig_cseq_ST_st16_fsm_15 );
    sensitive << ( ap_sig_cseq_ST_st21_fsm_20 );
    sensitive << ( ap_sig_cseq_ST_st4_fsm_3 );
    sensitive << ( ap_sig_cseq_ST_st6_fsm_5 );
    sensitive << ( ap_sig_cseq_ST_st14_fsm_13 );
    sensitive << ( ap_sig_cseq_ST_st11_fsm_10 );
    sensitive << ( ap_sig_cseq_ST_st19_fsm_18 );

    SC_METHOD(thread_rs_o);
    sensitive << ( rs_1_data_reg );

    SC_METHOD(thread_tmp_2_fu_248_p1);
    sensitive << ( grp_lcddrv_read_mem_fu_206_ap_return );

    SC_METHOD(thread_tmp_3_fu_258_p1);
    sensitive << ( pos_1_reg_156 );

    SC_METHOD(thread_tmp_4_fu_269_p1);
    sensitive << ( grp_lcddrv_read_mem_fu_206_ap_return );

    SC_METHOD(thread_ap_NS_fsm);
    sensitive << ( ap_start );
    sensitive << ( ap_CS_fsm );
    sensitive << ( grp_lcddrv_read_mem_fu_206_ap_done );
    sensitive << ( exitcond_fu_252_p2 );
    sensitive << ( grp_lcddrv_init_lcd_fu_167_ap_done );
    sensitive << ( grp_lcddrv_lcd_send_cmd_fu_179_ap_done );
    sensitive << ( grp_lcddrv_wait_tmr_fu_198_ap_done );
    sensitive << ( exitcond1_fu_236_p2 );

    SC_THREAD(thread_hdltv_gen);
    sensitive << ( ap_clk.pos() );

    SC_THREAD(thread_ap_var_for_const0);

    ap_CS_fsm = "0000000000000000000001";
    dummy_tmr_out_0_data_reg = "0";
    dummy_tmr_out_0_vld_reg = SC_LOGIC_0;
    dummy_tmr_out_1_data_reg = "0";
    dummy_tmr_out_1_vld_reg = SC_LOGIC_0;
    rs_1_data_reg = "0";
    rs_1_vld_reg = SC_LOGIC_0;
    en_1_data_reg = "0";
    en_1_vld_reg = SC_LOGIC_0;
    data_1_data_reg = "0000";
    data_1_vld_reg = SC_LOGIC_0;
    mem_addr_1_data_reg = "00000";
    mem_addr_1_vld_reg = SC_LOGIC_0;
    mem_req_1_data_reg = "0";
    mem_req_1_vld_reg = SC_LOGIC_0;
    ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start = SC_LOGIC_0;
    ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start = SC_LOGIC_0;
    ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start = SC_LOGIC_0;
    ap_reg_grp_lcddrv_read_mem_fu_206_ap_start = SC_LOGIC_0;
    static int apTFileNum = 0;
    stringstream apTFilenSS;
    apTFilenSS << "lcddrv_sc_trace_" << apTFileNum ++;
    string apTFn = apTFilenSS.str();
    mVcdFile = sc_create_vcd_trace_file(apTFn.c_str());
    mVcdFile->set_time_unit(1, SC_PS);
    if (1) {
#ifdef __HLS_TRACE_LEVEL_PORT__
    sc_trace(mVcdFile, ap_clk, "(port)ap_clk");
    sc_trace(mVcdFile, ap_rst, "(port)ap_rst");
    sc_trace(mVcdFile, ap_start, "(port)ap_start");
    sc_trace(mVcdFile, ap_done, "(port)ap_done");
    sc_trace(mVcdFile, ap_idle, "(port)ap_idle");
    sc_trace(mVcdFile, ap_ready, "(port)ap_ready");
    sc_trace(mVcdFile, dummy_tmr_out_i, "(port)dummy_tmr_out_i");
    sc_trace(mVcdFile, dummy_tmr_out_o, "(port)dummy_tmr_out_o");
    sc_trace(mVcdFile, rs_i, "(port)rs_i");
    sc_trace(mVcdFile, rs_o, "(port)rs_o");
    sc_trace(mVcdFile, en_i, "(port)en_i");
    sc_trace(mVcdFile, en_o, "(port)en_o");
    sc_trace(mVcdFile, data_i, "(port)data_i");
    sc_trace(mVcdFile, data_o, "(port)data_o");
    sc_trace(mVcdFile, ind, "(port)ind");
    sc_trace(mVcdFile, mem_addr_i, "(port)mem_addr_i");
    sc_trace(mVcdFile, mem_addr_o, "(port)mem_addr_o");
    sc_trace(mVcdFile, mem_din, "(port)mem_din");
    sc_trace(mVcdFile, mem_req_i, "(port)mem_req_i");
    sc_trace(mVcdFile, mem_req_o, "(port)mem_req_o");
    sc_trace(mVcdFile, mem_ack, "(port)mem_ack");
#endif
#ifdef __HLS_TRACE_LEVEL_INT__
    sc_trace(mVcdFile, ap_CS_fsm, "ap_CS_fsm");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st1_fsm_0, "ap_sig_cseq_ST_st1_fsm_0");
    sc_trace(mVcdFile, ap_sig_37, "ap_sig_37");
    sc_trace(mVcdFile, dummy_tmr_out_0_data_reg, "dummy_tmr_out_0_data_reg");
    sc_trace(mVcdFile, dummy_tmr_out_0_vld_reg, "dummy_tmr_out_0_vld_reg");
    sc_trace(mVcdFile, dummy_tmr_out_0_ack_out, "dummy_tmr_out_0_ack_out");
    sc_trace(mVcdFile, dummy_tmr_out_1_data_reg, "dummy_tmr_out_1_data_reg");
    sc_trace(mVcdFile, dummy_tmr_out_1_data_in, "dummy_tmr_out_1_data_in");
    sc_trace(mVcdFile, dummy_tmr_out_1_vld_reg, "dummy_tmr_out_1_vld_reg");
    sc_trace(mVcdFile, dummy_tmr_out_1_vld_in, "dummy_tmr_out_1_vld_in");
    sc_trace(mVcdFile, rs_1_data_reg, "rs_1_data_reg");
    sc_trace(mVcdFile, rs_1_data_in, "rs_1_data_in");
    sc_trace(mVcdFile, rs_1_vld_reg, "rs_1_vld_reg");
    sc_trace(mVcdFile, rs_1_vld_in, "rs_1_vld_in");
    sc_trace(mVcdFile, en_1_data_reg, "en_1_data_reg");
    sc_trace(mVcdFile, en_1_data_in, "en_1_data_in");
    sc_trace(mVcdFile, en_1_vld_reg, "en_1_vld_reg");
    sc_trace(mVcdFile, en_1_vld_in, "en_1_vld_in");
    sc_trace(mVcdFile, data_1_data_reg, "data_1_data_reg");
    sc_trace(mVcdFile, data_1_data_in, "data_1_data_in");
    sc_trace(mVcdFile, data_1_vld_reg, "data_1_vld_reg");
    sc_trace(mVcdFile, data_1_vld_in, "data_1_vld_in");
    sc_trace(mVcdFile, mem_addr_1_data_reg, "mem_addr_1_data_reg");
    sc_trace(mVcdFile, mem_addr_1_vld_reg, "mem_addr_1_vld_reg");
    sc_trace(mVcdFile, mem_addr_1_vld_in, "mem_addr_1_vld_in");
    sc_trace(mVcdFile, mem_req_1_data_reg, "mem_req_1_data_reg");
    sc_trace(mVcdFile, mem_req_1_vld_reg, "mem_req_1_vld_reg");
    sc_trace(mVcdFile, mem_req_1_vld_in, "mem_req_1_vld_in");
    sc_trace(mVcdFile, reg_231, "reg_231");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st10_fsm_9, "ap_sig_cseq_ST_st10_fsm_9");
    sc_trace(mVcdFile, ap_sig_381, "ap_sig_381");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_ap_done, "grp_lcddrv_read_mem_fu_206_ap_done");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st18_fsm_17, "ap_sig_cseq_ST_st18_fsm_17");
    sc_trace(mVcdFile, ap_sig_392, "ap_sig_392");
    sc_trace(mVcdFile, pos_2_fu_242_p2, "pos_2_fu_242_p2");
    sc_trace(mVcdFile, pos_2_reg_276, "pos_2_reg_276");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st9_fsm_8, "ap_sig_cseq_ST_st9_fsm_8");
    sc_trace(mVcdFile, ap_sig_403, "ap_sig_403");
    sc_trace(mVcdFile, tmp_2_fu_248_p1, "tmp_2_fu_248_p1");
    sc_trace(mVcdFile, tmp_2_reg_281, "tmp_2_reg_281");
    sc_trace(mVcdFile, tmp_3_fu_258_p1, "tmp_3_fu_258_p1");
    sc_trace(mVcdFile, tmp_3_reg_289, "tmp_3_reg_289");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st17_fsm_16, "ap_sig_cseq_ST_st17_fsm_16");
    sc_trace(mVcdFile, ap_sig_414, "ap_sig_414");
    sc_trace(mVcdFile, exitcond_fu_252_p2, "exitcond_fu_252_p2");
    sc_trace(mVcdFile, pos_3_fu_263_p2, "pos_3_fu_263_p2");
    sc_trace(mVcdFile, pos_3_reg_294, "pos_3_reg_294");
    sc_trace(mVcdFile, tmp_4_fu_269_p1, "tmp_4_fu_269_p1");
    sc_trace(mVcdFile, tmp_4_reg_299, "tmp_4_reg_299");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_ap_start, "grp_lcddrv_init_lcd_fu_167_ap_start");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_ap_done, "grp_lcddrv_init_lcd_fu_167_ap_done");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_ap_idle, "grp_lcddrv_init_lcd_fu_167_ap_idle");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_ap_ready, "grp_lcddrv_init_lcd_fu_167_ap_ready");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o, "grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld, "grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_en, "grp_lcddrv_init_lcd_fu_167_en");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_en_ap_vld, "grp_lcddrv_init_lcd_fu_167_en_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_rs, "grp_lcddrv_init_lcd_fu_167_rs");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_rs_ap_vld, "grp_lcddrv_init_lcd_fu_167_rs_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_data, "grp_lcddrv_init_lcd_fu_167_data");
    sc_trace(mVcdFile, grp_lcddrv_init_lcd_fu_167_data_ap_vld, "grp_lcddrv_init_lcd_fu_167_data_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_ap_start, "grp_lcddrv_lcd_send_cmd_fu_179_ap_start");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_ap_done, "grp_lcddrv_lcd_send_cmd_fu_179_ap_done");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_ap_idle, "grp_lcddrv_lcd_send_cmd_fu_179_ap_idle");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_ap_ready, "grp_lcddrv_lcd_send_cmd_fu_179_ap_ready");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_mode, "grp_lcddrv_lcd_send_cmd_fu_179_mode");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_wd, "grp_lcddrv_lcd_send_cmd_fu_179_wd");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_en, "grp_lcddrv_lcd_send_cmd_fu_179_en");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld, "grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o, "grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld, "grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_rs, "grp_lcddrv_lcd_send_cmd_fu_179_rs");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld, "grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_data, "grp_lcddrv_lcd_send_cmd_fu_179_data");
    sc_trace(mVcdFile, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld, "grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_wait_tmr_fu_198_ap_start, "grp_lcddrv_wait_tmr_fu_198_ap_start");
    sc_trace(mVcdFile, grp_lcddrv_wait_tmr_fu_198_ap_done, "grp_lcddrv_wait_tmr_fu_198_ap_done");
    sc_trace(mVcdFile, grp_lcddrv_wait_tmr_fu_198_ap_idle, "grp_lcddrv_wait_tmr_fu_198_ap_idle");
    sc_trace(mVcdFile, grp_lcddrv_wait_tmr_fu_198_ap_ready, "grp_lcddrv_wait_tmr_fu_198_ap_ready");
    sc_trace(mVcdFile, grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o, "grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o");
    sc_trace(mVcdFile, grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld, "grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_ap_start, "grp_lcddrv_read_mem_fu_206_ap_start");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_ap_idle, "grp_lcddrv_read_mem_fu_206_ap_idle");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_ap_ready, "grp_lcddrv_read_mem_fu_206_ap_ready");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_addr, "grp_lcddrv_read_mem_fu_206_addr");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_mem_addr, "grp_lcddrv_read_mem_fu_206_mem_addr");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_mem_addr_ap_vld, "grp_lcddrv_read_mem_fu_206_mem_addr_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_mem_req, "grp_lcddrv_read_mem_fu_206_mem_req");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_mem_req_ap_vld, "grp_lcddrv_read_mem_fu_206_mem_req_ap_vld");
    sc_trace(mVcdFile, grp_lcddrv_read_mem_fu_206_ap_return, "grp_lcddrv_read_mem_fu_206_ap_return");
    sc_trace(mVcdFile, pos_reg_144, "pos_reg_144");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st8_fsm_7, "ap_sig_cseq_ST_st8_fsm_7");
    sc_trace(mVcdFile, ap_sig_485, "ap_sig_485");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st13_fsm_12, "ap_sig_cseq_ST_st13_fsm_12");
    sc_trace(mVcdFile, ap_sig_495, "ap_sig_495");
    sc_trace(mVcdFile, pos_1_reg_156, "pos_1_reg_156");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st16_fsm_15, "ap_sig_cseq_ST_st16_fsm_15");
    sc_trace(mVcdFile, ap_sig_506, "ap_sig_506");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st21_fsm_20, "ap_sig_cseq_ST_st21_fsm_20");
    sc_trace(mVcdFile, ap_sig_514, "ap_sig_514");
    sc_trace(mVcdFile, ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start, "ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st3_fsm_2, "ap_sig_cseq_ST_st3_fsm_2");
    sc_trace(mVcdFile, ap_sig_524, "ap_sig_524");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st4_fsm_3, "ap_sig_cseq_ST_st4_fsm_3");
    sc_trace(mVcdFile, ap_sig_531, "ap_sig_531");
    sc_trace(mVcdFile, ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start, "ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st5_fsm_4, "ap_sig_cseq_ST_st5_fsm_4");
    sc_trace(mVcdFile, ap_sig_548, "ap_sig_548");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st7_fsm_6, "ap_sig_cseq_ST_st7_fsm_6");
    sc_trace(mVcdFile, ap_sig_555, "ap_sig_555");
    sc_trace(mVcdFile, exitcond1_fu_236_p2, "exitcond1_fu_236_p2");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st12_fsm_11, "ap_sig_cseq_ST_st12_fsm_11");
    sc_trace(mVcdFile, ap_sig_569, "ap_sig_569");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st15_fsm_14, "ap_sig_cseq_ST_st15_fsm_14");
    sc_trace(mVcdFile, ap_sig_577, "ap_sig_577");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st20_fsm_19, "ap_sig_cseq_ST_st20_fsm_19");
    sc_trace(mVcdFile, ap_sig_586, "ap_sig_586");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st6_fsm_5, "ap_sig_cseq_ST_st6_fsm_5");
    sc_trace(mVcdFile, ap_sig_594, "ap_sig_594");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st14_fsm_13, "ap_sig_cseq_ST_st14_fsm_13");
    sc_trace(mVcdFile, ap_sig_602, "ap_sig_602");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st11_fsm_10, "ap_sig_cseq_ST_st11_fsm_10");
    sc_trace(mVcdFile, ap_sig_610, "ap_sig_610");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st19_fsm_18, "ap_sig_cseq_ST_st19_fsm_18");
    sc_trace(mVcdFile, ap_sig_619, "ap_sig_619");
    sc_trace(mVcdFile, ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start, "ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start");
    sc_trace(mVcdFile, ap_sig_cseq_ST_st22_fsm_21, "ap_sig_cseq_ST_st22_fsm_21");
    sc_trace(mVcdFile, ap_sig_706, "ap_sig_706");
    sc_trace(mVcdFile, ap_reg_grp_lcddrv_read_mem_fu_206_ap_start, "ap_reg_grp_lcddrv_read_mem_fu_206_ap_start");
    sc_trace(mVcdFile, ap_NS_fsm, "ap_NS_fsm");
#endif

    }
    mHdltvinHandle.open("lcddrv.hdltvin.dat");
    mHdltvoutHandle.open("lcddrv.hdltvout.dat");
}

lcddrv::~lcddrv() {
    if (mVcdFile) 
        sc_close_vcd_trace_file(mVcdFile);

    mHdltvinHandle << "] " << endl;
    mHdltvoutHandle << "] " << endl;
    mHdltvinHandle.close();
    mHdltvoutHandle.close();
    delete grp_lcddrv_init_lcd_fu_167;
    delete grp_lcddrv_lcd_send_cmd_fu_179;
    delete grp_lcddrv_wait_tmr_fu_198;
    delete grp_lcddrv_read_mem_fu_206;
}

void lcddrv::thread_ap_var_for_const0() {
    ap_var_for_const0 = ap_const_lv25_989680;
}

void lcddrv::thread_ap_clk_no_reset_() {
    if ( ap_rst.read() == ap_const_logic_1) {
        ap_CS_fsm = ap_ST_st1_fsm_0;
    } else {
        ap_CS_fsm = ap_NS_fsm.read();
    }
    if ( ap_rst.read() == ap_const_logic_1) {
        ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start = ap_const_logic_0;
    } else {
        if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st3_fsm_2.read())) {
            ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start = ap_const_logic_1;
        } else if (esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_init_lcd_fu_167_ap_ready.read())) {
            ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start = ap_const_logic_0;
        }
    }
    if ( ap_rst.read() == ap_const_logic_1) {
        ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start = ap_const_logic_0;
    } else {
        if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read()) && 
              !esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read())) || 
             (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read()) && 
              esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st18_fsm_17.read())) || 
             esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st5_fsm_4.read()) || 
             esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st7_fsm_6.read()) || 
             (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st9_fsm_8.read()) && 
              !esl_seteq<1,1,1>(ap_const_lv1_0, exitcond1_fu_236_p2.read())) || 
             esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st12_fsm_11.read()) || 
             esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st15_fsm_14.read()) || 
             esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st20_fsm_19.read()))) {
            ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start = ap_const_logic_1;
        } else if (esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_ap_ready.read())) {
            ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start = ap_const_logic_0;
        }
    }
    if ( ap_rst.read() == ap_const_logic_1) {
        ap_reg_grp_lcddrv_read_mem_fu_206_ap_start = ap_const_logic_0;
    } else {
        if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read()) && 
              esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_252_p2.read())) || 
             (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st9_fsm_8.read()) && 
              esl_seteq<1,1,1>(ap_const_lv1_0, exitcond1_fu_236_p2.read())))) {
            ap_reg_grp_lcddrv_read_mem_fu_206_ap_start = ap_const_logic_1;
        } else if (esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_read_mem_fu_206_ap_ready.read())) {
            ap_reg_grp_lcddrv_read_mem_fu_206_ap_start = ap_const_logic_0;
        }
    }
    if ( ap_rst.read() == ap_const_logic_1) {
        ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start = ap_const_logic_0;
    } else {
        if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read()) && 
             !esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_252_p2.read()))) {
            ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start = ap_const_logic_1;
        } else if (esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_wait_tmr_fu_198_ap_ready.read())) {
            ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start = ap_const_logic_0;
        }
    }
    if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
        if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read())) {
            pos_1_reg_156 = pos_3_reg_294.read();
        } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read())) {
            pos_1_reg_156 = ap_const_lv6_10;
        }
    }
    if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
        if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read())) {
            pos_reg_144 = pos_2_reg_276.read();
        } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read())) {
            pos_reg_144 = ap_const_lv5_0;
        }
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, data_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, data_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, data_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, data_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        data_1_data_reg = data_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_0, dummy_tmr_out_0_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dummy_tmr_out_0_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dummy_tmr_out_0_ack_out.read())))) {
        dummy_tmr_out_0_data_reg = dummy_tmr_out_i.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dummy_tmr_out_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, dummy_tmr_out_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dummy_tmr_out_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, dummy_tmr_out_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        dummy_tmr_out_1_data_reg = dummy_tmr_out_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, en_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, en_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, en_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, en_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        en_1_data_reg = en_1_data_in.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, mem_addr_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, mem_addr_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, mem_addr_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, mem_addr_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        mem_addr_1_data_reg = grp_lcddrv_read_mem_fu_206_mem_addr.read();
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, mem_req_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, mem_req_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, mem_req_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, mem_req_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        mem_req_1_data_reg = grp_lcddrv_read_mem_fu_206_mem_req.read();
    }
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st9_fsm_8.read())) {
        pos_2_reg_276 = pos_2_fu_242_p2.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st17_fsm_16.read()) && esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_252_p2.read()))) {
        pos_3_reg_294 = pos_3_fu_263_p2.read();
        tmp_3_reg_289 = tmp_3_fu_258_p1.read();
    }
    if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read()) && 
  !esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read())) || (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st18_fsm_17.read())))) {
        reg_231 = grp_lcddrv_read_mem_fu_206_ap_return.read().range(7, 4);
    }
    if (((!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, rs_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_0, rs_1_vld_reg.read())) || (!(esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read())) && 
  esl_seteq<1,1,1>(ap_const_logic_1, rs_1_vld_in.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, rs_1_vld_reg.read()) && 
  esl_seteq<1,1,1>(ap_const_logic_1, ap_const_logic_1)))) {
        rs_1_data_reg = rs_1_data_in.read();
    }
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read()) && !esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read()))) {
        tmp_2_reg_281 = tmp_2_fu_248_p1.read();
    }
    if ((!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read()) && esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st18_fsm_17.read()))) {
        tmp_4_reg_299 = tmp_4_fu_269_p1.read();
    }
}

void lcddrv::thread_ap_done() {
    ap_done = ap_const_logic_0;
}

void lcddrv::thread_ap_idle() {
    if ((esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st1_fsm_0.read()))) {
        ap_idle = ap_const_logic_1;
    } else {
        ap_idle = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_ready() {
    ap_ready = ap_const_logic_0;
}

void lcddrv::thread_ap_sig_37() {
    ap_sig_37 = esl_seteq<1,1,1>(ap_CS_fsm.read().range(0, 0), ap_const_lv1_1);
}

void lcddrv::thread_ap_sig_381() {
    ap_sig_381 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(9, 9));
}

void lcddrv::thread_ap_sig_392() {
    ap_sig_392 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(17, 17));
}

void lcddrv::thread_ap_sig_403() {
    ap_sig_403 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(8, 8));
}

void lcddrv::thread_ap_sig_414() {
    ap_sig_414 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(16, 16));
}

void lcddrv::thread_ap_sig_485() {
    ap_sig_485 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(7, 7));
}

void lcddrv::thread_ap_sig_495() {
    ap_sig_495 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(12, 12));
}

void lcddrv::thread_ap_sig_506() {
    ap_sig_506 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(15, 15));
}

void lcddrv::thread_ap_sig_514() {
    ap_sig_514 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(20, 20));
}

void lcddrv::thread_ap_sig_524() {
    ap_sig_524 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(2, 2));
}

void lcddrv::thread_ap_sig_531() {
    ap_sig_531 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(3, 3));
}

void lcddrv::thread_ap_sig_548() {
    ap_sig_548 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(4, 4));
}

void lcddrv::thread_ap_sig_555() {
    ap_sig_555 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(6, 6));
}

void lcddrv::thread_ap_sig_569() {
    ap_sig_569 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(11, 11));
}

void lcddrv::thread_ap_sig_577() {
    ap_sig_577 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(14, 14));
}

void lcddrv::thread_ap_sig_586() {
    ap_sig_586 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(19, 19));
}

void lcddrv::thread_ap_sig_594() {
    ap_sig_594 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(5, 5));
}

void lcddrv::thread_ap_sig_602() {
    ap_sig_602 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(13, 13));
}

void lcddrv::thread_ap_sig_610() {
    ap_sig_610 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(10, 10));
}

void lcddrv::thread_ap_sig_619() {
    ap_sig_619 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(18, 18));
}

void lcddrv::thread_ap_sig_706() {
    ap_sig_706 = esl_seteq<1,1,1>(ap_const_lv1_1, ap_CS_fsm.read().range(21, 21));
}

void lcddrv::thread_ap_sig_cseq_ST_st10_fsm_9() {
    if (ap_sig_381.read()) {
        ap_sig_cseq_ST_st10_fsm_9 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st10_fsm_9 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st11_fsm_10() {
    if (ap_sig_610.read()) {
        ap_sig_cseq_ST_st11_fsm_10 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st11_fsm_10 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st12_fsm_11() {
    if (ap_sig_569.read()) {
        ap_sig_cseq_ST_st12_fsm_11 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st12_fsm_11 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st13_fsm_12() {
    if (ap_sig_495.read()) {
        ap_sig_cseq_ST_st13_fsm_12 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st13_fsm_12 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st14_fsm_13() {
    if (ap_sig_602.read()) {
        ap_sig_cseq_ST_st14_fsm_13 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st14_fsm_13 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st15_fsm_14() {
    if (ap_sig_577.read()) {
        ap_sig_cseq_ST_st15_fsm_14 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st15_fsm_14 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st16_fsm_15() {
    if (ap_sig_506.read()) {
        ap_sig_cseq_ST_st16_fsm_15 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st16_fsm_15 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st17_fsm_16() {
    if (ap_sig_414.read()) {
        ap_sig_cseq_ST_st17_fsm_16 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st17_fsm_16 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st18_fsm_17() {
    if (ap_sig_392.read()) {
        ap_sig_cseq_ST_st18_fsm_17 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st18_fsm_17 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st19_fsm_18() {
    if (ap_sig_619.read()) {
        ap_sig_cseq_ST_st19_fsm_18 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st19_fsm_18 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st1_fsm_0() {
    if (ap_sig_37.read()) {
        ap_sig_cseq_ST_st1_fsm_0 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st1_fsm_0 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st20_fsm_19() {
    if (ap_sig_586.read()) {
        ap_sig_cseq_ST_st20_fsm_19 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st20_fsm_19 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st21_fsm_20() {
    if (ap_sig_514.read()) {
        ap_sig_cseq_ST_st21_fsm_20 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st21_fsm_20 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st22_fsm_21() {
    if (ap_sig_706.read()) {
        ap_sig_cseq_ST_st22_fsm_21 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st22_fsm_21 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st3_fsm_2() {
    if (ap_sig_524.read()) {
        ap_sig_cseq_ST_st3_fsm_2 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st3_fsm_2 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st4_fsm_3() {
    if (ap_sig_531.read()) {
        ap_sig_cseq_ST_st4_fsm_3 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st4_fsm_3 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st5_fsm_4() {
    if (ap_sig_548.read()) {
        ap_sig_cseq_ST_st5_fsm_4 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st5_fsm_4 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st6_fsm_5() {
    if (ap_sig_594.read()) {
        ap_sig_cseq_ST_st6_fsm_5 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st6_fsm_5 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st7_fsm_6() {
    if (ap_sig_555.read()) {
        ap_sig_cseq_ST_st7_fsm_6 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st7_fsm_6 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st8_fsm_7() {
    if (ap_sig_485.read()) {
        ap_sig_cseq_ST_st8_fsm_7 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st8_fsm_7 = ap_const_logic_0;
    }
}

void lcddrv::thread_ap_sig_cseq_ST_st9_fsm_8() {
    if (ap_sig_403.read()) {
        ap_sig_cseq_ST_st9_fsm_8 = ap_const_logic_1;
    } else {
        ap_sig_cseq_ST_st9_fsm_8 = ap_const_logic_0;
    }
}

void lcddrv::thread_data_1_data_in() {
    if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read())))) {
        data_1_data_in = grp_lcddrv_lcd_send_cmd_fu_179_data.read();
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
                esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_init_lcd_fu_167_data_ap_vld.read()))) {
        data_1_data_in = grp_lcddrv_init_lcd_fu_167_data.read();
    } else {
        data_1_data_in = "XXXX";
    }
}

void lcddrv::thread_data_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()))) {
        data_1_vld_in = grp_lcddrv_lcd_send_cmd_fu_179_data_ap_vld.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read())) {
        data_1_vld_in = grp_lcddrv_init_lcd_fu_167_data_ap_vld.read();
    } else {
        data_1_vld_in = ap_const_logic_0;
    }
}

void lcddrv::thread_data_o() {
    data_o = data_1_data_reg.read();
}

void lcddrv::thread_dummy_tmr_out_0_ack_out() {
    dummy_tmr_out_0_ack_out = ap_const_logic_0;
}

void lcddrv::thread_dummy_tmr_out_1_data_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st22_fsm_21.read()) && 
         esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld.read()))) {
        dummy_tmr_out_1_data_in = grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o.read();
    } else if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())) || 
                (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) && 
                 esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read())))) {
        dummy_tmr_out_1_data_in = grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o.read();
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
                esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld.read()))) {
        dummy_tmr_out_1_data_in = grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o.read();
    } else {
        dummy_tmr_out_1_data_in =  (sc_lv<1>) ("X");
    }
}

void lcddrv::thread_dummy_tmr_out_1_vld_in() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st22_fsm_21.read())) {
        dummy_tmr_out_1_vld_in = grp_lcddrv_wait_tmr_fu_198_dummy_tmr_out_o_ap_vld.read();
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()))) {
        dummy_tmr_out_1_vld_in = grp_lcddrv_lcd_send_cmd_fu_179_dummy_tmr_out_o_ap_vld.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read())) {
        dummy_tmr_out_1_vld_in = grp_lcddrv_init_lcd_fu_167_dummy_tmr_out_o_ap_vld.read();
    } else {
        dummy_tmr_out_1_vld_in = ap_const_logic_0;
    }
}

void lcddrv::thread_dummy_tmr_out_o() {
    dummy_tmr_out_o = dummy_tmr_out_1_data_reg.read();
}

void lcddrv::thread_en_1_data_in() {
    if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read())))) {
        en_1_data_in = grp_lcddrv_lcd_send_cmd_fu_179_en.read();
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
                esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_init_lcd_fu_167_en_ap_vld.read()))) {
        en_1_data_in = grp_lcddrv_init_lcd_fu_167_en.read();
    } else {
        en_1_data_in =  (sc_lv<1>) ("X");
    }
}

void lcddrv::thread_en_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()))) {
        en_1_vld_in = grp_lcddrv_lcd_send_cmd_fu_179_en_ap_vld.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read())) {
        en_1_vld_in = grp_lcddrv_init_lcd_fu_167_en_ap_vld.read();
    } else {
        en_1_vld_in = ap_const_logic_0;
    }
}

void lcddrv::thread_en_o() {
    en_o = en_1_data_reg.read();
}

void lcddrv::thread_exitcond1_fu_236_p2() {
    exitcond1_fu_236_p2 = (!pos_reg_144.read().is_01() || !ap_const_lv5_10.is_01())? sc_lv<1>(): sc_lv<1>(pos_reg_144.read() == ap_const_lv5_10);
}

void lcddrv::thread_exitcond_fu_252_p2() {
    exitcond_fu_252_p2 = (!pos_1_reg_156.read().is_01() || !ap_const_lv6_20.is_01())? sc_lv<1>(): sc_lv<1>(pos_1_reg_156.read() == ap_const_lv6_20);
}

void lcddrv::thread_grp_lcddrv_init_lcd_fu_167_ap_start() {
    grp_lcddrv_init_lcd_fu_167_ap_start = ap_reg_grp_lcddrv_init_lcd_fu_167_ap_start.read();
}

void lcddrv::thread_grp_lcddrv_lcd_send_cmd_fu_179_ap_start() {
    grp_lcddrv_lcd_send_cmd_fu_179_ap_start = ap_reg_grp_lcddrv_lcd_send_cmd_fu_179_ap_start.read();
}

void lcddrv::thread_grp_lcddrv_lcd_send_cmd_fu_179_mode() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()))) {
        grp_lcddrv_lcd_send_cmd_fu_179_mode = ap_const_lv1_1;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()))) {
        grp_lcddrv_lcd_send_cmd_fu_179_mode = ap_const_lv1_0;
    } else {
        grp_lcddrv_lcd_send_cmd_fu_179_mode =  (sc_lv<1>) ("X");
    }
}

void lcddrv::thread_grp_lcddrv_lcd_send_cmd_fu_179_wd() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read())) {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = tmp_4_reg_299.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read())) {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = tmp_2_reg_281.read();
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()))) {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = reg_231.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read())) {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = ap_const_lv4_C;
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) || 
                esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()))) {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = ap_const_lv4_0;
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read())) {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = ap_const_lv4_8;
    } else {
        grp_lcddrv_lcd_send_cmd_fu_179_wd = "XXXX";
    }
}

void lcddrv::thread_grp_lcddrv_read_mem_fu_206_addr() {
    if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st18_fsm_17.read())) {
        grp_lcddrv_read_mem_fu_206_addr = tmp_3_reg_289.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read())) {
        grp_lcddrv_read_mem_fu_206_addr = pos_reg_144.read();
    } else {
        grp_lcddrv_read_mem_fu_206_addr =  (sc_lv<5>) ("XXXXX");
    }
}

void lcddrv::thread_grp_lcddrv_read_mem_fu_206_ap_start() {
    grp_lcddrv_read_mem_fu_206_ap_start = ap_reg_grp_lcddrv_read_mem_fu_206_ap_start.read();
}

void lcddrv::thread_grp_lcddrv_wait_tmr_fu_198_ap_start() {
    grp_lcddrv_wait_tmr_fu_198_ap_start = ap_reg_grp_lcddrv_wait_tmr_fu_198_ap_start.read();
}

void lcddrv::thread_mem_addr_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st18_fsm_17.read()))) {
        mem_addr_1_vld_in = grp_lcddrv_read_mem_fu_206_mem_addr_ap_vld.read();
    } else {
        mem_addr_1_vld_in = ap_const_logic_0;
    }
}

void lcddrv::thread_mem_addr_o() {
    mem_addr_o = mem_addr_1_data_reg.read();
}

void lcddrv::thread_mem_req_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st10_fsm_9.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st18_fsm_17.read()))) {
        mem_req_1_vld_in = grp_lcddrv_read_mem_fu_206_mem_req_ap_vld.read();
    } else {
        mem_req_1_vld_in = ap_const_logic_0;
    }
}

void lcddrv::thread_mem_req_o() {
    mem_req_o = mem_req_1_data_reg.read();
}

void lcddrv::thread_pos_2_fu_242_p2() {
    pos_2_fu_242_p2 = (!pos_reg_144.read().is_01() || !ap_const_lv5_1.is_01())? sc_lv<5>(): (sc_biguint<5>(pos_reg_144.read()) + sc_biguint<5>(ap_const_lv5_1));
}

void lcddrv::thread_pos_3_fu_263_p2() {
    pos_3_fu_263_p2 = (!ap_const_lv6_1.is_01() || !pos_1_reg_156.read().is_01())? sc_lv<6>(): (sc_biguint<6>(ap_const_lv6_1) + sc_biguint<6>(pos_1_reg_156.read()));
}

void lcddrv::thread_rs_1_data_in() {
    if (((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())) || 
         (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) && 
          esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read())))) {
        rs_1_data_in = grp_lcddrv_lcd_send_cmd_fu_179_rs.read();
    } else if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read()) && 
                esl_seteq<1,1,1>(ap_const_logic_1, grp_lcddrv_init_lcd_fu_167_rs_ap_vld.read()))) {
        rs_1_data_in = grp_lcddrv_init_lcd_fu_167_rs.read();
    } else {
        rs_1_data_in =  (sc_lv<1>) ("X");
    }
}

void lcddrv::thread_rs_1_vld_in() {
    if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st8_fsm_7.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st13_fsm_12.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st16_fsm_15.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st21_fsm_20.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st6_fsm_5.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st14_fsm_13.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st11_fsm_10.read()) || 
         esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st19_fsm_18.read()))) {
        rs_1_vld_in = grp_lcddrv_lcd_send_cmd_fu_179_rs_ap_vld.read();
    } else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_sig_cseq_ST_st4_fsm_3.read())) {
        rs_1_vld_in = grp_lcddrv_init_lcd_fu_167_rs_ap_vld.read();
    } else {
        rs_1_vld_in = ap_const_logic_0;
    }
}

void lcddrv::thread_rs_o() {
    rs_o = rs_1_data_reg.read();
}

void lcddrv::thread_tmp_2_fu_248_p1() {
    tmp_2_fu_248_p1 = grp_lcddrv_read_mem_fu_206_ap_return.read().range(4-1, 0);
}

void lcddrv::thread_tmp_3_fu_258_p1() {
    tmp_3_fu_258_p1 = pos_1_reg_156.read().range(5-1, 0);
}

void lcddrv::thread_tmp_4_fu_269_p1() {
    tmp_4_fu_269_p1 = grp_lcddrv_read_mem_fu_206_ap_return.read().range(4-1, 0);
}

void lcddrv::thread_ap_NS_fsm() {
    switch (ap_CS_fsm.read().to_uint64()) {
        case 1 : 
            if (!esl_seteq<1,1,1>(ap_start.read(), ap_const_logic_0)) {
                ap_NS_fsm = ap_ST_st2_fsm_1;
            } else {
                ap_NS_fsm = ap_ST_st1_fsm_0;
            }
            break;
        case 2 : 
            ap_NS_fsm = ap_ST_st3_fsm_2;
            break;
        case 4 : 
            ap_NS_fsm = ap_ST_st4_fsm_3;
            break;
        case 8 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_init_lcd_fu_167_ap_done.read())) {
                ap_NS_fsm = ap_ST_st5_fsm_4;
            } else {
                ap_NS_fsm = ap_ST_st4_fsm_3;
            }
            break;
        case 16 : 
            ap_NS_fsm = ap_ST_st6_fsm_5;
            break;
        case 32 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st7_fsm_6;
            } else {
                ap_NS_fsm = ap_ST_st6_fsm_5;
            }
            break;
        case 64 : 
            ap_NS_fsm = ap_ST_st8_fsm_7;
            break;
        case 128 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st9_fsm_8;
            } else {
                ap_NS_fsm = ap_ST_st8_fsm_7;
            }
            break;
        case 256 : 
            if (!esl_seteq<1,1,1>(ap_const_lv1_0, exitcond1_fu_236_p2.read())) {
                ap_NS_fsm = ap_ST_st14_fsm_13;
            } else {
                ap_NS_fsm = ap_ST_st10_fsm_9;
            }
            break;
        case 512 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read())) {
                ap_NS_fsm = ap_ST_st11_fsm_10;
            } else {
                ap_NS_fsm = ap_ST_st10_fsm_9;
            }
            break;
        case 1024 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st12_fsm_11;
            } else {
                ap_NS_fsm = ap_ST_st11_fsm_10;
            }
            break;
        case 2048 : 
            ap_NS_fsm = ap_ST_st13_fsm_12;
            break;
        case 4096 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st9_fsm_8;
            } else {
                ap_NS_fsm = ap_ST_st13_fsm_12;
            }
            break;
        case 8192 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st15_fsm_14;
            } else {
                ap_NS_fsm = ap_ST_st14_fsm_13;
            }
            break;
        case 16384 : 
            ap_NS_fsm = ap_ST_st16_fsm_15;
            break;
        case 32768 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st17_fsm_16;
            } else {
                ap_NS_fsm = ap_ST_st16_fsm_15;
            }
            break;
        case 65536 : 
            if (!esl_seteq<1,1,1>(ap_const_lv1_0, exitcond_fu_252_p2.read())) {
                ap_NS_fsm = ap_ST_st22_fsm_21;
            } else {
                ap_NS_fsm = ap_ST_st18_fsm_17;
            }
            break;
        case 131072 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_read_mem_fu_206_ap_done.read())) {
                ap_NS_fsm = ap_ST_st19_fsm_18;
            } else {
                ap_NS_fsm = ap_ST_st18_fsm_17;
            }
            break;
        case 262144 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st20_fsm_19;
            } else {
                ap_NS_fsm = ap_ST_st19_fsm_18;
            }
            break;
        case 524288 : 
            ap_NS_fsm = ap_ST_st21_fsm_20;
            break;
        case 1048576 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_lcd_send_cmd_fu_179_ap_done.read())) {
                ap_NS_fsm = ap_ST_st17_fsm_16;
            } else {
                ap_NS_fsm = ap_ST_st21_fsm_20;
            }
            break;
        case 2097152 : 
            if (!esl_seteq<1,1,1>(ap_const_logic_0, grp_lcddrv_wait_tmr_fu_198_ap_done.read())) {
                ap_NS_fsm = ap_ST_st5_fsm_4;
            } else {
                ap_NS_fsm = ap_ST_st22_fsm_21;
            }
            break;
        default : 
            ap_NS_fsm =  (sc_lv<22>) ("XXXXXXXXXXXXXXXXXXXXXX");
            break;
    }
}

void lcddrv::thread_hdltv_gen() {
    const char* dump_tv = std::getenv("AP_WRITE_TV");
    if (!(dump_tv && string(dump_tv) == "on")) return;

    wait();

    mHdltvinHandle << "[ " << endl;
    mHdltvoutHandle << "[ " << endl;
    int ap_cycleNo = 0;
    while (1) {
        wait();
        const char* mComma = ap_cycleNo == 0 ? " " : ", " ;
        mHdltvinHandle << mComma << "{"  <<  " \"ap_rst\" :  \"" << ap_rst.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"ap_start\" :  \"" << ap_start.read() << "\" ";
        mHdltvoutHandle << mComma << "{"  <<  " \"ap_done\" :  \"" << ap_done.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"ap_idle\" :  \"" << ap_idle.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"ap_ready\" :  \"" << ap_ready.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"dummy_tmr_out_i\" :  \"" << dummy_tmr_out_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"dummy_tmr_out_o\" :  \"" << dummy_tmr_out_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"rs_i\" :  \"" << rs_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"rs_o\" :  \"" << rs_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"en_i\" :  \"" << en_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"en_o\" :  \"" << en_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"data_i\" :  \"" << data_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"data_o\" :  \"" << data_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"ind\" :  \"" << ind.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"mem_addr_i\" :  \"" << mem_addr_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"mem_addr_o\" :  \"" << mem_addr_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"mem_din\" :  \"" << mem_din.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"mem_req_i\" :  \"" << mem_req_i.read() << "\" ";
        mHdltvoutHandle << " , " <<  " \"mem_req_o\" :  \"" << mem_req_o.read() << "\" ";
        mHdltvinHandle << " , " <<  " \"mem_ack\" :  \"" << mem_ack.read() << "\" ";
        mHdltvinHandle << "}" << std::endl;
        mHdltvoutHandle << "}" << std::endl;
        ap_cycleNo++;
    }
}

}

