// -----------------------------------------------------------------------------
// Auto-Generated by:        __   _ __      _  __
//                          / /  (_) /____ | |/_/
//                         / /__/ / __/ -_)>  <
//                        /____/_/\__/\__/_/|_|
//                     Build your hardware, easily!
//                   https://github.com/enjoy-digital/litex
//
// Filename   : litedram_core.v
// Device     : 
// LiteX sha1 : --------
// Date       : 2022-10-28 19:01:21
//------------------------------------------------------------------------------


//------------------------------------------------------------------------------
// Module
//------------------------------------------------------------------------------

module litedram_core (
    input  wire          clk,
    input  wire          rst,
    output wire          pll_locked,
    output wire   [14:0] ddram_a,
    output wire    [2:0] ddram_ba,
    output wire          ddram_ras_n,
    output wire          ddram_cas_n,
    output wire          ddram_we_n,
    output wire          ddram_cs_n,
    output wire    [3:0] ddram_dm,
    inout  wire   [31:0] ddram_dq,
    inout  wire    [3:0] ddram_dqs_p,
    inout  wire    [3:0] ddram_dqs_n,
    output wire          ddram_clk_p,
    output wire          ddram_clk_n,
    output wire          ddram_cke,
    output wire          ddram_odt,
    output wire          ddram_reset_n,
    output wire          init_done,
    output wire          init_error,
    input  wire   [29:0] wb_ctrl_adr,
    input  wire   [31:0] wb_ctrl_dat_w,
    output wire   [31:0] wb_ctrl_dat_r,
    input  wire    [3:0] wb_ctrl_sel,
    input  wire          wb_ctrl_cyc,
    input  wire          wb_ctrl_stb,
    output wire          wb_ctrl_ack,
    input  wire          wb_ctrl_we,
    input  wire    [2:0] wb_ctrl_cti,
    input  wire    [1:0] wb_ctrl_bte,
    output wire          wb_ctrl_err,
    output wire          user_clk,
    output wire          user_rst,
    input  wire          user_port_native_0_cmd_valid,
    output wire          user_port_native_0_cmd_ready,
    input  wire          user_port_native_0_cmd_we,
    input  wire   [24:0] user_port_native_0_cmd_addr,
    input  wire          user_port_native_0_wdata_valid,
    output wire          user_port_native_0_wdata_ready,
    input  wire   [31:0] user_port_native_0_wdata_we,
    input  wire  [255:0] user_port_native_0_wdata_data,
    output wire          user_port_native_0_rdata_valid,
    input  wire          user_port_native_0_rdata_ready,
    output wire  [255:0] user_port_native_0_rdata_data
);


//------------------------------------------------------------------------------
// Signals
//------------------------------------------------------------------------------

reg           rst_1 = 1'd0;
wire          sys_clk;
wire          sys_rst;
wire          sys4x_clk;
wire          sys4x_dqs_clk;
wire          iodelay_clk;
wire          iodelay_rst;
wire          reset;
reg           power_down = 1'd0;
wire          locked;
wire          clkin;
wire          clkout0;
wire          clkout_buf0;
wire          clkout1;
wire          clkout_buf1;
wire          clkout2;
wire          clkout_buf2;
wire          clkout3;
wire          clkout_buf3;
reg     [3:0] reset_counter = 4'd15;
reg           ic_reset = 1'd1;
reg           k7ddrphy_rst_storage = 1'd0;
reg           k7ddrphy_rst_re = 1'd0;
reg     [3:0] k7ddrphy_dly_sel_storage = 4'd0;
reg           k7ddrphy_dly_sel_re = 1'd0;
reg     [4:0] k7ddrphy_half_sys8x_taps_storage = 5'd8;
reg           k7ddrphy_half_sys8x_taps_re = 1'd0;
reg           k7ddrphy_wlevel_en_storage = 1'd0;
reg           k7ddrphy_wlevel_en_re = 1'd0;
reg           k7ddrphy_wlevel_strobe_re = 1'd0;
wire          k7ddrphy_wlevel_strobe_r;
reg           k7ddrphy_wlevel_strobe_we = 1'd0;
reg           k7ddrphy_wlevel_strobe_w = 1'd0;
reg           k7ddrphy_cdly_rst_re = 1'd0;
wire          k7ddrphy_cdly_rst_r;
reg           k7ddrphy_cdly_rst_we = 1'd0;
reg           k7ddrphy_cdly_rst_w = 1'd0;
reg           k7ddrphy_cdly_inc_re = 1'd0;
wire          k7ddrphy_cdly_inc_r;
reg           k7ddrphy_cdly_inc_we = 1'd0;
reg           k7ddrphy_cdly_inc_w = 1'd0;
reg           k7ddrphy_rdly_dq_rst_re = 1'd0;
wire          k7ddrphy_rdly_dq_rst_r;
reg           k7ddrphy_rdly_dq_rst_we = 1'd0;
reg           k7ddrphy_rdly_dq_rst_w = 1'd0;
reg           k7ddrphy_rdly_dq_inc_re = 1'd0;
wire          k7ddrphy_rdly_dq_inc_r;
reg           k7ddrphy_rdly_dq_inc_we = 1'd0;
reg           k7ddrphy_rdly_dq_inc_w = 1'd0;
reg           k7ddrphy_rdly_dq_bitslip_rst_re = 1'd0;
wire          k7ddrphy_rdly_dq_bitslip_rst_r;
reg           k7ddrphy_rdly_dq_bitslip_rst_we = 1'd0;
reg           k7ddrphy_rdly_dq_bitslip_rst_w = 1'd0;
reg           k7ddrphy_rdly_dq_bitslip_re = 1'd0;
wire          k7ddrphy_rdly_dq_bitslip_r;
reg           k7ddrphy_rdly_dq_bitslip_we = 1'd0;
reg           k7ddrphy_rdly_dq_bitslip_w = 1'd0;
reg           k7ddrphy_wdly_dq_rst_re = 1'd0;
wire          k7ddrphy_wdly_dq_rst_r;
reg           k7ddrphy_wdly_dq_rst_we = 1'd0;
reg           k7ddrphy_wdly_dq_rst_w = 1'd0;
reg           k7ddrphy_wdly_dq_inc_re = 1'd0;
wire          k7ddrphy_wdly_dq_inc_r;
reg           k7ddrphy_wdly_dq_inc_we = 1'd0;
reg           k7ddrphy_wdly_dq_inc_w = 1'd0;
reg           k7ddrphy_wdly_dqs_rst_re = 1'd0;
wire          k7ddrphy_wdly_dqs_rst_r;
reg           k7ddrphy_wdly_dqs_rst_we = 1'd0;
reg           k7ddrphy_wdly_dqs_rst_w = 1'd0;
reg           k7ddrphy_wdly_dqs_inc_re = 1'd0;
wire          k7ddrphy_wdly_dqs_inc_r;
reg           k7ddrphy_wdly_dqs_inc_we = 1'd0;
reg           k7ddrphy_wdly_dqs_inc_w = 1'd0;
reg           k7ddrphy_wdly_dq_bitslip_rst_re = 1'd0;
wire          k7ddrphy_wdly_dq_bitslip_rst_r;
reg           k7ddrphy_wdly_dq_bitslip_rst_we = 1'd0;
reg           k7ddrphy_wdly_dq_bitslip_rst_w = 1'd0;
reg           k7ddrphy_wdly_dq_bitslip_re = 1'd0;
wire          k7ddrphy_wdly_dq_bitslip_r;
reg           k7ddrphy_wdly_dq_bitslip_we = 1'd0;
reg           k7ddrphy_wdly_dq_bitslip_w = 1'd0;
reg     [1:0] k7ddrphy_rdphase_storage = 2'd1;
reg           k7ddrphy_rdphase_re = 1'd0;
reg     [1:0] k7ddrphy_wrphase_storage = 2'd2;
reg           k7ddrphy_wrphase_re = 1'd0;
wire   [14:0] k7ddrphy_dfi_p0_address;
wire    [2:0] k7ddrphy_dfi_p0_bank;
wire          k7ddrphy_dfi_p0_cas_n;
wire          k7ddrphy_dfi_p0_cs_n;
wire          k7ddrphy_dfi_p0_ras_n;
wire          k7ddrphy_dfi_p0_we_n;
wire          k7ddrphy_dfi_p0_cke;
wire          k7ddrphy_dfi_p0_odt;
wire          k7ddrphy_dfi_p0_reset_n;
wire          k7ddrphy_dfi_p0_act_n;
wire   [63:0] k7ddrphy_dfi_p0_wrdata;
wire          k7ddrphy_dfi_p0_wrdata_en;
wire    [7:0] k7ddrphy_dfi_p0_wrdata_mask;
wire          k7ddrphy_dfi_p0_rddata_en;
reg    [63:0] k7ddrphy_dfi_p0_rddata = 64'd0;
wire          k7ddrphy_dfi_p0_rddata_valid;
wire   [14:0] k7ddrphy_dfi_p1_address;
wire    [2:0] k7ddrphy_dfi_p1_bank;
wire          k7ddrphy_dfi_p1_cas_n;
wire          k7ddrphy_dfi_p1_cs_n;
wire          k7ddrphy_dfi_p1_ras_n;
wire          k7ddrphy_dfi_p1_we_n;
wire          k7ddrphy_dfi_p1_cke;
wire          k7ddrphy_dfi_p1_odt;
wire          k7ddrphy_dfi_p1_reset_n;
wire          k7ddrphy_dfi_p1_act_n;
wire   [63:0] k7ddrphy_dfi_p1_wrdata;
wire          k7ddrphy_dfi_p1_wrdata_en;
wire    [7:0] k7ddrphy_dfi_p1_wrdata_mask;
wire          k7ddrphy_dfi_p1_rddata_en;
reg    [63:0] k7ddrphy_dfi_p1_rddata = 64'd0;
wire          k7ddrphy_dfi_p1_rddata_valid;
wire   [14:0] k7ddrphy_dfi_p2_address;
wire    [2:0] k7ddrphy_dfi_p2_bank;
wire          k7ddrphy_dfi_p2_cas_n;
wire          k7ddrphy_dfi_p2_cs_n;
wire          k7ddrphy_dfi_p2_ras_n;
wire          k7ddrphy_dfi_p2_we_n;
wire          k7ddrphy_dfi_p2_cke;
wire          k7ddrphy_dfi_p2_odt;
wire          k7ddrphy_dfi_p2_reset_n;
wire          k7ddrphy_dfi_p2_act_n;
wire   [63:0] k7ddrphy_dfi_p2_wrdata;
wire          k7ddrphy_dfi_p2_wrdata_en;
wire    [7:0] k7ddrphy_dfi_p2_wrdata_mask;
wire          k7ddrphy_dfi_p2_rddata_en;
reg    [63:0] k7ddrphy_dfi_p2_rddata = 64'd0;
wire          k7ddrphy_dfi_p2_rddata_valid;
wire   [14:0] k7ddrphy_dfi_p3_address;
wire    [2:0] k7ddrphy_dfi_p3_bank;
wire          k7ddrphy_dfi_p3_cas_n;
wire          k7ddrphy_dfi_p3_cs_n;
wire          k7ddrphy_dfi_p3_ras_n;
wire          k7ddrphy_dfi_p3_we_n;
wire          k7ddrphy_dfi_p3_cke;
wire          k7ddrphy_dfi_p3_odt;
wire          k7ddrphy_dfi_p3_reset_n;
wire          k7ddrphy_dfi_p3_act_n;
wire   [63:0] k7ddrphy_dfi_p3_wrdata;
wire          k7ddrphy_dfi_p3_wrdata_en;
wire    [7:0] k7ddrphy_dfi_p3_wrdata_mask;
wire          k7ddrphy_dfi_p3_rddata_en;
reg    [63:0] k7ddrphy_dfi_p3_rddata = 64'd0;
wire          k7ddrphy_dfi_p3_rddata_valid;
wire          k7ddrphy_sd_clk_se_nodelay;
wire          k7ddrphy_sd_clk_se_delayed;
wire    [2:0] k7ddrphy_pads_ba;
wire          k7ddrphy_oq0;
wire          k7ddrphy_oq1;
wire          k7ddrphy_oq2;
wire          k7ddrphy_oq3;
wire          k7ddrphy_oq4;
wire          k7ddrphy_oq5;
wire          k7ddrphy_oq6;
wire          k7ddrphy_oq7;
wire          k7ddrphy_oq8;
wire          k7ddrphy_oq9;
wire          k7ddrphy_oq10;
wire          k7ddrphy_oq11;
wire          k7ddrphy_oq12;
wire          k7ddrphy_oq13;
wire          k7ddrphy_oq14;
wire          k7ddrphy_oq15;
wire          k7ddrphy_oq16;
wire          k7ddrphy_oq17;
wire          k7ddrphy_oq18;
wire          k7ddrphy_oq19;
wire          k7ddrphy_oq20;
wire          k7ddrphy_oq21;
wire          k7ddrphy_oq22;
wire          k7ddrphy_oq23;
wire          k7ddrphy_oq24;
reg           k7ddrphy_dqs_oe = 1'd0;
wire          k7ddrphy_dqs_preamble;
wire          k7ddrphy_dqs_postamble;
wire          k7ddrphy_dqs_oe_delay_tappeddelayline;
reg           k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline0 = 1'd0;
reg           k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1 = 1'd0;
reg           k7ddrphy_dqspattern0 = 1'd0;
reg           k7ddrphy_dqspattern1 = 1'd0;
reg     [7:0] k7ddrphy_dqspattern_o = 8'd0;
wire          k7ddrphy_dqs_o_no_delay0;
wire          k7ddrphy_dqs_o_delayed0;
wire          k7ddrphy_dqs_t0;
reg     [7:0] k7ddrphy_bitslip00 = 8'd0;
reg     [2:0] k7ddrphy_bitslip0_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip0_r0 = 16'd0;
wire          k7ddrphy0;
wire          k7ddrphy_dqs_o_no_delay1;
wire          k7ddrphy_dqs_o_delayed1;
wire          k7ddrphy_dqs_t1;
reg     [7:0] k7ddrphy_bitslip10 = 8'd0;
reg     [2:0] k7ddrphy_bitslip1_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip1_r0 = 16'd0;
wire          k7ddrphy1;
wire          k7ddrphy_dqs_o_no_delay2;
wire          k7ddrphy_dqs_o_delayed2;
wire          k7ddrphy_dqs_t2;
reg     [7:0] k7ddrphy_bitslip20 = 8'd0;
reg     [2:0] k7ddrphy_bitslip2_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip2_r0 = 16'd0;
wire          k7ddrphy2;
wire          k7ddrphy_dqs_o_no_delay3;
wire          k7ddrphy_dqs_o_delayed3;
wire          k7ddrphy_dqs_t3;
reg     [7:0] k7ddrphy_bitslip30 = 8'd0;
reg     [2:0] k7ddrphy_bitslip3_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip3_r0 = 16'd0;
wire          k7ddrphy3;
wire          k7ddrphy_dm_o_nodelay0;
reg     [7:0] k7ddrphy_bitslip01 = 8'd0;
reg     [2:0] k7ddrphy_bitslip0_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip0_r1 = 16'd0;
wire          k7ddrphy_dm_o_nodelay1;
reg     [7:0] k7ddrphy_bitslip11 = 8'd0;
reg     [2:0] k7ddrphy_bitslip1_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip1_r1 = 16'd0;
wire          k7ddrphy_dm_o_nodelay2;
reg     [7:0] k7ddrphy_bitslip21 = 8'd0;
reg     [2:0] k7ddrphy_bitslip2_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip2_r1 = 16'd0;
wire          k7ddrphy_dm_o_nodelay3;
reg     [7:0] k7ddrphy_bitslip31 = 8'd0;
reg     [2:0] k7ddrphy_bitslip3_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip3_r1 = 16'd0;
wire          k7ddrphy_dq_oe;
wire          k7ddrphy_dq_oe_delay_tappeddelayline;
reg           k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline0 = 1'd0;
reg           k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1 = 1'd0;
wire          k7ddrphy_dq_o_nodelay0;
wire          k7ddrphy_dq_o_delayed0;
wire          k7ddrphy_dq_i_nodelay0;
wire          k7ddrphy_dq_i_delayed0;
wire          k7ddrphy_dq_t0;
reg     [7:0] k7ddrphy_bitslip02 = 8'd0;
reg     [2:0] k7ddrphy_bitslip0_value2 = 3'd7;
reg    [15:0] k7ddrphy_bitslip0_r2 = 16'd0;
wire    [7:0] k7ddrphy_bitslip03;
reg     [7:0] k7ddrphy_bitslip04 = 8'd0;
reg     [2:0] k7ddrphy_bitslip0_value3 = 3'd7;
reg    [15:0] k7ddrphy_bitslip0_r3 = 16'd0;
wire          k7ddrphy_dq_o_nodelay1;
wire          k7ddrphy_dq_o_delayed1;
wire          k7ddrphy_dq_i_nodelay1;
wire          k7ddrphy_dq_i_delayed1;
wire          k7ddrphy_dq_t1;
reg     [7:0] k7ddrphy_bitslip12 = 8'd0;
reg     [2:0] k7ddrphy_bitslip1_value2 = 3'd7;
reg    [15:0] k7ddrphy_bitslip1_r2 = 16'd0;
wire    [7:0] k7ddrphy_bitslip13;
reg     [7:0] k7ddrphy_bitslip14 = 8'd0;
reg     [2:0] k7ddrphy_bitslip1_value3 = 3'd7;
reg    [15:0] k7ddrphy_bitslip1_r3 = 16'd0;
wire          k7ddrphy_dq_o_nodelay2;
wire          k7ddrphy_dq_o_delayed2;
wire          k7ddrphy_dq_i_nodelay2;
wire          k7ddrphy_dq_i_delayed2;
wire          k7ddrphy_dq_t2;
reg     [7:0] k7ddrphy_bitslip22 = 8'd0;
reg     [2:0] k7ddrphy_bitslip2_value2 = 3'd7;
reg    [15:0] k7ddrphy_bitslip2_r2 = 16'd0;
wire    [7:0] k7ddrphy_bitslip23;
reg     [7:0] k7ddrphy_bitslip24 = 8'd0;
reg     [2:0] k7ddrphy_bitslip2_value3 = 3'd7;
reg    [15:0] k7ddrphy_bitslip2_r3 = 16'd0;
wire          k7ddrphy_dq_o_nodelay3;
wire          k7ddrphy_dq_o_delayed3;
wire          k7ddrphy_dq_i_nodelay3;
wire          k7ddrphy_dq_i_delayed3;
wire          k7ddrphy_dq_t3;
reg     [7:0] k7ddrphy_bitslip32 = 8'd0;
reg     [2:0] k7ddrphy_bitslip3_value2 = 3'd7;
reg    [15:0] k7ddrphy_bitslip3_r2 = 16'd0;
wire    [7:0] k7ddrphy_bitslip33;
reg     [7:0] k7ddrphy_bitslip34 = 8'd0;
reg     [2:0] k7ddrphy_bitslip3_value3 = 3'd7;
reg    [15:0] k7ddrphy_bitslip3_r3 = 16'd0;
wire          k7ddrphy_dq_o_nodelay4;
wire          k7ddrphy_dq_o_delayed4;
wire          k7ddrphy_dq_i_nodelay4;
wire          k7ddrphy_dq_i_delayed4;
wire          k7ddrphy_dq_t4;
reg     [7:0] k7ddrphy_bitslip40 = 8'd0;
reg     [2:0] k7ddrphy_bitslip4_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip4_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip41;
reg     [7:0] k7ddrphy_bitslip42 = 8'd0;
reg     [2:0] k7ddrphy_bitslip4_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip4_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay5;
wire          k7ddrphy_dq_o_delayed5;
wire          k7ddrphy_dq_i_nodelay5;
wire          k7ddrphy_dq_i_delayed5;
wire          k7ddrphy_dq_t5;
reg     [7:0] k7ddrphy_bitslip50 = 8'd0;
reg     [2:0] k7ddrphy_bitslip5_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip5_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip51;
reg     [7:0] k7ddrphy_bitslip52 = 8'd0;
reg     [2:0] k7ddrphy_bitslip5_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip5_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay6;
wire          k7ddrphy_dq_o_delayed6;
wire          k7ddrphy_dq_i_nodelay6;
wire          k7ddrphy_dq_i_delayed6;
wire          k7ddrphy_dq_t6;
reg     [7:0] k7ddrphy_bitslip60 = 8'd0;
reg     [2:0] k7ddrphy_bitslip6_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip6_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip61;
reg     [7:0] k7ddrphy_bitslip62 = 8'd0;
reg     [2:0] k7ddrphy_bitslip6_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip6_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay7;
wire          k7ddrphy_dq_o_delayed7;
wire          k7ddrphy_dq_i_nodelay7;
wire          k7ddrphy_dq_i_delayed7;
wire          k7ddrphy_dq_t7;
reg     [7:0] k7ddrphy_bitslip70 = 8'd0;
reg     [2:0] k7ddrphy_bitslip7_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip7_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip71;
reg     [7:0] k7ddrphy_bitslip72 = 8'd0;
reg     [2:0] k7ddrphy_bitslip7_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip7_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay8;
wire          k7ddrphy_dq_o_delayed8;
wire          k7ddrphy_dq_i_nodelay8;
wire          k7ddrphy_dq_i_delayed8;
wire          k7ddrphy_dq_t8;
reg     [7:0] k7ddrphy_bitslip80 = 8'd0;
reg     [2:0] k7ddrphy_bitslip8_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip8_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip81;
reg     [7:0] k7ddrphy_bitslip82 = 8'd0;
reg     [2:0] k7ddrphy_bitslip8_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip8_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay9;
wire          k7ddrphy_dq_o_delayed9;
wire          k7ddrphy_dq_i_nodelay9;
wire          k7ddrphy_dq_i_delayed9;
wire          k7ddrphy_dq_t9;
reg     [7:0] k7ddrphy_bitslip90 = 8'd0;
reg     [2:0] k7ddrphy_bitslip9_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip9_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip91;
reg     [7:0] k7ddrphy_bitslip92 = 8'd0;
reg     [2:0] k7ddrphy_bitslip9_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip9_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay10;
wire          k7ddrphy_dq_o_delayed10;
wire          k7ddrphy_dq_i_nodelay10;
wire          k7ddrphy_dq_i_delayed10;
wire          k7ddrphy_dq_t10;
reg     [7:0] k7ddrphy_bitslip100 = 8'd0;
reg     [2:0] k7ddrphy_bitslip10_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip10_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip101;
reg     [7:0] k7ddrphy_bitslip102 = 8'd0;
reg     [2:0] k7ddrphy_bitslip10_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip10_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay11;
wire          k7ddrphy_dq_o_delayed11;
wire          k7ddrphy_dq_i_nodelay11;
wire          k7ddrphy_dq_i_delayed11;
wire          k7ddrphy_dq_t11;
reg     [7:0] k7ddrphy_bitslip110 = 8'd0;
reg     [2:0] k7ddrphy_bitslip11_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip11_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip111;
reg     [7:0] k7ddrphy_bitslip112 = 8'd0;
reg     [2:0] k7ddrphy_bitslip11_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip11_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay12;
wire          k7ddrphy_dq_o_delayed12;
wire          k7ddrphy_dq_i_nodelay12;
wire          k7ddrphy_dq_i_delayed12;
wire          k7ddrphy_dq_t12;
reg     [7:0] k7ddrphy_bitslip120 = 8'd0;
reg     [2:0] k7ddrphy_bitslip12_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip12_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip121;
reg     [7:0] k7ddrphy_bitslip122 = 8'd0;
reg     [2:0] k7ddrphy_bitslip12_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip12_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay13;
wire          k7ddrphy_dq_o_delayed13;
wire          k7ddrphy_dq_i_nodelay13;
wire          k7ddrphy_dq_i_delayed13;
wire          k7ddrphy_dq_t13;
reg     [7:0] k7ddrphy_bitslip130 = 8'd0;
reg     [2:0] k7ddrphy_bitslip13_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip13_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip131;
reg     [7:0] k7ddrphy_bitslip132 = 8'd0;
reg     [2:0] k7ddrphy_bitslip13_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip13_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay14;
wire          k7ddrphy_dq_o_delayed14;
wire          k7ddrphy_dq_i_nodelay14;
wire          k7ddrphy_dq_i_delayed14;
wire          k7ddrphy_dq_t14;
reg     [7:0] k7ddrphy_bitslip140 = 8'd0;
reg     [2:0] k7ddrphy_bitslip14_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip14_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip141;
reg     [7:0] k7ddrphy_bitslip142 = 8'd0;
reg     [2:0] k7ddrphy_bitslip14_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip14_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay15;
wire          k7ddrphy_dq_o_delayed15;
wire          k7ddrphy_dq_i_nodelay15;
wire          k7ddrphy_dq_i_delayed15;
wire          k7ddrphy_dq_t15;
reg     [7:0] k7ddrphy_bitslip150 = 8'd0;
reg     [2:0] k7ddrphy_bitslip15_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip15_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip151;
reg     [7:0] k7ddrphy_bitslip152 = 8'd0;
reg     [2:0] k7ddrphy_bitslip15_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip15_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay16;
wire          k7ddrphy_dq_o_delayed16;
wire          k7ddrphy_dq_i_nodelay16;
wire          k7ddrphy_dq_i_delayed16;
wire          k7ddrphy_dq_t16;
reg     [7:0] k7ddrphy_bitslip160 = 8'd0;
reg     [2:0] k7ddrphy_bitslip16_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip16_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip161;
reg     [7:0] k7ddrphy_bitslip162 = 8'd0;
reg     [2:0] k7ddrphy_bitslip16_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip16_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay17;
wire          k7ddrphy_dq_o_delayed17;
wire          k7ddrphy_dq_i_nodelay17;
wire          k7ddrphy_dq_i_delayed17;
wire          k7ddrphy_dq_t17;
reg     [7:0] k7ddrphy_bitslip170 = 8'd0;
reg     [2:0] k7ddrphy_bitslip17_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip17_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip171;
reg     [7:0] k7ddrphy_bitslip172 = 8'd0;
reg     [2:0] k7ddrphy_bitslip17_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip17_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay18;
wire          k7ddrphy_dq_o_delayed18;
wire          k7ddrphy_dq_i_nodelay18;
wire          k7ddrphy_dq_i_delayed18;
wire          k7ddrphy_dq_t18;
reg     [7:0] k7ddrphy_bitslip180 = 8'd0;
reg     [2:0] k7ddrphy_bitslip18_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip18_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip181;
reg     [7:0] k7ddrphy_bitslip182 = 8'd0;
reg     [2:0] k7ddrphy_bitslip18_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip18_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay19;
wire          k7ddrphy_dq_o_delayed19;
wire          k7ddrphy_dq_i_nodelay19;
wire          k7ddrphy_dq_i_delayed19;
wire          k7ddrphy_dq_t19;
reg     [7:0] k7ddrphy_bitslip190 = 8'd0;
reg     [2:0] k7ddrphy_bitslip19_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip19_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip191;
reg     [7:0] k7ddrphy_bitslip192 = 8'd0;
reg     [2:0] k7ddrphy_bitslip19_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip19_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay20;
wire          k7ddrphy_dq_o_delayed20;
wire          k7ddrphy_dq_i_nodelay20;
wire          k7ddrphy_dq_i_delayed20;
wire          k7ddrphy_dq_t20;
reg     [7:0] k7ddrphy_bitslip200 = 8'd0;
reg     [2:0] k7ddrphy_bitslip20_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip20_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip201;
reg     [7:0] k7ddrphy_bitslip202 = 8'd0;
reg     [2:0] k7ddrphy_bitslip20_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip20_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay21;
wire          k7ddrphy_dq_o_delayed21;
wire          k7ddrphy_dq_i_nodelay21;
wire          k7ddrphy_dq_i_delayed21;
wire          k7ddrphy_dq_t21;
reg     [7:0] k7ddrphy_bitslip210 = 8'd0;
reg     [2:0] k7ddrphy_bitslip21_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip21_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip211;
reg     [7:0] k7ddrphy_bitslip212 = 8'd0;
reg     [2:0] k7ddrphy_bitslip21_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip21_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay22;
wire          k7ddrphy_dq_o_delayed22;
wire          k7ddrphy_dq_i_nodelay22;
wire          k7ddrphy_dq_i_delayed22;
wire          k7ddrphy_dq_t22;
reg     [7:0] k7ddrphy_bitslip220 = 8'd0;
reg     [2:0] k7ddrphy_bitslip22_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip22_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip221;
reg     [7:0] k7ddrphy_bitslip222 = 8'd0;
reg     [2:0] k7ddrphy_bitslip22_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip22_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay23;
wire          k7ddrphy_dq_o_delayed23;
wire          k7ddrphy_dq_i_nodelay23;
wire          k7ddrphy_dq_i_delayed23;
wire          k7ddrphy_dq_t23;
reg     [7:0] k7ddrphy_bitslip230 = 8'd0;
reg     [2:0] k7ddrphy_bitslip23_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip23_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip231;
reg     [7:0] k7ddrphy_bitslip232 = 8'd0;
reg     [2:0] k7ddrphy_bitslip23_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip23_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay24;
wire          k7ddrphy_dq_o_delayed24;
wire          k7ddrphy_dq_i_nodelay24;
wire          k7ddrphy_dq_i_delayed24;
wire          k7ddrphy_dq_t24;
reg     [7:0] k7ddrphy_bitslip240 = 8'd0;
reg     [2:0] k7ddrphy_bitslip24_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip24_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip241;
reg     [7:0] k7ddrphy_bitslip242 = 8'd0;
reg     [2:0] k7ddrphy_bitslip24_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip24_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay25;
wire          k7ddrphy_dq_o_delayed25;
wire          k7ddrphy_dq_i_nodelay25;
wire          k7ddrphy_dq_i_delayed25;
wire          k7ddrphy_dq_t25;
reg     [7:0] k7ddrphy_bitslip250 = 8'd0;
reg     [2:0] k7ddrphy_bitslip25_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip25_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip251;
reg     [7:0] k7ddrphy_bitslip252 = 8'd0;
reg     [2:0] k7ddrphy_bitslip25_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip25_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay26;
wire          k7ddrphy_dq_o_delayed26;
wire          k7ddrphy_dq_i_nodelay26;
wire          k7ddrphy_dq_i_delayed26;
wire          k7ddrphy_dq_t26;
reg     [7:0] k7ddrphy_bitslip260 = 8'd0;
reg     [2:0] k7ddrphy_bitslip26_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip26_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip261;
reg     [7:0] k7ddrphy_bitslip262 = 8'd0;
reg     [2:0] k7ddrphy_bitslip26_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip26_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay27;
wire          k7ddrphy_dq_o_delayed27;
wire          k7ddrphy_dq_i_nodelay27;
wire          k7ddrphy_dq_i_delayed27;
wire          k7ddrphy_dq_t27;
reg     [7:0] k7ddrphy_bitslip270 = 8'd0;
reg     [2:0] k7ddrphy_bitslip27_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip27_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip271;
reg     [7:0] k7ddrphy_bitslip272 = 8'd0;
reg     [2:0] k7ddrphy_bitslip27_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip27_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay28;
wire          k7ddrphy_dq_o_delayed28;
wire          k7ddrphy_dq_i_nodelay28;
wire          k7ddrphy_dq_i_delayed28;
wire          k7ddrphy_dq_t28;
reg     [7:0] k7ddrphy_bitslip280 = 8'd0;
reg     [2:0] k7ddrphy_bitslip28_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip28_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip281;
reg     [7:0] k7ddrphy_bitslip282 = 8'd0;
reg     [2:0] k7ddrphy_bitslip28_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip28_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay29;
wire          k7ddrphy_dq_o_delayed29;
wire          k7ddrphy_dq_i_nodelay29;
wire          k7ddrphy_dq_i_delayed29;
wire          k7ddrphy_dq_t29;
reg     [7:0] k7ddrphy_bitslip290 = 8'd0;
reg     [2:0] k7ddrphy_bitslip29_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip29_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip291;
reg     [7:0] k7ddrphy_bitslip292 = 8'd0;
reg     [2:0] k7ddrphy_bitslip29_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip29_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay30;
wire          k7ddrphy_dq_o_delayed30;
wire          k7ddrphy_dq_i_nodelay30;
wire          k7ddrphy_dq_i_delayed30;
wire          k7ddrphy_dq_t30;
reg     [7:0] k7ddrphy_bitslip300 = 8'd0;
reg     [2:0] k7ddrphy_bitslip30_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip30_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip301;
reg     [7:0] k7ddrphy_bitslip302 = 8'd0;
reg     [2:0] k7ddrphy_bitslip30_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip30_r1 = 16'd0;
wire          k7ddrphy_dq_o_nodelay31;
wire          k7ddrphy_dq_o_delayed31;
wire          k7ddrphy_dq_i_nodelay31;
wire          k7ddrphy_dq_i_delayed31;
wire          k7ddrphy_dq_t31;
reg     [7:0] k7ddrphy_bitslip310 = 8'd0;
reg     [2:0] k7ddrphy_bitslip31_value0 = 3'd7;
reg    [15:0] k7ddrphy_bitslip31_r0 = 16'd0;
wire    [7:0] k7ddrphy_bitslip311;
reg     [7:0] k7ddrphy_bitslip312 = 8'd0;
reg     [2:0] k7ddrphy_bitslip31_value1 = 3'd7;
reg    [15:0] k7ddrphy_bitslip31_r1 = 16'd0;
reg           k7ddrphy_rddata_en_tappeddelayline0 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline1 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline2 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline3 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline4 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline5 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline6 = 1'd0;
reg           k7ddrphy_rddata_en_tappeddelayline7 = 1'd0;
reg           k7ddrphy_wrdata_en_tappeddelayline0 = 1'd0;
reg           k7ddrphy_wrdata_en_tappeddelayline1 = 1'd0;
reg           k7ddrphy_wrdata_en_tappeddelayline2 = 1'd0;
wire   [14:0] litedramcore_slave_p0_address;
wire    [2:0] litedramcore_slave_p0_bank;
wire          litedramcore_slave_p0_cas_n;
wire          litedramcore_slave_p0_cs_n;
wire          litedramcore_slave_p0_ras_n;
wire          litedramcore_slave_p0_we_n;
wire          litedramcore_slave_p0_cke;
wire          litedramcore_slave_p0_odt;
wire          litedramcore_slave_p0_reset_n;
wire          litedramcore_slave_p0_act_n;
wire   [63:0] litedramcore_slave_p0_wrdata;
wire          litedramcore_slave_p0_wrdata_en;
wire    [7:0] litedramcore_slave_p0_wrdata_mask;
wire          litedramcore_slave_p0_rddata_en;
reg    [63:0] litedramcore_slave_p0_rddata = 64'd0;
reg           litedramcore_slave_p0_rddata_valid = 1'd0;
wire   [14:0] litedramcore_slave_p1_address;
wire    [2:0] litedramcore_slave_p1_bank;
wire          litedramcore_slave_p1_cas_n;
wire          litedramcore_slave_p1_cs_n;
wire          litedramcore_slave_p1_ras_n;
wire          litedramcore_slave_p1_we_n;
wire          litedramcore_slave_p1_cke;
wire          litedramcore_slave_p1_odt;
wire          litedramcore_slave_p1_reset_n;
wire          litedramcore_slave_p1_act_n;
wire   [63:0] litedramcore_slave_p1_wrdata;
wire          litedramcore_slave_p1_wrdata_en;
wire    [7:0] litedramcore_slave_p1_wrdata_mask;
wire          litedramcore_slave_p1_rddata_en;
reg    [63:0] litedramcore_slave_p1_rddata = 64'd0;
reg           litedramcore_slave_p1_rddata_valid = 1'd0;
wire   [14:0] litedramcore_slave_p2_address;
wire    [2:0] litedramcore_slave_p2_bank;
wire          litedramcore_slave_p2_cas_n;
wire          litedramcore_slave_p2_cs_n;
wire          litedramcore_slave_p2_ras_n;
wire          litedramcore_slave_p2_we_n;
wire          litedramcore_slave_p2_cke;
wire          litedramcore_slave_p2_odt;
wire          litedramcore_slave_p2_reset_n;
wire          litedramcore_slave_p2_act_n;
wire   [63:0] litedramcore_slave_p2_wrdata;
wire          litedramcore_slave_p2_wrdata_en;
wire    [7:0] litedramcore_slave_p2_wrdata_mask;
wire          litedramcore_slave_p2_rddata_en;
reg    [63:0] litedramcore_slave_p2_rddata = 64'd0;
reg           litedramcore_slave_p2_rddata_valid = 1'd0;
wire   [14:0] litedramcore_slave_p3_address;
wire    [2:0] litedramcore_slave_p3_bank;
wire          litedramcore_slave_p3_cas_n;
wire          litedramcore_slave_p3_cs_n;
wire          litedramcore_slave_p3_ras_n;
wire          litedramcore_slave_p3_we_n;
wire          litedramcore_slave_p3_cke;
wire          litedramcore_slave_p3_odt;
wire          litedramcore_slave_p3_reset_n;
wire          litedramcore_slave_p3_act_n;
wire   [63:0] litedramcore_slave_p3_wrdata;
wire          litedramcore_slave_p3_wrdata_en;
wire    [7:0] litedramcore_slave_p3_wrdata_mask;
wire          litedramcore_slave_p3_rddata_en;
reg    [63:0] litedramcore_slave_p3_rddata = 64'd0;
reg           litedramcore_slave_p3_rddata_valid = 1'd0;
reg    [14:0] litedramcore_master_p0_address = 15'd0;
reg     [2:0] litedramcore_master_p0_bank = 3'd0;
reg           litedramcore_master_p0_cas_n = 1'd1;
reg           litedramcore_master_p0_cs_n = 1'd1;
reg           litedramcore_master_p0_ras_n = 1'd1;
reg           litedramcore_master_p0_we_n = 1'd1;
reg           litedramcore_master_p0_cke = 1'd0;
reg           litedramcore_master_p0_odt = 1'd0;
reg           litedramcore_master_p0_reset_n = 1'd0;
reg           litedramcore_master_p0_act_n = 1'd1;
reg    [63:0] litedramcore_master_p0_wrdata = 64'd0;
reg           litedramcore_master_p0_wrdata_en = 1'd0;
reg     [7:0] litedramcore_master_p0_wrdata_mask = 8'd0;
reg           litedramcore_master_p0_rddata_en = 1'd0;
wire   [63:0] litedramcore_master_p0_rddata;
wire          litedramcore_master_p0_rddata_valid;
reg    [14:0] litedramcore_master_p1_address = 15'd0;
reg     [2:0] litedramcore_master_p1_bank = 3'd0;
reg           litedramcore_master_p1_cas_n = 1'd1;
reg           litedramcore_master_p1_cs_n = 1'd1;
reg           litedramcore_master_p1_ras_n = 1'd1;
reg           litedramcore_master_p1_we_n = 1'd1;
reg           litedramcore_master_p1_cke = 1'd0;
reg           litedramcore_master_p1_odt = 1'd0;
reg           litedramcore_master_p1_reset_n = 1'd0;
reg           litedramcore_master_p1_act_n = 1'd1;
reg    [63:0] litedramcore_master_p1_wrdata = 64'd0;
reg           litedramcore_master_p1_wrdata_en = 1'd0;
reg     [7:0] litedramcore_master_p1_wrdata_mask = 8'd0;
reg           litedramcore_master_p1_rddata_en = 1'd0;
wire   [63:0] litedramcore_master_p1_rddata;
wire          litedramcore_master_p1_rddata_valid;
reg    [14:0] litedramcore_master_p2_address = 15'd0;
reg     [2:0] litedramcore_master_p2_bank = 3'd0;
reg           litedramcore_master_p2_cas_n = 1'd1;
reg           litedramcore_master_p2_cs_n = 1'd1;
reg           litedramcore_master_p2_ras_n = 1'd1;
reg           litedramcore_master_p2_we_n = 1'd1;
reg           litedramcore_master_p2_cke = 1'd0;
reg           litedramcore_master_p2_odt = 1'd0;
reg           litedramcore_master_p2_reset_n = 1'd0;
reg           litedramcore_master_p2_act_n = 1'd1;
reg    [63:0] litedramcore_master_p2_wrdata = 64'd0;
reg           litedramcore_master_p2_wrdata_en = 1'd0;
reg     [7:0] litedramcore_master_p2_wrdata_mask = 8'd0;
reg           litedramcore_master_p2_rddata_en = 1'd0;
wire   [63:0] litedramcore_master_p2_rddata;
wire          litedramcore_master_p2_rddata_valid;
reg    [14:0] litedramcore_master_p3_address = 15'd0;
reg     [2:0] litedramcore_master_p3_bank = 3'd0;
reg           litedramcore_master_p3_cas_n = 1'd1;
reg           litedramcore_master_p3_cs_n = 1'd1;
reg           litedramcore_master_p3_ras_n = 1'd1;
reg           litedramcore_master_p3_we_n = 1'd1;
reg           litedramcore_master_p3_cke = 1'd0;
reg           litedramcore_master_p3_odt = 1'd0;
reg           litedramcore_master_p3_reset_n = 1'd0;
reg           litedramcore_master_p3_act_n = 1'd1;
reg    [63:0] litedramcore_master_p3_wrdata = 64'd0;
reg           litedramcore_master_p3_wrdata_en = 1'd0;
reg     [7:0] litedramcore_master_p3_wrdata_mask = 8'd0;
reg           litedramcore_master_p3_rddata_en = 1'd0;
wire   [63:0] litedramcore_master_p3_rddata;
wire          litedramcore_master_p3_rddata_valid;
wire   [14:0] litedramcore_csr_dfi_p0_address;
wire    [2:0] litedramcore_csr_dfi_p0_bank;
reg           litedramcore_csr_dfi_p0_cas_n = 1'd1;
reg           litedramcore_csr_dfi_p0_cs_n = 1'd1;
reg           litedramcore_csr_dfi_p0_ras_n = 1'd1;
reg           litedramcore_csr_dfi_p0_we_n = 1'd1;
wire          litedramcore_csr_dfi_p0_cke;
wire          litedramcore_csr_dfi_p0_odt;
wire          litedramcore_csr_dfi_p0_reset_n;
reg           litedramcore_csr_dfi_p0_act_n = 1'd1;
wire   [63:0] litedramcore_csr_dfi_p0_wrdata;
wire          litedramcore_csr_dfi_p0_wrdata_en;
wire    [7:0] litedramcore_csr_dfi_p0_wrdata_mask;
wire          litedramcore_csr_dfi_p0_rddata_en;
reg    [63:0] litedramcore_csr_dfi_p0_rddata = 64'd0;
reg           litedramcore_csr_dfi_p0_rddata_valid = 1'd0;
wire   [14:0] litedramcore_csr_dfi_p1_address;
wire    [2:0] litedramcore_csr_dfi_p1_bank;
reg           litedramcore_csr_dfi_p1_cas_n = 1'd1;
reg           litedramcore_csr_dfi_p1_cs_n = 1'd1;
reg           litedramcore_csr_dfi_p1_ras_n = 1'd1;
reg           litedramcore_csr_dfi_p1_we_n = 1'd1;
wire          litedramcore_csr_dfi_p1_cke;
wire          litedramcore_csr_dfi_p1_odt;
wire          litedramcore_csr_dfi_p1_reset_n;
reg           litedramcore_csr_dfi_p1_act_n = 1'd1;
wire   [63:0] litedramcore_csr_dfi_p1_wrdata;
wire          litedramcore_csr_dfi_p1_wrdata_en;
wire    [7:0] litedramcore_csr_dfi_p1_wrdata_mask;
wire          litedramcore_csr_dfi_p1_rddata_en;
reg    [63:0] litedramcore_csr_dfi_p1_rddata = 64'd0;
reg           litedramcore_csr_dfi_p1_rddata_valid = 1'd0;
wire   [14:0] litedramcore_csr_dfi_p2_address;
wire    [2:0] litedramcore_csr_dfi_p2_bank;
reg           litedramcore_csr_dfi_p2_cas_n = 1'd1;
reg           litedramcore_csr_dfi_p2_cs_n = 1'd1;
reg           litedramcore_csr_dfi_p2_ras_n = 1'd1;
reg           litedramcore_csr_dfi_p2_we_n = 1'd1;
wire          litedramcore_csr_dfi_p2_cke;
wire          litedramcore_csr_dfi_p2_odt;
wire          litedramcore_csr_dfi_p2_reset_n;
reg           litedramcore_csr_dfi_p2_act_n = 1'd1;
wire   [63:0] litedramcore_csr_dfi_p2_wrdata;
wire          litedramcore_csr_dfi_p2_wrdata_en;
wire    [7:0] litedramcore_csr_dfi_p2_wrdata_mask;
wire          litedramcore_csr_dfi_p2_rddata_en;
reg    [63:0] litedramcore_csr_dfi_p2_rddata = 64'd0;
reg           litedramcore_csr_dfi_p2_rddata_valid = 1'd0;
wire   [14:0] litedramcore_csr_dfi_p3_address;
wire    [2:0] litedramcore_csr_dfi_p3_bank;
reg           litedramcore_csr_dfi_p3_cas_n = 1'd1;
reg           litedramcore_csr_dfi_p3_cs_n = 1'd1;
reg           litedramcore_csr_dfi_p3_ras_n = 1'd1;
reg           litedramcore_csr_dfi_p3_we_n = 1'd1;
wire          litedramcore_csr_dfi_p3_cke;
wire          litedramcore_csr_dfi_p3_odt;
wire          litedramcore_csr_dfi_p3_reset_n;
reg           litedramcore_csr_dfi_p3_act_n = 1'd1;
wire   [63:0] litedramcore_csr_dfi_p3_wrdata;
wire          litedramcore_csr_dfi_p3_wrdata_en;
wire    [7:0] litedramcore_csr_dfi_p3_wrdata_mask;
wire          litedramcore_csr_dfi_p3_rddata_en;
reg    [63:0] litedramcore_csr_dfi_p3_rddata = 64'd0;
reg           litedramcore_csr_dfi_p3_rddata_valid = 1'd0;
reg    [14:0] litedramcore_ext_dfi_p0_address = 15'd0;
reg     [2:0] litedramcore_ext_dfi_p0_bank = 3'd0;
reg           litedramcore_ext_dfi_p0_cas_n = 1'd1;
reg           litedramcore_ext_dfi_p0_cs_n = 1'd1;
reg           litedramcore_ext_dfi_p0_ras_n = 1'd1;
reg           litedramcore_ext_dfi_p0_we_n = 1'd1;
reg           litedramcore_ext_dfi_p0_cke = 1'd0;
reg           litedramcore_ext_dfi_p0_odt = 1'd0;
reg           litedramcore_ext_dfi_p0_reset_n = 1'd0;
reg           litedramcore_ext_dfi_p0_act_n = 1'd1;
reg    [63:0] litedramcore_ext_dfi_p0_wrdata = 64'd0;
reg           litedramcore_ext_dfi_p0_wrdata_en = 1'd0;
reg     [7:0] litedramcore_ext_dfi_p0_wrdata_mask = 8'd0;
reg           litedramcore_ext_dfi_p0_rddata_en = 1'd0;
reg    [63:0] litedramcore_ext_dfi_p0_rddata = 64'd0;
reg           litedramcore_ext_dfi_p0_rddata_valid = 1'd0;
reg    [14:0] litedramcore_ext_dfi_p1_address = 15'd0;
reg     [2:0] litedramcore_ext_dfi_p1_bank = 3'd0;
reg           litedramcore_ext_dfi_p1_cas_n = 1'd1;
reg           litedramcore_ext_dfi_p1_cs_n = 1'd1;
reg           litedramcore_ext_dfi_p1_ras_n = 1'd1;
reg           litedramcore_ext_dfi_p1_we_n = 1'd1;
reg           litedramcore_ext_dfi_p1_cke = 1'd0;
reg           litedramcore_ext_dfi_p1_odt = 1'd0;
reg           litedramcore_ext_dfi_p1_reset_n = 1'd0;
reg           litedramcore_ext_dfi_p1_act_n = 1'd1;
reg    [63:0] litedramcore_ext_dfi_p1_wrdata = 64'd0;
reg           litedramcore_ext_dfi_p1_wrdata_en = 1'd0;
reg     [7:0] litedramcore_ext_dfi_p1_wrdata_mask = 8'd0;
reg           litedramcore_ext_dfi_p1_rddata_en = 1'd0;
reg    [63:0] litedramcore_ext_dfi_p1_rddata = 64'd0;
reg           litedramcore_ext_dfi_p1_rddata_valid = 1'd0;
reg    [14:0] litedramcore_ext_dfi_p2_address = 15'd0;
reg     [2:0] litedramcore_ext_dfi_p2_bank = 3'd0;
reg           litedramcore_ext_dfi_p2_cas_n = 1'd1;
reg           litedramcore_ext_dfi_p2_cs_n = 1'd1;
reg           litedramcore_ext_dfi_p2_ras_n = 1'd1;
reg           litedramcore_ext_dfi_p2_we_n = 1'd1;
reg           litedramcore_ext_dfi_p2_cke = 1'd0;
reg           litedramcore_ext_dfi_p2_odt = 1'd0;
reg           litedramcore_ext_dfi_p2_reset_n = 1'd0;
reg           litedramcore_ext_dfi_p2_act_n = 1'd1;
reg    [63:0] litedramcore_ext_dfi_p2_wrdata = 64'd0;
reg           litedramcore_ext_dfi_p2_wrdata_en = 1'd0;
reg     [7:0] litedramcore_ext_dfi_p2_wrdata_mask = 8'd0;
reg           litedramcore_ext_dfi_p2_rddata_en = 1'd0;
reg    [63:0] litedramcore_ext_dfi_p2_rddata = 64'd0;
reg           litedramcore_ext_dfi_p2_rddata_valid = 1'd0;
reg    [14:0] litedramcore_ext_dfi_p3_address = 15'd0;
reg     [2:0] litedramcore_ext_dfi_p3_bank = 3'd0;
reg           litedramcore_ext_dfi_p3_cas_n = 1'd1;
reg           litedramcore_ext_dfi_p3_cs_n = 1'd1;
reg           litedramcore_ext_dfi_p3_ras_n = 1'd1;
reg           litedramcore_ext_dfi_p3_we_n = 1'd1;
reg           litedramcore_ext_dfi_p3_cke = 1'd0;
reg           litedramcore_ext_dfi_p3_odt = 1'd0;
reg           litedramcore_ext_dfi_p3_reset_n = 1'd0;
reg           litedramcore_ext_dfi_p3_act_n = 1'd1;
reg    [63:0] litedramcore_ext_dfi_p3_wrdata = 64'd0;
reg           litedramcore_ext_dfi_p3_wrdata_en = 1'd0;
reg     [7:0] litedramcore_ext_dfi_p3_wrdata_mask = 8'd0;
reg           litedramcore_ext_dfi_p3_rddata_en = 1'd0;
reg    [63:0] litedramcore_ext_dfi_p3_rddata = 64'd0;
reg           litedramcore_ext_dfi_p3_rddata_valid = 1'd0;
reg           litedramcore_ext_dfi_sel = 1'd0;
wire          litedramcore_sel;
wire          litedramcore_cke;
wire          litedramcore_odt;
wire          litedramcore_reset_n;
reg     [3:0] litedramcore_storage = 4'd1;
reg           litedramcore_re = 1'd0;
wire          litedramcore_phaseinjector0_csrfield_cs;
wire          litedramcore_phaseinjector0_csrfield_we;
wire          litedramcore_phaseinjector0_csrfield_cas;
wire          litedramcore_phaseinjector0_csrfield_ras;
wire          litedramcore_phaseinjector0_csrfield_wren;
wire          litedramcore_phaseinjector0_csrfield_rden;
reg     [5:0] litedramcore_phaseinjector0_command_storage = 6'd0;
reg           litedramcore_phaseinjector0_command_re = 1'd0;
reg           litedramcore_phaseinjector0_command_issue_re = 1'd0;
wire          litedramcore_phaseinjector0_command_issue_r;
reg           litedramcore_phaseinjector0_command_issue_we = 1'd0;
reg           litedramcore_phaseinjector0_command_issue_w = 1'd0;
reg    [14:0] litedramcore_phaseinjector0_address_storage = 15'd0;
reg           litedramcore_phaseinjector0_address_re = 1'd0;
reg     [2:0] litedramcore_phaseinjector0_baddress_storage = 3'd0;
reg           litedramcore_phaseinjector0_baddress_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector0_wrdata_storage = 64'd0;
reg           litedramcore_phaseinjector0_wrdata_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector0_rddata_status = 64'd0;
wire          litedramcore_phaseinjector0_rddata_we;
reg           litedramcore_phaseinjector0_rddata_re = 1'd0;
wire          litedramcore_phaseinjector1_csrfield_cs;
wire          litedramcore_phaseinjector1_csrfield_we;
wire          litedramcore_phaseinjector1_csrfield_cas;
wire          litedramcore_phaseinjector1_csrfield_ras;
wire          litedramcore_phaseinjector1_csrfield_wren;
wire          litedramcore_phaseinjector1_csrfield_rden;
reg     [5:0] litedramcore_phaseinjector1_command_storage = 6'd0;
reg           litedramcore_phaseinjector1_command_re = 1'd0;
reg           litedramcore_phaseinjector1_command_issue_re = 1'd0;
wire          litedramcore_phaseinjector1_command_issue_r;
reg           litedramcore_phaseinjector1_command_issue_we = 1'd0;
reg           litedramcore_phaseinjector1_command_issue_w = 1'd0;
reg    [14:0] litedramcore_phaseinjector1_address_storage = 15'd0;
reg           litedramcore_phaseinjector1_address_re = 1'd0;
reg     [2:0] litedramcore_phaseinjector1_baddress_storage = 3'd0;
reg           litedramcore_phaseinjector1_baddress_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector1_wrdata_storage = 64'd0;
reg           litedramcore_phaseinjector1_wrdata_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector1_rddata_status = 64'd0;
wire          litedramcore_phaseinjector1_rddata_we;
reg           litedramcore_phaseinjector1_rddata_re = 1'd0;
wire          litedramcore_phaseinjector2_csrfield_cs;
wire          litedramcore_phaseinjector2_csrfield_we;
wire          litedramcore_phaseinjector2_csrfield_cas;
wire          litedramcore_phaseinjector2_csrfield_ras;
wire          litedramcore_phaseinjector2_csrfield_wren;
wire          litedramcore_phaseinjector2_csrfield_rden;
reg     [5:0] litedramcore_phaseinjector2_command_storage = 6'd0;
reg           litedramcore_phaseinjector2_command_re = 1'd0;
reg           litedramcore_phaseinjector2_command_issue_re = 1'd0;
wire          litedramcore_phaseinjector2_command_issue_r;
reg           litedramcore_phaseinjector2_command_issue_we = 1'd0;
reg           litedramcore_phaseinjector2_command_issue_w = 1'd0;
reg    [14:0] litedramcore_phaseinjector2_address_storage = 15'd0;
reg           litedramcore_phaseinjector2_address_re = 1'd0;
reg     [2:0] litedramcore_phaseinjector2_baddress_storage = 3'd0;
reg           litedramcore_phaseinjector2_baddress_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector2_wrdata_storage = 64'd0;
reg           litedramcore_phaseinjector2_wrdata_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector2_rddata_status = 64'd0;
wire          litedramcore_phaseinjector2_rddata_we;
reg           litedramcore_phaseinjector2_rddata_re = 1'd0;
wire          litedramcore_phaseinjector3_csrfield_cs;
wire          litedramcore_phaseinjector3_csrfield_we;
wire          litedramcore_phaseinjector3_csrfield_cas;
wire          litedramcore_phaseinjector3_csrfield_ras;
wire          litedramcore_phaseinjector3_csrfield_wren;
wire          litedramcore_phaseinjector3_csrfield_rden;
reg     [5:0] litedramcore_phaseinjector3_command_storage = 6'd0;
reg           litedramcore_phaseinjector3_command_re = 1'd0;
reg           litedramcore_phaseinjector3_command_issue_re = 1'd0;
wire          litedramcore_phaseinjector3_command_issue_r;
reg           litedramcore_phaseinjector3_command_issue_we = 1'd0;
reg           litedramcore_phaseinjector3_command_issue_w = 1'd0;
reg    [14:0] litedramcore_phaseinjector3_address_storage = 15'd0;
reg           litedramcore_phaseinjector3_address_re = 1'd0;
reg     [2:0] litedramcore_phaseinjector3_baddress_storage = 3'd0;
reg           litedramcore_phaseinjector3_baddress_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector3_wrdata_storage = 64'd0;
reg           litedramcore_phaseinjector3_wrdata_re = 1'd0;
reg    [63:0] litedramcore_phaseinjector3_rddata_status = 64'd0;
wire          litedramcore_phaseinjector3_rddata_we;
reg           litedramcore_phaseinjector3_rddata_re = 1'd0;
wire          litedramcore_interface_bank0_valid;
wire          litedramcore_interface_bank0_ready;
wire          litedramcore_interface_bank0_we;
wire   [21:0] litedramcore_interface_bank0_addr;
wire          litedramcore_interface_bank0_lock;
wire          litedramcore_interface_bank0_wdata_ready;
wire          litedramcore_interface_bank0_rdata_valid;
wire          litedramcore_interface_bank1_valid;
wire          litedramcore_interface_bank1_ready;
wire          litedramcore_interface_bank1_we;
wire   [21:0] litedramcore_interface_bank1_addr;
wire          litedramcore_interface_bank1_lock;
wire          litedramcore_interface_bank1_wdata_ready;
wire          litedramcore_interface_bank1_rdata_valid;
wire          litedramcore_interface_bank2_valid;
wire          litedramcore_interface_bank2_ready;
wire          litedramcore_interface_bank2_we;
wire   [21:0] litedramcore_interface_bank2_addr;
wire          litedramcore_interface_bank2_lock;
wire          litedramcore_interface_bank2_wdata_ready;
wire          litedramcore_interface_bank2_rdata_valid;
wire          litedramcore_interface_bank3_valid;
wire          litedramcore_interface_bank3_ready;
wire          litedramcore_interface_bank3_we;
wire   [21:0] litedramcore_interface_bank3_addr;
wire          litedramcore_interface_bank3_lock;
wire          litedramcore_interface_bank3_wdata_ready;
wire          litedramcore_interface_bank3_rdata_valid;
wire          litedramcore_interface_bank4_valid;
wire          litedramcore_interface_bank4_ready;
wire          litedramcore_interface_bank4_we;
wire   [21:0] litedramcore_interface_bank4_addr;
wire          litedramcore_interface_bank4_lock;
wire          litedramcore_interface_bank4_wdata_ready;
wire          litedramcore_interface_bank4_rdata_valid;
wire          litedramcore_interface_bank5_valid;
wire          litedramcore_interface_bank5_ready;
wire          litedramcore_interface_bank5_we;
wire   [21:0] litedramcore_interface_bank5_addr;
wire          litedramcore_interface_bank5_lock;
wire          litedramcore_interface_bank5_wdata_ready;
wire          litedramcore_interface_bank5_rdata_valid;
wire          litedramcore_interface_bank6_valid;
wire          litedramcore_interface_bank6_ready;
wire          litedramcore_interface_bank6_we;
wire   [21:0] litedramcore_interface_bank6_addr;
wire          litedramcore_interface_bank6_lock;
wire          litedramcore_interface_bank6_wdata_ready;
wire          litedramcore_interface_bank6_rdata_valid;
wire          litedramcore_interface_bank7_valid;
wire          litedramcore_interface_bank7_ready;
wire          litedramcore_interface_bank7_we;
wire   [21:0] litedramcore_interface_bank7_addr;
wire          litedramcore_interface_bank7_lock;
wire          litedramcore_interface_bank7_wdata_ready;
wire          litedramcore_interface_bank7_rdata_valid;
reg   [255:0] litedramcore_interface_wdata = 256'd0;
reg    [31:0] litedramcore_interface_wdata_we = 32'd0;
wire  [255:0] litedramcore_interface_rdata;
reg    [14:0] litedramcore_dfi_p0_address = 15'd0;
reg     [2:0] litedramcore_dfi_p0_bank = 3'd0;
reg           litedramcore_dfi_p0_cas_n = 1'd1;
reg           litedramcore_dfi_p0_cs_n = 1'd1;
reg           litedramcore_dfi_p0_ras_n = 1'd1;
reg           litedramcore_dfi_p0_we_n = 1'd1;
wire          litedramcore_dfi_p0_cke;
wire          litedramcore_dfi_p0_odt;
wire          litedramcore_dfi_p0_reset_n;
reg           litedramcore_dfi_p0_act_n = 1'd1;
wire   [63:0] litedramcore_dfi_p0_wrdata;
reg           litedramcore_dfi_p0_wrdata_en = 1'd0;
wire    [7:0] litedramcore_dfi_p0_wrdata_mask;
reg           litedramcore_dfi_p0_rddata_en = 1'd0;
wire   [63:0] litedramcore_dfi_p0_rddata;
wire          litedramcore_dfi_p0_rddata_valid;
reg    [14:0] litedramcore_dfi_p1_address = 15'd0;
reg     [2:0] litedramcore_dfi_p1_bank = 3'd0;
reg           litedramcore_dfi_p1_cas_n = 1'd1;
reg           litedramcore_dfi_p1_cs_n = 1'd1;
reg           litedramcore_dfi_p1_ras_n = 1'd1;
reg           litedramcore_dfi_p1_we_n = 1'd1;
wire          litedramcore_dfi_p1_cke;
wire          litedramcore_dfi_p1_odt;
wire          litedramcore_dfi_p1_reset_n;
reg           litedramcore_dfi_p1_act_n = 1'd1;
wire   [63:0] litedramcore_dfi_p1_wrdata;
reg           litedramcore_dfi_p1_wrdata_en = 1'd0;
wire    [7:0] litedramcore_dfi_p1_wrdata_mask;
reg           litedramcore_dfi_p1_rddata_en = 1'd0;
wire   [63:0] litedramcore_dfi_p1_rddata;
wire          litedramcore_dfi_p1_rddata_valid;
reg    [14:0] litedramcore_dfi_p2_address = 15'd0;
reg     [2:0] litedramcore_dfi_p2_bank = 3'd0;
reg           litedramcore_dfi_p2_cas_n = 1'd1;
reg           litedramcore_dfi_p2_cs_n = 1'd1;
reg           litedramcore_dfi_p2_ras_n = 1'd1;
reg           litedramcore_dfi_p2_we_n = 1'd1;
wire          litedramcore_dfi_p2_cke;
wire          litedramcore_dfi_p2_odt;
wire          litedramcore_dfi_p2_reset_n;
reg           litedramcore_dfi_p2_act_n = 1'd1;
wire   [63:0] litedramcore_dfi_p2_wrdata;
reg           litedramcore_dfi_p2_wrdata_en = 1'd0;
wire    [7:0] litedramcore_dfi_p2_wrdata_mask;
reg           litedramcore_dfi_p2_rddata_en = 1'd0;
wire   [63:0] litedramcore_dfi_p2_rddata;
wire          litedramcore_dfi_p2_rddata_valid;
reg    [14:0] litedramcore_dfi_p3_address = 15'd0;
reg     [2:0] litedramcore_dfi_p3_bank = 3'd0;
reg           litedramcore_dfi_p3_cas_n = 1'd1;
reg           litedramcore_dfi_p3_cs_n = 1'd1;
reg           litedramcore_dfi_p3_ras_n = 1'd1;
reg           litedramcore_dfi_p3_we_n = 1'd1;
wire          litedramcore_dfi_p3_cke;
wire          litedramcore_dfi_p3_odt;
wire          litedramcore_dfi_p3_reset_n;
reg           litedramcore_dfi_p3_act_n = 1'd1;
wire   [63:0] litedramcore_dfi_p3_wrdata;
reg           litedramcore_dfi_p3_wrdata_en = 1'd0;
wire    [7:0] litedramcore_dfi_p3_wrdata_mask;
reg           litedramcore_dfi_p3_rddata_en = 1'd0;
wire   [63:0] litedramcore_dfi_p3_rddata;
wire          litedramcore_dfi_p3_rddata_valid;
reg           litedramcore_cmd_valid = 1'd0;
reg           litedramcore_cmd_ready = 1'd0;
reg           litedramcore_cmd_last = 1'd0;
reg    [14:0] litedramcore_cmd_payload_a = 15'd0;
reg     [2:0] litedramcore_cmd_payload_ba = 3'd0;
reg           litedramcore_cmd_payload_cas = 1'd0;
reg           litedramcore_cmd_payload_ras = 1'd0;
reg           litedramcore_cmd_payload_we = 1'd0;
reg           litedramcore_cmd_payload_is_read = 1'd0;
reg           litedramcore_cmd_payload_is_write = 1'd0;
wire          litedramcore_wants_refresh;
wire          litedramcore_wants_zqcs;
wire          litedramcore_timer_wait;
wire          litedramcore_timer_done0;
wire    [9:0] litedramcore_timer_count0;
wire          litedramcore_timer_done1;
reg     [9:0] litedramcore_timer_count1 = 10'd781;
wire          litedramcore_postponer_req_i;
reg           litedramcore_postponer_req_o = 1'd0;
reg           litedramcore_postponer_count = 1'd0;
reg           litedramcore_sequencer_start0 = 1'd0;
wire          litedramcore_sequencer_done0;
wire          litedramcore_sequencer_start1;
reg           litedramcore_sequencer_done1 = 1'd0;
reg     [5:0] litedramcore_sequencer_counter = 6'd0;
reg           litedramcore_sequencer_count = 1'd0;
wire          litedramcore_zqcs_timer_wait;
wire          litedramcore_zqcs_timer_done0;
wire   [26:0] litedramcore_zqcs_timer_count0;
wire          litedramcore_zqcs_timer_done1;
reg    [26:0] litedramcore_zqcs_timer_count1 = 27'd99999999;
reg           litedramcore_zqcs_executer_start = 1'd0;
reg           litedramcore_zqcs_executer_done = 1'd0;
reg     [4:0] litedramcore_zqcs_executer_counter = 5'd0;
wire          litedramcore_bankmachine0_req_valid;
wire          litedramcore_bankmachine0_req_ready;
wire          litedramcore_bankmachine0_req_we;
wire   [21:0] litedramcore_bankmachine0_req_addr;
wire          litedramcore_bankmachine0_req_lock;
reg           litedramcore_bankmachine0_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine0_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine0_refresh_req;
reg           litedramcore_bankmachine0_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine0_cmd_valid = 1'd0;
reg           litedramcore_bankmachine0_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine0_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine0_cmd_payload_ba;
reg           litedramcore_bankmachine0_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine0_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine0_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine0_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine0_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine0_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine0_auto_precharge = 1'd0;
wire          litedramcore_bankmachine0_sink_valid;
wire          litedramcore_bankmachine0_sink_ready;
reg           litedramcore_bankmachine0_sink_first = 1'd0;
reg           litedramcore_bankmachine0_sink_last = 1'd0;
wire          litedramcore_bankmachine0_sink_payload_we;
wire   [21:0] litedramcore_bankmachine0_sink_payload_addr;
wire          litedramcore_bankmachine0_source_valid;
wire          litedramcore_bankmachine0_source_ready;
wire          litedramcore_bankmachine0_source_first;
wire          litedramcore_bankmachine0_source_last;
wire          litedramcore_bankmachine0_source_payload_we;
wire   [21:0] litedramcore_bankmachine0_source_payload_addr;
wire          litedramcore_bankmachine0_syncfifo0_we;
wire          litedramcore_bankmachine0_syncfifo0_writable;
wire          litedramcore_bankmachine0_syncfifo0_re;
wire          litedramcore_bankmachine0_syncfifo0_readable;
wire   [24:0] litedramcore_bankmachine0_syncfifo0_din;
wire   [24:0] litedramcore_bankmachine0_syncfifo0_dout;
reg     [4:0] litedramcore_bankmachine0_level = 5'd0;
reg           litedramcore_bankmachine0_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine0_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine0_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine0_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine0_wrport_dat_r;
wire          litedramcore_bankmachine0_wrport_we;
wire   [24:0] litedramcore_bankmachine0_wrport_dat_w;
wire          litedramcore_bankmachine0_do_read;
wire    [3:0] litedramcore_bankmachine0_rdport_adr;
wire   [24:0] litedramcore_bankmachine0_rdport_dat_r;
wire          litedramcore_bankmachine0_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine0_fifo_in_payload_addr;
wire          litedramcore_bankmachine0_fifo_in_first;
wire          litedramcore_bankmachine0_fifo_in_last;
wire          litedramcore_bankmachine0_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine0_fifo_out_payload_addr;
wire          litedramcore_bankmachine0_fifo_out_first;
wire          litedramcore_bankmachine0_fifo_out_last;
wire          litedramcore_bankmachine0_sink_sink_valid;
wire          litedramcore_bankmachine0_sink_sink_ready;
wire          litedramcore_bankmachine0_sink_sink_first;
wire          litedramcore_bankmachine0_sink_sink_last;
wire          litedramcore_bankmachine0_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine0_sink_sink_payload_addr;
wire          litedramcore_bankmachine0_source_source_valid;
wire          litedramcore_bankmachine0_source_source_ready;
wire          litedramcore_bankmachine0_source_source_first;
wire          litedramcore_bankmachine0_source_source_last;
wire          litedramcore_bankmachine0_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine0_source_source_payload_addr;
wire          litedramcore_bankmachine0_pipe_valid_sink_valid;
wire          litedramcore_bankmachine0_pipe_valid_sink_ready;
wire          litedramcore_bankmachine0_pipe_valid_sink_first;
wire          litedramcore_bankmachine0_pipe_valid_sink_last;
wire          litedramcore_bankmachine0_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine0_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine0_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine0_pipe_valid_source_ready;
reg           litedramcore_bankmachine0_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine0_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine0_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine0_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine0_row = 15'd0;
reg           litedramcore_bankmachine0_row_opened = 1'd0;
wire          litedramcore_bankmachine0_row_hit;
reg           litedramcore_bankmachine0_row_open = 1'd0;
reg           litedramcore_bankmachine0_row_close = 1'd0;
reg           litedramcore_bankmachine0_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine0_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine0_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine0_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine0_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine0_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine0_trccon_count = 3'd0;
wire          litedramcore_bankmachine0_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine0_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine0_trascon_count = 3'd0;
wire          litedramcore_bankmachine1_req_valid;
wire          litedramcore_bankmachine1_req_ready;
wire          litedramcore_bankmachine1_req_we;
wire   [21:0] litedramcore_bankmachine1_req_addr;
wire          litedramcore_bankmachine1_req_lock;
reg           litedramcore_bankmachine1_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine1_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine1_refresh_req;
reg           litedramcore_bankmachine1_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine1_cmd_valid = 1'd0;
reg           litedramcore_bankmachine1_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine1_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine1_cmd_payload_ba;
reg           litedramcore_bankmachine1_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine1_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine1_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine1_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine1_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine1_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine1_auto_precharge = 1'd0;
wire          litedramcore_bankmachine1_sink_valid;
wire          litedramcore_bankmachine1_sink_ready;
reg           litedramcore_bankmachine1_sink_first = 1'd0;
reg           litedramcore_bankmachine1_sink_last = 1'd0;
wire          litedramcore_bankmachine1_sink_payload_we;
wire   [21:0] litedramcore_bankmachine1_sink_payload_addr;
wire          litedramcore_bankmachine1_source_valid;
wire          litedramcore_bankmachine1_source_ready;
wire          litedramcore_bankmachine1_source_first;
wire          litedramcore_bankmachine1_source_last;
wire          litedramcore_bankmachine1_source_payload_we;
wire   [21:0] litedramcore_bankmachine1_source_payload_addr;
wire          litedramcore_bankmachine1_syncfifo1_we;
wire          litedramcore_bankmachine1_syncfifo1_writable;
wire          litedramcore_bankmachine1_syncfifo1_re;
wire          litedramcore_bankmachine1_syncfifo1_readable;
wire   [24:0] litedramcore_bankmachine1_syncfifo1_din;
wire   [24:0] litedramcore_bankmachine1_syncfifo1_dout;
reg     [4:0] litedramcore_bankmachine1_level = 5'd0;
reg           litedramcore_bankmachine1_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine1_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine1_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine1_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine1_wrport_dat_r;
wire          litedramcore_bankmachine1_wrport_we;
wire   [24:0] litedramcore_bankmachine1_wrport_dat_w;
wire          litedramcore_bankmachine1_do_read;
wire    [3:0] litedramcore_bankmachine1_rdport_adr;
wire   [24:0] litedramcore_bankmachine1_rdport_dat_r;
wire          litedramcore_bankmachine1_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine1_fifo_in_payload_addr;
wire          litedramcore_bankmachine1_fifo_in_first;
wire          litedramcore_bankmachine1_fifo_in_last;
wire          litedramcore_bankmachine1_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine1_fifo_out_payload_addr;
wire          litedramcore_bankmachine1_fifo_out_first;
wire          litedramcore_bankmachine1_fifo_out_last;
wire          litedramcore_bankmachine1_sink_sink_valid;
wire          litedramcore_bankmachine1_sink_sink_ready;
wire          litedramcore_bankmachine1_sink_sink_first;
wire          litedramcore_bankmachine1_sink_sink_last;
wire          litedramcore_bankmachine1_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine1_sink_sink_payload_addr;
wire          litedramcore_bankmachine1_source_source_valid;
wire          litedramcore_bankmachine1_source_source_ready;
wire          litedramcore_bankmachine1_source_source_first;
wire          litedramcore_bankmachine1_source_source_last;
wire          litedramcore_bankmachine1_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine1_source_source_payload_addr;
wire          litedramcore_bankmachine1_pipe_valid_sink_valid;
wire          litedramcore_bankmachine1_pipe_valid_sink_ready;
wire          litedramcore_bankmachine1_pipe_valid_sink_first;
wire          litedramcore_bankmachine1_pipe_valid_sink_last;
wire          litedramcore_bankmachine1_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine1_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine1_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine1_pipe_valid_source_ready;
reg           litedramcore_bankmachine1_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine1_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine1_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine1_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine1_row = 15'd0;
reg           litedramcore_bankmachine1_row_opened = 1'd0;
wire          litedramcore_bankmachine1_row_hit;
reg           litedramcore_bankmachine1_row_open = 1'd0;
reg           litedramcore_bankmachine1_row_close = 1'd0;
reg           litedramcore_bankmachine1_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine1_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine1_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine1_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine1_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine1_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine1_trccon_count = 3'd0;
wire          litedramcore_bankmachine1_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine1_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine1_trascon_count = 3'd0;
wire          litedramcore_bankmachine2_req_valid;
wire          litedramcore_bankmachine2_req_ready;
wire          litedramcore_bankmachine2_req_we;
wire   [21:0] litedramcore_bankmachine2_req_addr;
wire          litedramcore_bankmachine2_req_lock;
reg           litedramcore_bankmachine2_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine2_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine2_refresh_req;
reg           litedramcore_bankmachine2_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine2_cmd_valid = 1'd0;
reg           litedramcore_bankmachine2_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine2_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine2_cmd_payload_ba;
reg           litedramcore_bankmachine2_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine2_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine2_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine2_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine2_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine2_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine2_auto_precharge = 1'd0;
wire          litedramcore_bankmachine2_sink_valid;
wire          litedramcore_bankmachine2_sink_ready;
reg           litedramcore_bankmachine2_sink_first = 1'd0;
reg           litedramcore_bankmachine2_sink_last = 1'd0;
wire          litedramcore_bankmachine2_sink_payload_we;
wire   [21:0] litedramcore_bankmachine2_sink_payload_addr;
wire          litedramcore_bankmachine2_source_valid;
wire          litedramcore_bankmachine2_source_ready;
wire          litedramcore_bankmachine2_source_first;
wire          litedramcore_bankmachine2_source_last;
wire          litedramcore_bankmachine2_source_payload_we;
wire   [21:0] litedramcore_bankmachine2_source_payload_addr;
wire          litedramcore_bankmachine2_syncfifo2_we;
wire          litedramcore_bankmachine2_syncfifo2_writable;
wire          litedramcore_bankmachine2_syncfifo2_re;
wire          litedramcore_bankmachine2_syncfifo2_readable;
wire   [24:0] litedramcore_bankmachine2_syncfifo2_din;
wire   [24:0] litedramcore_bankmachine2_syncfifo2_dout;
reg     [4:0] litedramcore_bankmachine2_level = 5'd0;
reg           litedramcore_bankmachine2_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine2_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine2_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine2_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine2_wrport_dat_r;
wire          litedramcore_bankmachine2_wrport_we;
wire   [24:0] litedramcore_bankmachine2_wrport_dat_w;
wire          litedramcore_bankmachine2_do_read;
wire    [3:0] litedramcore_bankmachine2_rdport_adr;
wire   [24:0] litedramcore_bankmachine2_rdport_dat_r;
wire          litedramcore_bankmachine2_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine2_fifo_in_payload_addr;
wire          litedramcore_bankmachine2_fifo_in_first;
wire          litedramcore_bankmachine2_fifo_in_last;
wire          litedramcore_bankmachine2_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine2_fifo_out_payload_addr;
wire          litedramcore_bankmachine2_fifo_out_first;
wire          litedramcore_bankmachine2_fifo_out_last;
wire          litedramcore_bankmachine2_sink_sink_valid;
wire          litedramcore_bankmachine2_sink_sink_ready;
wire          litedramcore_bankmachine2_sink_sink_first;
wire          litedramcore_bankmachine2_sink_sink_last;
wire          litedramcore_bankmachine2_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine2_sink_sink_payload_addr;
wire          litedramcore_bankmachine2_source_source_valid;
wire          litedramcore_bankmachine2_source_source_ready;
wire          litedramcore_bankmachine2_source_source_first;
wire          litedramcore_bankmachine2_source_source_last;
wire          litedramcore_bankmachine2_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine2_source_source_payload_addr;
wire          litedramcore_bankmachine2_pipe_valid_sink_valid;
wire          litedramcore_bankmachine2_pipe_valid_sink_ready;
wire          litedramcore_bankmachine2_pipe_valid_sink_first;
wire          litedramcore_bankmachine2_pipe_valid_sink_last;
wire          litedramcore_bankmachine2_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine2_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine2_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine2_pipe_valid_source_ready;
reg           litedramcore_bankmachine2_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine2_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine2_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine2_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine2_row = 15'd0;
reg           litedramcore_bankmachine2_row_opened = 1'd0;
wire          litedramcore_bankmachine2_row_hit;
reg           litedramcore_bankmachine2_row_open = 1'd0;
reg           litedramcore_bankmachine2_row_close = 1'd0;
reg           litedramcore_bankmachine2_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine2_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine2_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine2_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine2_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine2_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine2_trccon_count = 3'd0;
wire          litedramcore_bankmachine2_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine2_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine2_trascon_count = 3'd0;
wire          litedramcore_bankmachine3_req_valid;
wire          litedramcore_bankmachine3_req_ready;
wire          litedramcore_bankmachine3_req_we;
wire   [21:0] litedramcore_bankmachine3_req_addr;
wire          litedramcore_bankmachine3_req_lock;
reg           litedramcore_bankmachine3_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine3_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine3_refresh_req;
reg           litedramcore_bankmachine3_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine3_cmd_valid = 1'd0;
reg           litedramcore_bankmachine3_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine3_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine3_cmd_payload_ba;
reg           litedramcore_bankmachine3_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine3_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine3_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine3_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine3_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine3_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine3_auto_precharge = 1'd0;
wire          litedramcore_bankmachine3_sink_valid;
wire          litedramcore_bankmachine3_sink_ready;
reg           litedramcore_bankmachine3_sink_first = 1'd0;
reg           litedramcore_bankmachine3_sink_last = 1'd0;
wire          litedramcore_bankmachine3_sink_payload_we;
wire   [21:0] litedramcore_bankmachine3_sink_payload_addr;
wire          litedramcore_bankmachine3_source_valid;
wire          litedramcore_bankmachine3_source_ready;
wire          litedramcore_bankmachine3_source_first;
wire          litedramcore_bankmachine3_source_last;
wire          litedramcore_bankmachine3_source_payload_we;
wire   [21:0] litedramcore_bankmachine3_source_payload_addr;
wire          litedramcore_bankmachine3_syncfifo3_we;
wire          litedramcore_bankmachine3_syncfifo3_writable;
wire          litedramcore_bankmachine3_syncfifo3_re;
wire          litedramcore_bankmachine3_syncfifo3_readable;
wire   [24:0] litedramcore_bankmachine3_syncfifo3_din;
wire   [24:0] litedramcore_bankmachine3_syncfifo3_dout;
reg     [4:0] litedramcore_bankmachine3_level = 5'd0;
reg           litedramcore_bankmachine3_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine3_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine3_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine3_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine3_wrport_dat_r;
wire          litedramcore_bankmachine3_wrport_we;
wire   [24:0] litedramcore_bankmachine3_wrport_dat_w;
wire          litedramcore_bankmachine3_do_read;
wire    [3:0] litedramcore_bankmachine3_rdport_adr;
wire   [24:0] litedramcore_bankmachine3_rdport_dat_r;
wire          litedramcore_bankmachine3_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine3_fifo_in_payload_addr;
wire          litedramcore_bankmachine3_fifo_in_first;
wire          litedramcore_bankmachine3_fifo_in_last;
wire          litedramcore_bankmachine3_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine3_fifo_out_payload_addr;
wire          litedramcore_bankmachine3_fifo_out_first;
wire          litedramcore_bankmachine3_fifo_out_last;
wire          litedramcore_bankmachine3_sink_sink_valid;
wire          litedramcore_bankmachine3_sink_sink_ready;
wire          litedramcore_bankmachine3_sink_sink_first;
wire          litedramcore_bankmachine3_sink_sink_last;
wire          litedramcore_bankmachine3_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine3_sink_sink_payload_addr;
wire          litedramcore_bankmachine3_source_source_valid;
wire          litedramcore_bankmachine3_source_source_ready;
wire          litedramcore_bankmachine3_source_source_first;
wire          litedramcore_bankmachine3_source_source_last;
wire          litedramcore_bankmachine3_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine3_source_source_payload_addr;
wire          litedramcore_bankmachine3_pipe_valid_sink_valid;
wire          litedramcore_bankmachine3_pipe_valid_sink_ready;
wire          litedramcore_bankmachine3_pipe_valid_sink_first;
wire          litedramcore_bankmachine3_pipe_valid_sink_last;
wire          litedramcore_bankmachine3_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine3_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine3_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine3_pipe_valid_source_ready;
reg           litedramcore_bankmachine3_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine3_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine3_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine3_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine3_row = 15'd0;
reg           litedramcore_bankmachine3_row_opened = 1'd0;
wire          litedramcore_bankmachine3_row_hit;
reg           litedramcore_bankmachine3_row_open = 1'd0;
reg           litedramcore_bankmachine3_row_close = 1'd0;
reg           litedramcore_bankmachine3_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine3_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine3_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine3_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine3_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine3_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine3_trccon_count = 3'd0;
wire          litedramcore_bankmachine3_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine3_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine3_trascon_count = 3'd0;
wire          litedramcore_bankmachine4_req_valid;
wire          litedramcore_bankmachine4_req_ready;
wire          litedramcore_bankmachine4_req_we;
wire   [21:0] litedramcore_bankmachine4_req_addr;
wire          litedramcore_bankmachine4_req_lock;
reg           litedramcore_bankmachine4_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine4_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine4_refresh_req;
reg           litedramcore_bankmachine4_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine4_cmd_valid = 1'd0;
reg           litedramcore_bankmachine4_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine4_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine4_cmd_payload_ba;
reg           litedramcore_bankmachine4_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine4_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine4_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine4_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine4_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine4_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine4_auto_precharge = 1'd0;
wire          litedramcore_bankmachine4_sink_valid;
wire          litedramcore_bankmachine4_sink_ready;
reg           litedramcore_bankmachine4_sink_first = 1'd0;
reg           litedramcore_bankmachine4_sink_last = 1'd0;
wire          litedramcore_bankmachine4_sink_payload_we;
wire   [21:0] litedramcore_bankmachine4_sink_payload_addr;
wire          litedramcore_bankmachine4_source_valid;
wire          litedramcore_bankmachine4_source_ready;
wire          litedramcore_bankmachine4_source_first;
wire          litedramcore_bankmachine4_source_last;
wire          litedramcore_bankmachine4_source_payload_we;
wire   [21:0] litedramcore_bankmachine4_source_payload_addr;
wire          litedramcore_bankmachine4_syncfifo4_we;
wire          litedramcore_bankmachine4_syncfifo4_writable;
wire          litedramcore_bankmachine4_syncfifo4_re;
wire          litedramcore_bankmachine4_syncfifo4_readable;
wire   [24:0] litedramcore_bankmachine4_syncfifo4_din;
wire   [24:0] litedramcore_bankmachine4_syncfifo4_dout;
reg     [4:0] litedramcore_bankmachine4_level = 5'd0;
reg           litedramcore_bankmachine4_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine4_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine4_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine4_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine4_wrport_dat_r;
wire          litedramcore_bankmachine4_wrport_we;
wire   [24:0] litedramcore_bankmachine4_wrport_dat_w;
wire          litedramcore_bankmachine4_do_read;
wire    [3:0] litedramcore_bankmachine4_rdport_adr;
wire   [24:0] litedramcore_bankmachine4_rdport_dat_r;
wire          litedramcore_bankmachine4_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine4_fifo_in_payload_addr;
wire          litedramcore_bankmachine4_fifo_in_first;
wire          litedramcore_bankmachine4_fifo_in_last;
wire          litedramcore_bankmachine4_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine4_fifo_out_payload_addr;
wire          litedramcore_bankmachine4_fifo_out_first;
wire          litedramcore_bankmachine4_fifo_out_last;
wire          litedramcore_bankmachine4_sink_sink_valid;
wire          litedramcore_bankmachine4_sink_sink_ready;
wire          litedramcore_bankmachine4_sink_sink_first;
wire          litedramcore_bankmachine4_sink_sink_last;
wire          litedramcore_bankmachine4_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine4_sink_sink_payload_addr;
wire          litedramcore_bankmachine4_source_source_valid;
wire          litedramcore_bankmachine4_source_source_ready;
wire          litedramcore_bankmachine4_source_source_first;
wire          litedramcore_bankmachine4_source_source_last;
wire          litedramcore_bankmachine4_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine4_source_source_payload_addr;
wire          litedramcore_bankmachine4_pipe_valid_sink_valid;
wire          litedramcore_bankmachine4_pipe_valid_sink_ready;
wire          litedramcore_bankmachine4_pipe_valid_sink_first;
wire          litedramcore_bankmachine4_pipe_valid_sink_last;
wire          litedramcore_bankmachine4_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine4_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine4_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine4_pipe_valid_source_ready;
reg           litedramcore_bankmachine4_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine4_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine4_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine4_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine4_row = 15'd0;
reg           litedramcore_bankmachine4_row_opened = 1'd0;
wire          litedramcore_bankmachine4_row_hit;
reg           litedramcore_bankmachine4_row_open = 1'd0;
reg           litedramcore_bankmachine4_row_close = 1'd0;
reg           litedramcore_bankmachine4_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine4_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine4_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine4_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine4_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine4_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine4_trccon_count = 3'd0;
wire          litedramcore_bankmachine4_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine4_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine4_trascon_count = 3'd0;
wire          litedramcore_bankmachine5_req_valid;
wire          litedramcore_bankmachine5_req_ready;
wire          litedramcore_bankmachine5_req_we;
wire   [21:0] litedramcore_bankmachine5_req_addr;
wire          litedramcore_bankmachine5_req_lock;
reg           litedramcore_bankmachine5_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine5_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine5_refresh_req;
reg           litedramcore_bankmachine5_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine5_cmd_valid = 1'd0;
reg           litedramcore_bankmachine5_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine5_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine5_cmd_payload_ba;
reg           litedramcore_bankmachine5_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine5_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine5_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine5_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine5_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine5_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine5_auto_precharge = 1'd0;
wire          litedramcore_bankmachine5_sink_valid;
wire          litedramcore_bankmachine5_sink_ready;
reg           litedramcore_bankmachine5_sink_first = 1'd0;
reg           litedramcore_bankmachine5_sink_last = 1'd0;
wire          litedramcore_bankmachine5_sink_payload_we;
wire   [21:0] litedramcore_bankmachine5_sink_payload_addr;
wire          litedramcore_bankmachine5_source_valid;
wire          litedramcore_bankmachine5_source_ready;
wire          litedramcore_bankmachine5_source_first;
wire          litedramcore_bankmachine5_source_last;
wire          litedramcore_bankmachine5_source_payload_we;
wire   [21:0] litedramcore_bankmachine5_source_payload_addr;
wire          litedramcore_bankmachine5_syncfifo5_we;
wire          litedramcore_bankmachine5_syncfifo5_writable;
wire          litedramcore_bankmachine5_syncfifo5_re;
wire          litedramcore_bankmachine5_syncfifo5_readable;
wire   [24:0] litedramcore_bankmachine5_syncfifo5_din;
wire   [24:0] litedramcore_bankmachine5_syncfifo5_dout;
reg     [4:0] litedramcore_bankmachine5_level = 5'd0;
reg           litedramcore_bankmachine5_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine5_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine5_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine5_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine5_wrport_dat_r;
wire          litedramcore_bankmachine5_wrport_we;
wire   [24:0] litedramcore_bankmachine5_wrport_dat_w;
wire          litedramcore_bankmachine5_do_read;
wire    [3:0] litedramcore_bankmachine5_rdport_adr;
wire   [24:0] litedramcore_bankmachine5_rdport_dat_r;
wire          litedramcore_bankmachine5_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine5_fifo_in_payload_addr;
wire          litedramcore_bankmachine5_fifo_in_first;
wire          litedramcore_bankmachine5_fifo_in_last;
wire          litedramcore_bankmachine5_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine5_fifo_out_payload_addr;
wire          litedramcore_bankmachine5_fifo_out_first;
wire          litedramcore_bankmachine5_fifo_out_last;
wire          litedramcore_bankmachine5_sink_sink_valid;
wire          litedramcore_bankmachine5_sink_sink_ready;
wire          litedramcore_bankmachine5_sink_sink_first;
wire          litedramcore_bankmachine5_sink_sink_last;
wire          litedramcore_bankmachine5_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine5_sink_sink_payload_addr;
wire          litedramcore_bankmachine5_source_source_valid;
wire          litedramcore_bankmachine5_source_source_ready;
wire          litedramcore_bankmachine5_source_source_first;
wire          litedramcore_bankmachine5_source_source_last;
wire          litedramcore_bankmachine5_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine5_source_source_payload_addr;
wire          litedramcore_bankmachine5_pipe_valid_sink_valid;
wire          litedramcore_bankmachine5_pipe_valid_sink_ready;
wire          litedramcore_bankmachine5_pipe_valid_sink_first;
wire          litedramcore_bankmachine5_pipe_valid_sink_last;
wire          litedramcore_bankmachine5_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine5_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine5_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine5_pipe_valid_source_ready;
reg           litedramcore_bankmachine5_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine5_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine5_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine5_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine5_row = 15'd0;
reg           litedramcore_bankmachine5_row_opened = 1'd0;
wire          litedramcore_bankmachine5_row_hit;
reg           litedramcore_bankmachine5_row_open = 1'd0;
reg           litedramcore_bankmachine5_row_close = 1'd0;
reg           litedramcore_bankmachine5_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine5_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine5_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine5_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine5_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine5_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine5_trccon_count = 3'd0;
wire          litedramcore_bankmachine5_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine5_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine5_trascon_count = 3'd0;
wire          litedramcore_bankmachine6_req_valid;
wire          litedramcore_bankmachine6_req_ready;
wire          litedramcore_bankmachine6_req_we;
wire   [21:0] litedramcore_bankmachine6_req_addr;
wire          litedramcore_bankmachine6_req_lock;
reg           litedramcore_bankmachine6_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine6_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine6_refresh_req;
reg           litedramcore_bankmachine6_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine6_cmd_valid = 1'd0;
reg           litedramcore_bankmachine6_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine6_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine6_cmd_payload_ba;
reg           litedramcore_bankmachine6_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine6_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine6_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine6_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine6_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine6_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine6_auto_precharge = 1'd0;
wire          litedramcore_bankmachine6_sink_valid;
wire          litedramcore_bankmachine6_sink_ready;
reg           litedramcore_bankmachine6_sink_first = 1'd0;
reg           litedramcore_bankmachine6_sink_last = 1'd0;
wire          litedramcore_bankmachine6_sink_payload_we;
wire   [21:0] litedramcore_bankmachine6_sink_payload_addr;
wire          litedramcore_bankmachine6_source_valid;
wire          litedramcore_bankmachine6_source_ready;
wire          litedramcore_bankmachine6_source_first;
wire          litedramcore_bankmachine6_source_last;
wire          litedramcore_bankmachine6_source_payload_we;
wire   [21:0] litedramcore_bankmachine6_source_payload_addr;
wire          litedramcore_bankmachine6_syncfifo6_we;
wire          litedramcore_bankmachine6_syncfifo6_writable;
wire          litedramcore_bankmachine6_syncfifo6_re;
wire          litedramcore_bankmachine6_syncfifo6_readable;
wire   [24:0] litedramcore_bankmachine6_syncfifo6_din;
wire   [24:0] litedramcore_bankmachine6_syncfifo6_dout;
reg     [4:0] litedramcore_bankmachine6_level = 5'd0;
reg           litedramcore_bankmachine6_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine6_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine6_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine6_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine6_wrport_dat_r;
wire          litedramcore_bankmachine6_wrport_we;
wire   [24:0] litedramcore_bankmachine6_wrport_dat_w;
wire          litedramcore_bankmachine6_do_read;
wire    [3:0] litedramcore_bankmachine6_rdport_adr;
wire   [24:0] litedramcore_bankmachine6_rdport_dat_r;
wire          litedramcore_bankmachine6_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine6_fifo_in_payload_addr;
wire          litedramcore_bankmachine6_fifo_in_first;
wire          litedramcore_bankmachine6_fifo_in_last;
wire          litedramcore_bankmachine6_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine6_fifo_out_payload_addr;
wire          litedramcore_bankmachine6_fifo_out_first;
wire          litedramcore_bankmachine6_fifo_out_last;
wire          litedramcore_bankmachine6_sink_sink_valid;
wire          litedramcore_bankmachine6_sink_sink_ready;
wire          litedramcore_bankmachine6_sink_sink_first;
wire          litedramcore_bankmachine6_sink_sink_last;
wire          litedramcore_bankmachine6_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine6_sink_sink_payload_addr;
wire          litedramcore_bankmachine6_source_source_valid;
wire          litedramcore_bankmachine6_source_source_ready;
wire          litedramcore_bankmachine6_source_source_first;
wire          litedramcore_bankmachine6_source_source_last;
wire          litedramcore_bankmachine6_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine6_source_source_payload_addr;
wire          litedramcore_bankmachine6_pipe_valid_sink_valid;
wire          litedramcore_bankmachine6_pipe_valid_sink_ready;
wire          litedramcore_bankmachine6_pipe_valid_sink_first;
wire          litedramcore_bankmachine6_pipe_valid_sink_last;
wire          litedramcore_bankmachine6_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine6_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine6_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine6_pipe_valid_source_ready;
reg           litedramcore_bankmachine6_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine6_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine6_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine6_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine6_row = 15'd0;
reg           litedramcore_bankmachine6_row_opened = 1'd0;
wire          litedramcore_bankmachine6_row_hit;
reg           litedramcore_bankmachine6_row_open = 1'd0;
reg           litedramcore_bankmachine6_row_close = 1'd0;
reg           litedramcore_bankmachine6_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine6_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine6_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine6_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine6_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine6_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine6_trccon_count = 3'd0;
wire          litedramcore_bankmachine6_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine6_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine6_trascon_count = 3'd0;
wire          litedramcore_bankmachine7_req_valid;
wire          litedramcore_bankmachine7_req_ready;
wire          litedramcore_bankmachine7_req_we;
wire   [21:0] litedramcore_bankmachine7_req_addr;
wire          litedramcore_bankmachine7_req_lock;
reg           litedramcore_bankmachine7_req_wdata_ready = 1'd0;
reg           litedramcore_bankmachine7_req_rdata_valid = 1'd0;
wire          litedramcore_bankmachine7_refresh_req;
reg           litedramcore_bankmachine7_refresh_gnt = 1'd0;
reg           litedramcore_bankmachine7_cmd_valid = 1'd0;
reg           litedramcore_bankmachine7_cmd_ready = 1'd0;
reg    [14:0] litedramcore_bankmachine7_cmd_payload_a = 15'd0;
wire    [2:0] litedramcore_bankmachine7_cmd_payload_ba;
reg           litedramcore_bankmachine7_cmd_payload_cas = 1'd0;
reg           litedramcore_bankmachine7_cmd_payload_ras = 1'd0;
reg           litedramcore_bankmachine7_cmd_payload_we = 1'd0;
reg           litedramcore_bankmachine7_cmd_payload_is_cmd = 1'd0;
reg           litedramcore_bankmachine7_cmd_payload_is_read = 1'd0;
reg           litedramcore_bankmachine7_cmd_payload_is_write = 1'd0;
reg           litedramcore_bankmachine7_auto_precharge = 1'd0;
wire          litedramcore_bankmachine7_sink_valid;
wire          litedramcore_bankmachine7_sink_ready;
reg           litedramcore_bankmachine7_sink_first = 1'd0;
reg           litedramcore_bankmachine7_sink_last = 1'd0;
wire          litedramcore_bankmachine7_sink_payload_we;
wire   [21:0] litedramcore_bankmachine7_sink_payload_addr;
wire          litedramcore_bankmachine7_source_valid;
wire          litedramcore_bankmachine7_source_ready;
wire          litedramcore_bankmachine7_source_first;
wire          litedramcore_bankmachine7_source_last;
wire          litedramcore_bankmachine7_source_payload_we;
wire   [21:0] litedramcore_bankmachine7_source_payload_addr;
wire          litedramcore_bankmachine7_syncfifo7_we;
wire          litedramcore_bankmachine7_syncfifo7_writable;
wire          litedramcore_bankmachine7_syncfifo7_re;
wire          litedramcore_bankmachine7_syncfifo7_readable;
wire   [24:0] litedramcore_bankmachine7_syncfifo7_din;
wire   [24:0] litedramcore_bankmachine7_syncfifo7_dout;
reg     [4:0] litedramcore_bankmachine7_level = 5'd0;
reg           litedramcore_bankmachine7_replace = 1'd0;
reg     [3:0] litedramcore_bankmachine7_produce = 4'd0;
reg     [3:0] litedramcore_bankmachine7_consume = 4'd0;
reg     [3:0] litedramcore_bankmachine7_wrport_adr = 4'd0;
wire   [24:0] litedramcore_bankmachine7_wrport_dat_r;
wire          litedramcore_bankmachine7_wrport_we;
wire   [24:0] litedramcore_bankmachine7_wrport_dat_w;
wire          litedramcore_bankmachine7_do_read;
wire    [3:0] litedramcore_bankmachine7_rdport_adr;
wire   [24:0] litedramcore_bankmachine7_rdport_dat_r;
wire          litedramcore_bankmachine7_fifo_in_payload_we;
wire   [21:0] litedramcore_bankmachine7_fifo_in_payload_addr;
wire          litedramcore_bankmachine7_fifo_in_first;
wire          litedramcore_bankmachine7_fifo_in_last;
wire          litedramcore_bankmachine7_fifo_out_payload_we;
wire   [21:0] litedramcore_bankmachine7_fifo_out_payload_addr;
wire          litedramcore_bankmachine7_fifo_out_first;
wire          litedramcore_bankmachine7_fifo_out_last;
wire          litedramcore_bankmachine7_sink_sink_valid;
wire          litedramcore_bankmachine7_sink_sink_ready;
wire          litedramcore_bankmachine7_sink_sink_first;
wire          litedramcore_bankmachine7_sink_sink_last;
wire          litedramcore_bankmachine7_sink_sink_payload_we;
wire   [21:0] litedramcore_bankmachine7_sink_sink_payload_addr;
wire          litedramcore_bankmachine7_source_source_valid;
wire          litedramcore_bankmachine7_source_source_ready;
wire          litedramcore_bankmachine7_source_source_first;
wire          litedramcore_bankmachine7_source_source_last;
wire          litedramcore_bankmachine7_source_source_payload_we;
wire   [21:0] litedramcore_bankmachine7_source_source_payload_addr;
wire          litedramcore_bankmachine7_pipe_valid_sink_valid;
wire          litedramcore_bankmachine7_pipe_valid_sink_ready;
wire          litedramcore_bankmachine7_pipe_valid_sink_first;
wire          litedramcore_bankmachine7_pipe_valid_sink_last;
wire          litedramcore_bankmachine7_pipe_valid_sink_payload_we;
wire   [21:0] litedramcore_bankmachine7_pipe_valid_sink_payload_addr;
reg           litedramcore_bankmachine7_pipe_valid_source_valid = 1'd0;
wire          litedramcore_bankmachine7_pipe_valid_source_ready;
reg           litedramcore_bankmachine7_pipe_valid_source_first = 1'd0;
reg           litedramcore_bankmachine7_pipe_valid_source_last = 1'd0;
reg           litedramcore_bankmachine7_pipe_valid_source_payload_we = 1'd0;
reg    [21:0] litedramcore_bankmachine7_pipe_valid_source_payload_addr = 22'd0;
reg    [14:0] litedramcore_bankmachine7_row = 15'd0;
reg           litedramcore_bankmachine7_row_opened = 1'd0;
wire          litedramcore_bankmachine7_row_hit;
reg           litedramcore_bankmachine7_row_open = 1'd0;
reg           litedramcore_bankmachine7_row_close = 1'd0;
reg           litedramcore_bankmachine7_row_col_n_addr_sel = 1'd0;
wire          litedramcore_bankmachine7_twtpcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine7_twtpcon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine7_twtpcon_count = 3'd0;
wire          litedramcore_bankmachine7_trccon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine7_trccon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine7_trccon_count = 3'd0;
wire          litedramcore_bankmachine7_trascon_valid;
(* dont_touch = "true" *)
reg           litedramcore_bankmachine7_trascon_ready = 1'd0;
reg     [2:0] litedramcore_bankmachine7_trascon_count = 3'd0;
wire          litedramcore_ras_allowed;
wire          litedramcore_cas_allowed;
wire    [1:0] litedramcore_rdcmdphase;
wire    [1:0] litedramcore_wrcmdphase;
reg           litedramcore_choose_cmd_want_reads = 1'd0;
reg           litedramcore_choose_cmd_want_writes = 1'd0;
reg           litedramcore_choose_cmd_want_cmds = 1'd0;
reg           litedramcore_choose_cmd_want_activates = 1'd0;
wire          litedramcore_choose_cmd_cmd_valid;
reg           litedramcore_choose_cmd_cmd_ready = 1'd0;
wire   [14:0] litedramcore_choose_cmd_cmd_payload_a;
wire    [2:0] litedramcore_choose_cmd_cmd_payload_ba;
reg           litedramcore_choose_cmd_cmd_payload_cas = 1'd0;
reg           litedramcore_choose_cmd_cmd_payload_ras = 1'd0;
reg           litedramcore_choose_cmd_cmd_payload_we = 1'd0;
wire          litedramcore_choose_cmd_cmd_payload_is_cmd;
wire          litedramcore_choose_cmd_cmd_payload_is_read;
wire          litedramcore_choose_cmd_cmd_payload_is_write;
reg     [7:0] litedramcore_choose_cmd_valids = 8'd0;
wire    [7:0] litedramcore_choose_cmd_request;
reg     [2:0] litedramcore_choose_cmd_grant = 3'd0;
wire          litedramcore_choose_cmd_ce;
reg           litedramcore_choose_req_want_reads = 1'd0;
reg           litedramcore_choose_req_want_writes = 1'd0;
reg           litedramcore_choose_req_want_cmds = 1'd0;
reg           litedramcore_choose_req_want_activates = 1'd0;
wire          litedramcore_choose_req_cmd_valid;
reg           litedramcore_choose_req_cmd_ready = 1'd0;
wire   [14:0] litedramcore_choose_req_cmd_payload_a;
wire    [2:0] litedramcore_choose_req_cmd_payload_ba;
reg           litedramcore_choose_req_cmd_payload_cas = 1'd0;
reg           litedramcore_choose_req_cmd_payload_ras = 1'd0;
reg           litedramcore_choose_req_cmd_payload_we = 1'd0;
wire          litedramcore_choose_req_cmd_payload_is_cmd;
wire          litedramcore_choose_req_cmd_payload_is_read;
wire          litedramcore_choose_req_cmd_payload_is_write;
reg     [7:0] litedramcore_choose_req_valids = 8'd0;
wire    [7:0] litedramcore_choose_req_request;
reg     [2:0] litedramcore_choose_req_grant = 3'd0;
wire          litedramcore_choose_req_ce;
reg    [14:0] litedramcore_nop_a = 15'd0;
reg     [2:0] litedramcore_nop_ba = 3'd0;
reg     [1:0] litedramcore_steerer_sel0 = 2'd0;
reg     [1:0] litedramcore_steerer_sel1 = 2'd0;
reg     [1:0] litedramcore_steerer_sel2 = 2'd0;
reg     [1:0] litedramcore_steerer_sel3 = 2'd0;
reg           litedramcore_steerer0 = 1'd1;
reg           litedramcore_steerer1 = 1'd1;
reg           litedramcore_steerer2 = 1'd1;
reg           litedramcore_steerer3 = 1'd1;
reg           litedramcore_steerer4 = 1'd1;
reg           litedramcore_steerer5 = 1'd1;
reg           litedramcore_steerer6 = 1'd1;
reg           litedramcore_steerer7 = 1'd1;
wire          litedramcore_trrdcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_trrdcon_ready = 1'd0;
reg           litedramcore_trrdcon_count = 1'd0;
wire          litedramcore_tfawcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_tfawcon_ready = 1'd1;
wire    [2:0] litedramcore_tfawcon_count;
reg     [4:0] litedramcore_tfawcon_window = 5'd0;
wire          litedramcore_tccdcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_tccdcon_ready = 1'd0;
reg           litedramcore_tccdcon_count = 1'd0;
wire          litedramcore_twtrcon_valid;
(* dont_touch = "true" *)
reg           litedramcore_twtrcon_ready = 1'd0;
reg     [2:0] litedramcore_twtrcon_count = 3'd0;
wire          litedramcore_read_available;
wire          litedramcore_write_available;
reg           litedramcore_en0 = 1'd0;
wire          litedramcore_max_time0;
reg     [4:0] litedramcore_time0 = 5'd0;
reg           litedramcore_en1 = 1'd0;
wire          litedramcore_max_time1;
reg     [3:0] litedramcore_time1 = 4'd0;
wire          litedramcore_go_to_refresh;
reg           init_done_storage = 1'd0;
reg           init_done_re = 1'd0;
reg           init_error_storage = 1'd0;
reg           init_error_re = 1'd0;
wire   [29:0] wb_bus_adr;
wire   [31:0] wb_bus_dat_w;
wire   [31:0] wb_bus_dat_r;
wire    [3:0] wb_bus_sel;
wire          wb_bus_cyc;
wire          wb_bus_stb;
wire          wb_bus_ack;
wire          wb_bus_we;
wire    [2:0] wb_bus_cti;
wire    [1:0] wb_bus_bte;
wire          wb_bus_err;
wire          user_enable;
wire          user_port_cmd_valid;
wire          user_port_cmd_ready;
wire          user_port_cmd_payload_we;
wire   [24:0] user_port_cmd_payload_addr;
wire          user_port_wdata_valid;
wire          user_port_wdata_ready;
wire  [255:0] user_port_wdata_payload_data;
wire   [31:0] user_port_wdata_payload_we;
wire          user_port_rdata_valid;
wire          user_port_rdata_ready;
wire  [255:0] user_port_rdata_payload_data;
reg    [13:0] litedramcore_adr = 14'd0;
reg           litedramcore_we = 1'd0;
reg    [31:0] litedramcore_dat_w = 32'd0;
wire   [31:0] litedramcore_dat_r;
wire   [29:0] litedramcore_wishbone_adr;
wire   [31:0] litedramcore_wishbone_dat_w;
reg    [31:0] litedramcore_wishbone_dat_r = 32'd0;
wire    [3:0] litedramcore_wishbone_sel;
wire          litedramcore_wishbone_cyc;
wire          litedramcore_wishbone_stb;
reg           litedramcore_wishbone_ack = 1'd0;
wire          litedramcore_wishbone_we;
wire    [2:0] litedramcore_wishbone_cti;
wire    [1:0] litedramcore_wishbone_bte;
reg           litedramcore_wishbone_err = 1'd0;
wire   [13:0] interface0_bank_bus_adr;
wire          interface0_bank_bus_we;
wire   [31:0] interface0_bank_bus_dat_w;
reg    [31:0] interface0_bank_bus_dat_r = 32'd0;
reg           csrbank0_init_done0_re = 1'd0;
wire          csrbank0_init_done0_r;
reg           csrbank0_init_done0_we = 1'd0;
wire          csrbank0_init_done0_w;
reg           csrbank0_init_error0_re = 1'd0;
wire          csrbank0_init_error0_r;
reg           csrbank0_init_error0_we = 1'd0;
wire          csrbank0_init_error0_w;
wire          csrbank0_sel;
wire   [13:0] interface1_bank_bus_adr;
wire          interface1_bank_bus_we;
wire   [31:0] interface1_bank_bus_dat_w;
reg    [31:0] interface1_bank_bus_dat_r = 32'd0;
reg           csrbank1_rst0_re = 1'd0;
wire          csrbank1_rst0_r;
reg           csrbank1_rst0_we = 1'd0;
wire          csrbank1_rst0_w;
reg           csrbank1_dly_sel0_re = 1'd0;
wire    [3:0] csrbank1_dly_sel0_r;
reg           csrbank1_dly_sel0_we = 1'd0;
wire    [3:0] csrbank1_dly_sel0_w;
reg           csrbank1_half_sys8x_taps0_re = 1'd0;
wire    [4:0] csrbank1_half_sys8x_taps0_r;
reg           csrbank1_half_sys8x_taps0_we = 1'd0;
wire    [4:0] csrbank1_half_sys8x_taps0_w;
reg           csrbank1_wlevel_en0_re = 1'd0;
wire          csrbank1_wlevel_en0_r;
reg           csrbank1_wlevel_en0_we = 1'd0;
wire          csrbank1_wlevel_en0_w;
reg           csrbank1_rdphase0_re = 1'd0;
wire    [1:0] csrbank1_rdphase0_r;
reg           csrbank1_rdphase0_we = 1'd0;
wire    [1:0] csrbank1_rdphase0_w;
reg           csrbank1_wrphase0_re = 1'd0;
wire    [1:0] csrbank1_wrphase0_r;
reg           csrbank1_wrphase0_we = 1'd0;
wire    [1:0] csrbank1_wrphase0_w;
wire          csrbank1_sel;
wire   [13:0] interface2_bank_bus_adr;
wire          interface2_bank_bus_we;
wire   [31:0] interface2_bank_bus_dat_w;
reg    [31:0] interface2_bank_bus_dat_r = 32'd0;
reg           csrbank2_dfii_control0_re = 1'd0;
wire    [3:0] csrbank2_dfii_control0_r;
reg           csrbank2_dfii_control0_we = 1'd0;
wire    [3:0] csrbank2_dfii_control0_w;
reg           csrbank2_dfii_pi0_command0_re = 1'd0;
wire    [5:0] csrbank2_dfii_pi0_command0_r;
reg           csrbank2_dfii_pi0_command0_we = 1'd0;
wire    [5:0] csrbank2_dfii_pi0_command0_w;
reg           csrbank2_dfii_pi0_address0_re = 1'd0;
wire   [14:0] csrbank2_dfii_pi0_address0_r;
reg           csrbank2_dfii_pi0_address0_we = 1'd0;
wire   [14:0] csrbank2_dfii_pi0_address0_w;
reg           csrbank2_dfii_pi0_baddress0_re = 1'd0;
wire    [2:0] csrbank2_dfii_pi0_baddress0_r;
reg           csrbank2_dfii_pi0_baddress0_we = 1'd0;
wire    [2:0] csrbank2_dfii_pi0_baddress0_w;
reg           csrbank2_dfii_pi0_wrdata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_wrdata1_r;
reg           csrbank2_dfii_pi0_wrdata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_wrdata1_w;
reg           csrbank2_dfii_pi0_wrdata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_wrdata0_r;
reg           csrbank2_dfii_pi0_wrdata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_wrdata0_w;
reg           csrbank2_dfii_pi0_rddata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_rddata1_r;
reg           csrbank2_dfii_pi0_rddata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_rddata1_w;
reg           csrbank2_dfii_pi0_rddata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_rddata0_r;
reg           csrbank2_dfii_pi0_rddata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi0_rddata0_w;
reg           csrbank2_dfii_pi1_command0_re = 1'd0;
wire    [5:0] csrbank2_dfii_pi1_command0_r;
reg           csrbank2_dfii_pi1_command0_we = 1'd0;
wire    [5:0] csrbank2_dfii_pi1_command0_w;
reg           csrbank2_dfii_pi1_address0_re = 1'd0;
wire   [14:0] csrbank2_dfii_pi1_address0_r;
reg           csrbank2_dfii_pi1_address0_we = 1'd0;
wire   [14:0] csrbank2_dfii_pi1_address0_w;
reg           csrbank2_dfii_pi1_baddress0_re = 1'd0;
wire    [2:0] csrbank2_dfii_pi1_baddress0_r;
reg           csrbank2_dfii_pi1_baddress0_we = 1'd0;
wire    [2:0] csrbank2_dfii_pi1_baddress0_w;
reg           csrbank2_dfii_pi1_wrdata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_wrdata1_r;
reg           csrbank2_dfii_pi1_wrdata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_wrdata1_w;
reg           csrbank2_dfii_pi1_wrdata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_wrdata0_r;
reg           csrbank2_dfii_pi1_wrdata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_wrdata0_w;
reg           csrbank2_dfii_pi1_rddata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_rddata1_r;
reg           csrbank2_dfii_pi1_rddata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_rddata1_w;
reg           csrbank2_dfii_pi1_rddata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_rddata0_r;
reg           csrbank2_dfii_pi1_rddata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi1_rddata0_w;
reg           csrbank2_dfii_pi2_command0_re = 1'd0;
wire    [5:0] csrbank2_dfii_pi2_command0_r;
reg           csrbank2_dfii_pi2_command0_we = 1'd0;
wire    [5:0] csrbank2_dfii_pi2_command0_w;
reg           csrbank2_dfii_pi2_address0_re = 1'd0;
wire   [14:0] csrbank2_dfii_pi2_address0_r;
reg           csrbank2_dfii_pi2_address0_we = 1'd0;
wire   [14:0] csrbank2_dfii_pi2_address0_w;
reg           csrbank2_dfii_pi2_baddress0_re = 1'd0;
wire    [2:0] csrbank2_dfii_pi2_baddress0_r;
reg           csrbank2_dfii_pi2_baddress0_we = 1'd0;
wire    [2:0] csrbank2_dfii_pi2_baddress0_w;
reg           csrbank2_dfii_pi2_wrdata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_wrdata1_r;
reg           csrbank2_dfii_pi2_wrdata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_wrdata1_w;
reg           csrbank2_dfii_pi2_wrdata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_wrdata0_r;
reg           csrbank2_dfii_pi2_wrdata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_wrdata0_w;
reg           csrbank2_dfii_pi2_rddata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_rddata1_r;
reg           csrbank2_dfii_pi2_rddata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_rddata1_w;
reg           csrbank2_dfii_pi2_rddata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_rddata0_r;
reg           csrbank2_dfii_pi2_rddata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi2_rddata0_w;
reg           csrbank2_dfii_pi3_command0_re = 1'd0;
wire    [5:0] csrbank2_dfii_pi3_command0_r;
reg           csrbank2_dfii_pi3_command0_we = 1'd0;
wire    [5:0] csrbank2_dfii_pi3_command0_w;
reg           csrbank2_dfii_pi3_address0_re = 1'd0;
wire   [14:0] csrbank2_dfii_pi3_address0_r;
reg           csrbank2_dfii_pi3_address0_we = 1'd0;
wire   [14:0] csrbank2_dfii_pi3_address0_w;
reg           csrbank2_dfii_pi3_baddress0_re = 1'd0;
wire    [2:0] csrbank2_dfii_pi3_baddress0_r;
reg           csrbank2_dfii_pi3_baddress0_we = 1'd0;
wire    [2:0] csrbank2_dfii_pi3_baddress0_w;
reg           csrbank2_dfii_pi3_wrdata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_wrdata1_r;
reg           csrbank2_dfii_pi3_wrdata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_wrdata1_w;
reg           csrbank2_dfii_pi3_wrdata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_wrdata0_r;
reg           csrbank2_dfii_pi3_wrdata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_wrdata0_w;
reg           csrbank2_dfii_pi3_rddata1_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_rddata1_r;
reg           csrbank2_dfii_pi3_rddata1_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_rddata1_w;
reg           csrbank2_dfii_pi3_rddata0_re = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_rddata0_r;
reg           csrbank2_dfii_pi3_rddata0_we = 1'd0;
wire   [31:0] csrbank2_dfii_pi3_rddata0_w;
wire          csrbank2_sel;
wire   [13:0] csr_interconnect_adr;
wire          csr_interconnect_we;
wire   [31:0] csr_interconnect_dat_w;
wire   [31:0] csr_interconnect_dat_r;
wire          litedramcore_reset0;
wire          litedramcore_reset1;
wire          litedramcore_reset2;
wire          litedramcore_reset3;
wire          litedramcore_reset4;
wire          litedramcore_reset5;
wire          litedramcore_reset6;
wire          litedramcore_reset7;
wire          litedramcore_pll_fb;
reg     [1:0] litedramcore_refresher_state = 2'd0;
reg     [1:0] litedramcore_refresher_next_state = 2'd0;
reg     [3:0] litedramcore_bankmachine0_state = 4'd0;
reg     [3:0] litedramcore_bankmachine0_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine1_state = 4'd0;
reg     [3:0] litedramcore_bankmachine1_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine2_state = 4'd0;
reg     [3:0] litedramcore_bankmachine2_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine3_state = 4'd0;
reg     [3:0] litedramcore_bankmachine3_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine4_state = 4'd0;
reg     [3:0] litedramcore_bankmachine4_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine5_state = 4'd0;
reg     [3:0] litedramcore_bankmachine5_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine6_state = 4'd0;
reg     [3:0] litedramcore_bankmachine6_next_state = 4'd0;
reg     [3:0] litedramcore_bankmachine7_state = 4'd0;
reg     [3:0] litedramcore_bankmachine7_next_state = 4'd0;
reg     [3:0] litedramcore_multiplexer_state = 4'd0;
reg     [3:0] litedramcore_multiplexer_next_state = 4'd0;
wire          litedramcore_roundrobin0_request;
wire          litedramcore_roundrobin0_grant;
wire          litedramcore_roundrobin0_ce;
wire          litedramcore_roundrobin1_request;
wire          litedramcore_roundrobin1_grant;
wire          litedramcore_roundrobin1_ce;
wire          litedramcore_roundrobin2_request;
wire          litedramcore_roundrobin2_grant;
wire          litedramcore_roundrobin2_ce;
wire          litedramcore_roundrobin3_request;
wire          litedramcore_roundrobin3_grant;
wire          litedramcore_roundrobin3_ce;
wire          litedramcore_roundrobin4_request;
wire          litedramcore_roundrobin4_grant;
wire          litedramcore_roundrobin4_ce;
wire          litedramcore_roundrobin5_request;
wire          litedramcore_roundrobin5_grant;
wire          litedramcore_roundrobin5_ce;
wire          litedramcore_roundrobin6_request;
wire          litedramcore_roundrobin6_grant;
wire          litedramcore_roundrobin6_ce;
wire          litedramcore_roundrobin7_request;
wire          litedramcore_roundrobin7_grant;
wire          litedramcore_roundrobin7_ce;
reg           litedramcore_locked0 = 1'd0;
reg           litedramcore_locked1 = 1'd0;
reg           litedramcore_locked2 = 1'd0;
reg           litedramcore_locked3 = 1'd0;
reg           litedramcore_locked4 = 1'd0;
reg           litedramcore_locked5 = 1'd0;
reg           litedramcore_locked6 = 1'd0;
reg           litedramcore_locked7 = 1'd0;
reg           litedramcore_new_master_wdata_ready0 = 1'd0;
reg           litedramcore_new_master_wdata_ready1 = 1'd0;
reg           litedramcore_new_master_rdata_valid0 = 1'd0;
reg           litedramcore_new_master_rdata_valid1 = 1'd0;
reg           litedramcore_new_master_rdata_valid2 = 1'd0;
reg           litedramcore_new_master_rdata_valid3 = 1'd0;
reg           litedramcore_new_master_rdata_valid4 = 1'd0;
reg           litedramcore_new_master_rdata_valid5 = 1'd0;
reg           litedramcore_new_master_rdata_valid6 = 1'd0;
reg           litedramcore_new_master_rdata_valid7 = 1'd0;
reg           litedramcore_new_master_rdata_valid8 = 1'd0;
reg     [1:0] litedramcore_state = 2'd0;
reg     [1:0] litedramcore_next_state = 2'd0;
reg    [31:0] litedramcore_dat_w_next_value0 = 32'd0;
reg           litedramcore_dat_w_next_value_ce0 = 1'd0;
reg    [13:0] litedramcore_adr_next_value1 = 14'd0;
reg           litedramcore_adr_next_value_ce1 = 1'd0;
reg           litedramcore_we_next_value2 = 1'd0;
reg           litedramcore_we_next_value_ce2 = 1'd0;
reg           rhs_array_muxed0 = 1'd0;
reg    [14:0] rhs_array_muxed1 = 15'd0;
reg     [2:0] rhs_array_muxed2 = 3'd0;
reg           rhs_array_muxed3 = 1'd0;
reg           rhs_array_muxed4 = 1'd0;
reg           rhs_array_muxed5 = 1'd0;
reg           t_array_muxed0 = 1'd0;
reg           t_array_muxed1 = 1'd0;
reg           t_array_muxed2 = 1'd0;
reg           rhs_array_muxed6 = 1'd0;
reg    [14:0] rhs_array_muxed7 = 15'd0;
reg     [2:0] rhs_array_muxed8 = 3'd0;
reg           rhs_array_muxed9 = 1'd0;
reg           rhs_array_muxed10 = 1'd0;
reg           rhs_array_muxed11 = 1'd0;
reg           t_array_muxed3 = 1'd0;
reg           t_array_muxed4 = 1'd0;
reg           t_array_muxed5 = 1'd0;
reg    [21:0] rhs_array_muxed12 = 22'd0;
reg           rhs_array_muxed13 = 1'd0;
reg           rhs_array_muxed14 = 1'd0;
reg    [21:0] rhs_array_muxed15 = 22'd0;
reg           rhs_array_muxed16 = 1'd0;
reg           rhs_array_muxed17 = 1'd0;
reg    [21:0] rhs_array_muxed18 = 22'd0;
reg           rhs_array_muxed19 = 1'd0;
reg           rhs_array_muxed20 = 1'd0;
reg    [21:0] rhs_array_muxed21 = 22'd0;
reg           rhs_array_muxed22 = 1'd0;
reg           rhs_array_muxed23 = 1'd0;
reg    [21:0] rhs_array_muxed24 = 22'd0;
reg           rhs_array_muxed25 = 1'd0;
reg           rhs_array_muxed26 = 1'd0;
reg    [21:0] rhs_array_muxed27 = 22'd0;
reg           rhs_array_muxed28 = 1'd0;
reg           rhs_array_muxed29 = 1'd0;
reg    [21:0] rhs_array_muxed30 = 22'd0;
reg           rhs_array_muxed31 = 1'd0;
reg           rhs_array_muxed32 = 1'd0;
reg    [21:0] rhs_array_muxed33 = 22'd0;
reg           rhs_array_muxed34 = 1'd0;
reg           rhs_array_muxed35 = 1'd0;
reg     [2:0] array_muxed0 = 3'd0;
reg    [14:0] array_muxed1 = 15'd0;
reg           array_muxed2 = 1'd0;
reg           array_muxed3 = 1'd0;
reg           array_muxed4 = 1'd0;
reg           array_muxed5 = 1'd0;
reg           array_muxed6 = 1'd0;
reg     [2:0] array_muxed7 = 3'd0;
reg    [14:0] array_muxed8 = 15'd0;
reg           array_muxed9 = 1'd0;
reg           array_muxed10 = 1'd0;
reg           array_muxed11 = 1'd0;
reg           array_muxed12 = 1'd0;
reg           array_muxed13 = 1'd0;
reg     [2:0] array_muxed14 = 3'd0;
reg    [14:0] array_muxed15 = 15'd0;
reg           array_muxed16 = 1'd0;
reg           array_muxed17 = 1'd0;
reg           array_muxed18 = 1'd0;
reg           array_muxed19 = 1'd0;
reg           array_muxed20 = 1'd0;
reg     [2:0] array_muxed21 = 3'd0;
reg    [14:0] array_muxed22 = 15'd0;
reg           array_muxed23 = 1'd0;
reg           array_muxed24 = 1'd0;
reg           array_muxed25 = 1'd0;
reg           array_muxed26 = 1'd0;
reg           array_muxed27 = 1'd0;
wire          xilinxasyncresetsynchronizerimpl0;
wire          xilinxasyncresetsynchronizerimpl0_rst_meta;
wire          xilinxasyncresetsynchronizerimpl1;
wire          xilinxasyncresetsynchronizerimpl1_rst_meta;
wire          xilinxasyncresetsynchronizerimpl2;
wire          xilinxasyncresetsynchronizerimpl2_rst_meta;
wire          xilinxasyncresetsynchronizerimpl2_expr;
wire          xilinxasyncresetsynchronizerimpl3;
wire          xilinxasyncresetsynchronizerimpl3_rst_meta;
wire          xilinxasyncresetsynchronizerimpl3_expr;

//------------------------------------------------------------------------------
// Combinatorial Logic
//------------------------------------------------------------------------------

assign init_done = init_done_storage;
assign init_error = init_error_storage;
assign wb_bus_adr = wb_ctrl_adr;
assign wb_bus_dat_w = wb_ctrl_dat_w;
assign wb_ctrl_dat_r = wb_bus_dat_r;
assign wb_bus_sel = wb_ctrl_sel;
assign wb_bus_cyc = wb_ctrl_cyc;
assign wb_bus_stb = wb_ctrl_stb;
assign wb_ctrl_ack = wb_bus_ack;
assign wb_bus_we = wb_ctrl_we;
assign wb_bus_cti = wb_ctrl_cti;
assign wb_bus_bte = wb_ctrl_bte;
assign wb_ctrl_err = wb_bus_err;
assign user_clk = sys_clk;
assign user_rst = sys_rst;
assign user_enable = 1'd1;
assign user_port_cmd_valid = (user_port_native_0_cmd_valid & user_enable);
assign user_port_native_0_cmd_ready = (user_port_cmd_ready & user_enable);
assign user_port_cmd_payload_we = user_port_native_0_cmd_we;
assign user_port_cmd_payload_addr = user_port_native_0_cmd_addr;
assign user_port_wdata_valid = (user_port_native_0_wdata_valid & user_enable);
assign user_port_native_0_wdata_ready = (user_port_wdata_ready & user_enable);
assign user_port_wdata_payload_we = user_port_native_0_wdata_we;
assign user_port_wdata_payload_data = user_port_native_0_wdata_data;
assign user_port_native_0_rdata_valid = (user_port_rdata_valid & user_enable);
assign user_port_rdata_ready = (user_port_native_0_rdata_ready & user_enable);
assign user_port_native_0_rdata_data = user_port_rdata_payload_data;
assign reset = (rst | rst_1);
assign pll_locked = locked;
assign clkin = clk;
assign iodelay_clk = clkout_buf0;
assign sys_clk = clkout_buf1;
assign sys4x_clk = clkout_buf2;
assign sys4x_dqs_clk = clkout_buf3;
assign ddram_ba = k7ddrphy_pads_ba;
assign k7ddrphy_dqs_oe_delay_tappeddelayline = ((k7ddrphy_dqs_preamble | k7ddrphy_dqs_oe) | k7ddrphy_dqs_postamble);
assign k7ddrphy_dq_oe_delay_tappeddelayline = ((k7ddrphy_dqs_preamble | k7ddrphy_dq_oe) | k7ddrphy_dqs_postamble);
always @(*) begin
    k7ddrphy_dfi_p0_rddata <= 64'd0;
    k7ddrphy_dfi_p0_rddata[0] <= k7ddrphy_bitslip04[0];
    k7ddrphy_dfi_p0_rddata[32] <= k7ddrphy_bitslip04[1];
    k7ddrphy_dfi_p0_rddata[1] <= k7ddrphy_bitslip14[0];
    k7ddrphy_dfi_p0_rddata[33] <= k7ddrphy_bitslip14[1];
    k7ddrphy_dfi_p0_rddata[2] <= k7ddrphy_bitslip24[0];
    k7ddrphy_dfi_p0_rddata[34] <= k7ddrphy_bitslip24[1];
    k7ddrphy_dfi_p0_rddata[3] <= k7ddrphy_bitslip34[0];
    k7ddrphy_dfi_p0_rddata[35] <= k7ddrphy_bitslip34[1];
    k7ddrphy_dfi_p0_rddata[4] <= k7ddrphy_bitslip42[0];
    k7ddrphy_dfi_p0_rddata[36] <= k7ddrphy_bitslip42[1];
    k7ddrphy_dfi_p0_rddata[5] <= k7ddrphy_bitslip52[0];
    k7ddrphy_dfi_p0_rddata[37] <= k7ddrphy_bitslip52[1];
    k7ddrphy_dfi_p0_rddata[6] <= k7ddrphy_bitslip62[0];
    k7ddrphy_dfi_p0_rddata[38] <= k7ddrphy_bitslip62[1];
    k7ddrphy_dfi_p0_rddata[7] <= k7ddrphy_bitslip72[0];
    k7ddrphy_dfi_p0_rddata[39] <= k7ddrphy_bitslip72[1];
    k7ddrphy_dfi_p0_rddata[8] <= k7ddrphy_bitslip82[0];
    k7ddrphy_dfi_p0_rddata[40] <= k7ddrphy_bitslip82[1];
    k7ddrphy_dfi_p0_rddata[9] <= k7ddrphy_bitslip92[0];
    k7ddrphy_dfi_p0_rddata[41] <= k7ddrphy_bitslip92[1];
    k7ddrphy_dfi_p0_rddata[10] <= k7ddrphy_bitslip102[0];
    k7ddrphy_dfi_p0_rddata[42] <= k7ddrphy_bitslip102[1];
    k7ddrphy_dfi_p0_rddata[11] <= k7ddrphy_bitslip112[0];
    k7ddrphy_dfi_p0_rddata[43] <= k7ddrphy_bitslip112[1];
    k7ddrphy_dfi_p0_rddata[12] <= k7ddrphy_bitslip122[0];
    k7ddrphy_dfi_p0_rddata[44] <= k7ddrphy_bitslip122[1];
    k7ddrphy_dfi_p0_rddata[13] <= k7ddrphy_bitslip132[0];
    k7ddrphy_dfi_p0_rddata[45] <= k7ddrphy_bitslip132[1];
    k7ddrphy_dfi_p0_rddata[14] <= k7ddrphy_bitslip142[0];
    k7ddrphy_dfi_p0_rddata[46] <= k7ddrphy_bitslip142[1];
    k7ddrphy_dfi_p0_rddata[15] <= k7ddrphy_bitslip152[0];
    k7ddrphy_dfi_p0_rddata[47] <= k7ddrphy_bitslip152[1];
    k7ddrphy_dfi_p0_rddata[16] <= k7ddrphy_bitslip162[0];
    k7ddrphy_dfi_p0_rddata[48] <= k7ddrphy_bitslip162[1];
    k7ddrphy_dfi_p0_rddata[17] <= k7ddrphy_bitslip172[0];
    k7ddrphy_dfi_p0_rddata[49] <= k7ddrphy_bitslip172[1];
    k7ddrphy_dfi_p0_rddata[18] <= k7ddrphy_bitslip182[0];
    k7ddrphy_dfi_p0_rddata[50] <= k7ddrphy_bitslip182[1];
    k7ddrphy_dfi_p0_rddata[19] <= k7ddrphy_bitslip192[0];
    k7ddrphy_dfi_p0_rddata[51] <= k7ddrphy_bitslip192[1];
    k7ddrphy_dfi_p0_rddata[20] <= k7ddrphy_bitslip202[0];
    k7ddrphy_dfi_p0_rddata[52] <= k7ddrphy_bitslip202[1];
    k7ddrphy_dfi_p0_rddata[21] <= k7ddrphy_bitslip212[0];
    k7ddrphy_dfi_p0_rddata[53] <= k7ddrphy_bitslip212[1];
    k7ddrphy_dfi_p0_rddata[22] <= k7ddrphy_bitslip222[0];
    k7ddrphy_dfi_p0_rddata[54] <= k7ddrphy_bitslip222[1];
    k7ddrphy_dfi_p0_rddata[23] <= k7ddrphy_bitslip232[0];
    k7ddrphy_dfi_p0_rddata[55] <= k7ddrphy_bitslip232[1];
    k7ddrphy_dfi_p0_rddata[24] <= k7ddrphy_bitslip242[0];
    k7ddrphy_dfi_p0_rddata[56] <= k7ddrphy_bitslip242[1];
    k7ddrphy_dfi_p0_rddata[25] <= k7ddrphy_bitslip252[0];
    k7ddrphy_dfi_p0_rddata[57] <= k7ddrphy_bitslip252[1];
    k7ddrphy_dfi_p0_rddata[26] <= k7ddrphy_bitslip262[0];
    k7ddrphy_dfi_p0_rddata[58] <= k7ddrphy_bitslip262[1];
    k7ddrphy_dfi_p0_rddata[27] <= k7ddrphy_bitslip272[0];
    k7ddrphy_dfi_p0_rddata[59] <= k7ddrphy_bitslip272[1];
    k7ddrphy_dfi_p0_rddata[28] <= k7ddrphy_bitslip282[0];
    k7ddrphy_dfi_p0_rddata[60] <= k7ddrphy_bitslip282[1];
    k7ddrphy_dfi_p0_rddata[29] <= k7ddrphy_bitslip292[0];
    k7ddrphy_dfi_p0_rddata[61] <= k7ddrphy_bitslip292[1];
    k7ddrphy_dfi_p0_rddata[30] <= k7ddrphy_bitslip302[0];
    k7ddrphy_dfi_p0_rddata[62] <= k7ddrphy_bitslip302[1];
    k7ddrphy_dfi_p0_rddata[31] <= k7ddrphy_bitslip312[0];
    k7ddrphy_dfi_p0_rddata[63] <= k7ddrphy_bitslip312[1];
end
always @(*) begin
    k7ddrphy_dfi_p1_rddata <= 64'd0;
    k7ddrphy_dfi_p1_rddata[0] <= k7ddrphy_bitslip04[2];
    k7ddrphy_dfi_p1_rddata[32] <= k7ddrphy_bitslip04[3];
    k7ddrphy_dfi_p1_rddata[1] <= k7ddrphy_bitslip14[2];
    k7ddrphy_dfi_p1_rddata[33] <= k7ddrphy_bitslip14[3];
    k7ddrphy_dfi_p1_rddata[2] <= k7ddrphy_bitslip24[2];
    k7ddrphy_dfi_p1_rddata[34] <= k7ddrphy_bitslip24[3];
    k7ddrphy_dfi_p1_rddata[3] <= k7ddrphy_bitslip34[2];
    k7ddrphy_dfi_p1_rddata[35] <= k7ddrphy_bitslip34[3];
    k7ddrphy_dfi_p1_rddata[4] <= k7ddrphy_bitslip42[2];
    k7ddrphy_dfi_p1_rddata[36] <= k7ddrphy_bitslip42[3];
    k7ddrphy_dfi_p1_rddata[5] <= k7ddrphy_bitslip52[2];
    k7ddrphy_dfi_p1_rddata[37] <= k7ddrphy_bitslip52[3];
    k7ddrphy_dfi_p1_rddata[6] <= k7ddrphy_bitslip62[2];
    k7ddrphy_dfi_p1_rddata[38] <= k7ddrphy_bitslip62[3];
    k7ddrphy_dfi_p1_rddata[7] <= k7ddrphy_bitslip72[2];
    k7ddrphy_dfi_p1_rddata[39] <= k7ddrphy_bitslip72[3];
    k7ddrphy_dfi_p1_rddata[8] <= k7ddrphy_bitslip82[2];
    k7ddrphy_dfi_p1_rddata[40] <= k7ddrphy_bitslip82[3];
    k7ddrphy_dfi_p1_rddata[9] <= k7ddrphy_bitslip92[2];
    k7ddrphy_dfi_p1_rddata[41] <= k7ddrphy_bitslip92[3];
    k7ddrphy_dfi_p1_rddata[10] <= k7ddrphy_bitslip102[2];
    k7ddrphy_dfi_p1_rddata[42] <= k7ddrphy_bitslip102[3];
    k7ddrphy_dfi_p1_rddata[11] <= k7ddrphy_bitslip112[2];
    k7ddrphy_dfi_p1_rddata[43] <= k7ddrphy_bitslip112[3];
    k7ddrphy_dfi_p1_rddata[12] <= k7ddrphy_bitslip122[2];
    k7ddrphy_dfi_p1_rddata[44] <= k7ddrphy_bitslip122[3];
    k7ddrphy_dfi_p1_rddata[13] <= k7ddrphy_bitslip132[2];
    k7ddrphy_dfi_p1_rddata[45] <= k7ddrphy_bitslip132[3];
    k7ddrphy_dfi_p1_rddata[14] <= k7ddrphy_bitslip142[2];
    k7ddrphy_dfi_p1_rddata[46] <= k7ddrphy_bitslip142[3];
    k7ddrphy_dfi_p1_rddata[15] <= k7ddrphy_bitslip152[2];
    k7ddrphy_dfi_p1_rddata[47] <= k7ddrphy_bitslip152[3];
    k7ddrphy_dfi_p1_rddata[16] <= k7ddrphy_bitslip162[2];
    k7ddrphy_dfi_p1_rddata[48] <= k7ddrphy_bitslip162[3];
    k7ddrphy_dfi_p1_rddata[17] <= k7ddrphy_bitslip172[2];
    k7ddrphy_dfi_p1_rddata[49] <= k7ddrphy_bitslip172[3];
    k7ddrphy_dfi_p1_rddata[18] <= k7ddrphy_bitslip182[2];
    k7ddrphy_dfi_p1_rddata[50] <= k7ddrphy_bitslip182[3];
    k7ddrphy_dfi_p1_rddata[19] <= k7ddrphy_bitslip192[2];
    k7ddrphy_dfi_p1_rddata[51] <= k7ddrphy_bitslip192[3];
    k7ddrphy_dfi_p1_rddata[20] <= k7ddrphy_bitslip202[2];
    k7ddrphy_dfi_p1_rddata[52] <= k7ddrphy_bitslip202[3];
    k7ddrphy_dfi_p1_rddata[21] <= k7ddrphy_bitslip212[2];
    k7ddrphy_dfi_p1_rddata[53] <= k7ddrphy_bitslip212[3];
    k7ddrphy_dfi_p1_rddata[22] <= k7ddrphy_bitslip222[2];
    k7ddrphy_dfi_p1_rddata[54] <= k7ddrphy_bitslip222[3];
    k7ddrphy_dfi_p1_rddata[23] <= k7ddrphy_bitslip232[2];
    k7ddrphy_dfi_p1_rddata[55] <= k7ddrphy_bitslip232[3];
    k7ddrphy_dfi_p1_rddata[24] <= k7ddrphy_bitslip242[2];
    k7ddrphy_dfi_p1_rddata[56] <= k7ddrphy_bitslip242[3];
    k7ddrphy_dfi_p1_rddata[25] <= k7ddrphy_bitslip252[2];
    k7ddrphy_dfi_p1_rddata[57] <= k7ddrphy_bitslip252[3];
    k7ddrphy_dfi_p1_rddata[26] <= k7ddrphy_bitslip262[2];
    k7ddrphy_dfi_p1_rddata[58] <= k7ddrphy_bitslip262[3];
    k7ddrphy_dfi_p1_rddata[27] <= k7ddrphy_bitslip272[2];
    k7ddrphy_dfi_p1_rddata[59] <= k7ddrphy_bitslip272[3];
    k7ddrphy_dfi_p1_rddata[28] <= k7ddrphy_bitslip282[2];
    k7ddrphy_dfi_p1_rddata[60] <= k7ddrphy_bitslip282[3];
    k7ddrphy_dfi_p1_rddata[29] <= k7ddrphy_bitslip292[2];
    k7ddrphy_dfi_p1_rddata[61] <= k7ddrphy_bitslip292[3];
    k7ddrphy_dfi_p1_rddata[30] <= k7ddrphy_bitslip302[2];
    k7ddrphy_dfi_p1_rddata[62] <= k7ddrphy_bitslip302[3];
    k7ddrphy_dfi_p1_rddata[31] <= k7ddrphy_bitslip312[2];
    k7ddrphy_dfi_p1_rddata[63] <= k7ddrphy_bitslip312[3];
end
always @(*) begin
    k7ddrphy_dfi_p2_rddata <= 64'd0;
    k7ddrphy_dfi_p2_rddata[0] <= k7ddrphy_bitslip04[4];
    k7ddrphy_dfi_p2_rddata[32] <= k7ddrphy_bitslip04[5];
    k7ddrphy_dfi_p2_rddata[1] <= k7ddrphy_bitslip14[4];
    k7ddrphy_dfi_p2_rddata[33] <= k7ddrphy_bitslip14[5];
    k7ddrphy_dfi_p2_rddata[2] <= k7ddrphy_bitslip24[4];
    k7ddrphy_dfi_p2_rddata[34] <= k7ddrphy_bitslip24[5];
    k7ddrphy_dfi_p2_rddata[3] <= k7ddrphy_bitslip34[4];
    k7ddrphy_dfi_p2_rddata[35] <= k7ddrphy_bitslip34[5];
    k7ddrphy_dfi_p2_rddata[4] <= k7ddrphy_bitslip42[4];
    k7ddrphy_dfi_p2_rddata[36] <= k7ddrphy_bitslip42[5];
    k7ddrphy_dfi_p2_rddata[5] <= k7ddrphy_bitslip52[4];
    k7ddrphy_dfi_p2_rddata[37] <= k7ddrphy_bitslip52[5];
    k7ddrphy_dfi_p2_rddata[6] <= k7ddrphy_bitslip62[4];
    k7ddrphy_dfi_p2_rddata[38] <= k7ddrphy_bitslip62[5];
    k7ddrphy_dfi_p2_rddata[7] <= k7ddrphy_bitslip72[4];
    k7ddrphy_dfi_p2_rddata[39] <= k7ddrphy_bitslip72[5];
    k7ddrphy_dfi_p2_rddata[8] <= k7ddrphy_bitslip82[4];
    k7ddrphy_dfi_p2_rddata[40] <= k7ddrphy_bitslip82[5];
    k7ddrphy_dfi_p2_rddata[9] <= k7ddrphy_bitslip92[4];
    k7ddrphy_dfi_p2_rddata[41] <= k7ddrphy_bitslip92[5];
    k7ddrphy_dfi_p2_rddata[10] <= k7ddrphy_bitslip102[4];
    k7ddrphy_dfi_p2_rddata[42] <= k7ddrphy_bitslip102[5];
    k7ddrphy_dfi_p2_rddata[11] <= k7ddrphy_bitslip112[4];
    k7ddrphy_dfi_p2_rddata[43] <= k7ddrphy_bitslip112[5];
    k7ddrphy_dfi_p2_rddata[12] <= k7ddrphy_bitslip122[4];
    k7ddrphy_dfi_p2_rddata[44] <= k7ddrphy_bitslip122[5];
    k7ddrphy_dfi_p2_rddata[13] <= k7ddrphy_bitslip132[4];
    k7ddrphy_dfi_p2_rddata[45] <= k7ddrphy_bitslip132[5];
    k7ddrphy_dfi_p2_rddata[14] <= k7ddrphy_bitslip142[4];
    k7ddrphy_dfi_p2_rddata[46] <= k7ddrphy_bitslip142[5];
    k7ddrphy_dfi_p2_rddata[15] <= k7ddrphy_bitslip152[4];
    k7ddrphy_dfi_p2_rddata[47] <= k7ddrphy_bitslip152[5];
    k7ddrphy_dfi_p2_rddata[16] <= k7ddrphy_bitslip162[4];
    k7ddrphy_dfi_p2_rddata[48] <= k7ddrphy_bitslip162[5];
    k7ddrphy_dfi_p2_rddata[17] <= k7ddrphy_bitslip172[4];
    k7ddrphy_dfi_p2_rddata[49] <= k7ddrphy_bitslip172[5];
    k7ddrphy_dfi_p2_rddata[18] <= k7ddrphy_bitslip182[4];
    k7ddrphy_dfi_p2_rddata[50] <= k7ddrphy_bitslip182[5];
    k7ddrphy_dfi_p2_rddata[19] <= k7ddrphy_bitslip192[4];
    k7ddrphy_dfi_p2_rddata[51] <= k7ddrphy_bitslip192[5];
    k7ddrphy_dfi_p2_rddata[20] <= k7ddrphy_bitslip202[4];
    k7ddrphy_dfi_p2_rddata[52] <= k7ddrphy_bitslip202[5];
    k7ddrphy_dfi_p2_rddata[21] <= k7ddrphy_bitslip212[4];
    k7ddrphy_dfi_p2_rddata[53] <= k7ddrphy_bitslip212[5];
    k7ddrphy_dfi_p2_rddata[22] <= k7ddrphy_bitslip222[4];
    k7ddrphy_dfi_p2_rddata[54] <= k7ddrphy_bitslip222[5];
    k7ddrphy_dfi_p2_rddata[23] <= k7ddrphy_bitslip232[4];
    k7ddrphy_dfi_p2_rddata[55] <= k7ddrphy_bitslip232[5];
    k7ddrphy_dfi_p2_rddata[24] <= k7ddrphy_bitslip242[4];
    k7ddrphy_dfi_p2_rddata[56] <= k7ddrphy_bitslip242[5];
    k7ddrphy_dfi_p2_rddata[25] <= k7ddrphy_bitslip252[4];
    k7ddrphy_dfi_p2_rddata[57] <= k7ddrphy_bitslip252[5];
    k7ddrphy_dfi_p2_rddata[26] <= k7ddrphy_bitslip262[4];
    k7ddrphy_dfi_p2_rddata[58] <= k7ddrphy_bitslip262[5];
    k7ddrphy_dfi_p2_rddata[27] <= k7ddrphy_bitslip272[4];
    k7ddrphy_dfi_p2_rddata[59] <= k7ddrphy_bitslip272[5];
    k7ddrphy_dfi_p2_rddata[28] <= k7ddrphy_bitslip282[4];
    k7ddrphy_dfi_p2_rddata[60] <= k7ddrphy_bitslip282[5];
    k7ddrphy_dfi_p2_rddata[29] <= k7ddrphy_bitslip292[4];
    k7ddrphy_dfi_p2_rddata[61] <= k7ddrphy_bitslip292[5];
    k7ddrphy_dfi_p2_rddata[30] <= k7ddrphy_bitslip302[4];
    k7ddrphy_dfi_p2_rddata[62] <= k7ddrphy_bitslip302[5];
    k7ddrphy_dfi_p2_rddata[31] <= k7ddrphy_bitslip312[4];
    k7ddrphy_dfi_p2_rddata[63] <= k7ddrphy_bitslip312[5];
end
always @(*) begin
    k7ddrphy_dfi_p3_rddata <= 64'd0;
    k7ddrphy_dfi_p3_rddata[0] <= k7ddrphy_bitslip04[6];
    k7ddrphy_dfi_p3_rddata[32] <= k7ddrphy_bitslip04[7];
    k7ddrphy_dfi_p3_rddata[1] <= k7ddrphy_bitslip14[6];
    k7ddrphy_dfi_p3_rddata[33] <= k7ddrphy_bitslip14[7];
    k7ddrphy_dfi_p3_rddata[2] <= k7ddrphy_bitslip24[6];
    k7ddrphy_dfi_p3_rddata[34] <= k7ddrphy_bitslip24[7];
    k7ddrphy_dfi_p3_rddata[3] <= k7ddrphy_bitslip34[6];
    k7ddrphy_dfi_p3_rddata[35] <= k7ddrphy_bitslip34[7];
    k7ddrphy_dfi_p3_rddata[4] <= k7ddrphy_bitslip42[6];
    k7ddrphy_dfi_p3_rddata[36] <= k7ddrphy_bitslip42[7];
    k7ddrphy_dfi_p3_rddata[5] <= k7ddrphy_bitslip52[6];
    k7ddrphy_dfi_p3_rddata[37] <= k7ddrphy_bitslip52[7];
    k7ddrphy_dfi_p3_rddata[6] <= k7ddrphy_bitslip62[6];
    k7ddrphy_dfi_p3_rddata[38] <= k7ddrphy_bitslip62[7];
    k7ddrphy_dfi_p3_rddata[7] <= k7ddrphy_bitslip72[6];
    k7ddrphy_dfi_p3_rddata[39] <= k7ddrphy_bitslip72[7];
    k7ddrphy_dfi_p3_rddata[8] <= k7ddrphy_bitslip82[6];
    k7ddrphy_dfi_p3_rddata[40] <= k7ddrphy_bitslip82[7];
    k7ddrphy_dfi_p3_rddata[9] <= k7ddrphy_bitslip92[6];
    k7ddrphy_dfi_p3_rddata[41] <= k7ddrphy_bitslip92[7];
    k7ddrphy_dfi_p3_rddata[10] <= k7ddrphy_bitslip102[6];
    k7ddrphy_dfi_p3_rddata[42] <= k7ddrphy_bitslip102[7];
    k7ddrphy_dfi_p3_rddata[11] <= k7ddrphy_bitslip112[6];
    k7ddrphy_dfi_p3_rddata[43] <= k7ddrphy_bitslip112[7];
    k7ddrphy_dfi_p3_rddata[12] <= k7ddrphy_bitslip122[6];
    k7ddrphy_dfi_p3_rddata[44] <= k7ddrphy_bitslip122[7];
    k7ddrphy_dfi_p3_rddata[13] <= k7ddrphy_bitslip132[6];
    k7ddrphy_dfi_p3_rddata[45] <= k7ddrphy_bitslip132[7];
    k7ddrphy_dfi_p3_rddata[14] <= k7ddrphy_bitslip142[6];
    k7ddrphy_dfi_p3_rddata[46] <= k7ddrphy_bitslip142[7];
    k7ddrphy_dfi_p3_rddata[15] <= k7ddrphy_bitslip152[6];
    k7ddrphy_dfi_p3_rddata[47] <= k7ddrphy_bitslip152[7];
    k7ddrphy_dfi_p3_rddata[16] <= k7ddrphy_bitslip162[6];
    k7ddrphy_dfi_p3_rddata[48] <= k7ddrphy_bitslip162[7];
    k7ddrphy_dfi_p3_rddata[17] <= k7ddrphy_bitslip172[6];
    k7ddrphy_dfi_p3_rddata[49] <= k7ddrphy_bitslip172[7];
    k7ddrphy_dfi_p3_rddata[18] <= k7ddrphy_bitslip182[6];
    k7ddrphy_dfi_p3_rddata[50] <= k7ddrphy_bitslip182[7];
    k7ddrphy_dfi_p3_rddata[19] <= k7ddrphy_bitslip192[6];
    k7ddrphy_dfi_p3_rddata[51] <= k7ddrphy_bitslip192[7];
    k7ddrphy_dfi_p3_rddata[20] <= k7ddrphy_bitslip202[6];
    k7ddrphy_dfi_p3_rddata[52] <= k7ddrphy_bitslip202[7];
    k7ddrphy_dfi_p3_rddata[21] <= k7ddrphy_bitslip212[6];
    k7ddrphy_dfi_p3_rddata[53] <= k7ddrphy_bitslip212[7];
    k7ddrphy_dfi_p3_rddata[22] <= k7ddrphy_bitslip222[6];
    k7ddrphy_dfi_p3_rddata[54] <= k7ddrphy_bitslip222[7];
    k7ddrphy_dfi_p3_rddata[23] <= k7ddrphy_bitslip232[6];
    k7ddrphy_dfi_p3_rddata[55] <= k7ddrphy_bitslip232[7];
    k7ddrphy_dfi_p3_rddata[24] <= k7ddrphy_bitslip242[6];
    k7ddrphy_dfi_p3_rddata[56] <= k7ddrphy_bitslip242[7];
    k7ddrphy_dfi_p3_rddata[25] <= k7ddrphy_bitslip252[6];
    k7ddrphy_dfi_p3_rddata[57] <= k7ddrphy_bitslip252[7];
    k7ddrphy_dfi_p3_rddata[26] <= k7ddrphy_bitslip262[6];
    k7ddrphy_dfi_p3_rddata[58] <= k7ddrphy_bitslip262[7];
    k7ddrphy_dfi_p3_rddata[27] <= k7ddrphy_bitslip272[6];
    k7ddrphy_dfi_p3_rddata[59] <= k7ddrphy_bitslip272[7];
    k7ddrphy_dfi_p3_rddata[28] <= k7ddrphy_bitslip282[6];
    k7ddrphy_dfi_p3_rddata[60] <= k7ddrphy_bitslip282[7];
    k7ddrphy_dfi_p3_rddata[29] <= k7ddrphy_bitslip292[6];
    k7ddrphy_dfi_p3_rddata[61] <= k7ddrphy_bitslip292[7];
    k7ddrphy_dfi_p3_rddata[30] <= k7ddrphy_bitslip302[6];
    k7ddrphy_dfi_p3_rddata[62] <= k7ddrphy_bitslip302[7];
    k7ddrphy_dfi_p3_rddata[31] <= k7ddrphy_bitslip312[6];
    k7ddrphy_dfi_p3_rddata[63] <= k7ddrphy_bitslip312[7];
end
assign k7ddrphy_dfi_p0_rddata_valid = (k7ddrphy_rddata_en_tappeddelayline7 | k7ddrphy_wlevel_en_storage);
assign k7ddrphy_dfi_p1_rddata_valid = (k7ddrphy_rddata_en_tappeddelayline7 | k7ddrphy_wlevel_en_storage);
assign k7ddrphy_dfi_p2_rddata_valid = (k7ddrphy_rddata_en_tappeddelayline7 | k7ddrphy_wlevel_en_storage);
assign k7ddrphy_dfi_p3_rddata_valid = (k7ddrphy_rddata_en_tappeddelayline7 | k7ddrphy_wlevel_en_storage);
assign k7ddrphy_dq_oe = k7ddrphy_wrdata_en_tappeddelayline1;
always @(*) begin
    k7ddrphy_dqs_oe <= 1'd0;
    if (k7ddrphy_wlevel_en_storage) begin
        k7ddrphy_dqs_oe <= 1'd1;
    end else begin
        k7ddrphy_dqs_oe <= k7ddrphy_dq_oe;
    end
end
assign k7ddrphy_dqs_preamble = (k7ddrphy_wrdata_en_tappeddelayline0 & (~k7ddrphy_wrdata_en_tappeddelayline1));
assign k7ddrphy_dqs_postamble = (k7ddrphy_wrdata_en_tappeddelayline2 & (~k7ddrphy_wrdata_en_tappeddelayline1));
always @(*) begin
    k7ddrphy_dqspattern_o <= 8'd0;
    k7ddrphy_dqspattern_o <= 7'd85;
    if (k7ddrphy_dqspattern0) begin
        k7ddrphy_dqspattern_o <= 5'd21;
    end
    if (k7ddrphy_dqspattern1) begin
        k7ddrphy_dqspattern_o <= 7'd84;
    end
    if (k7ddrphy_wlevel_en_storage) begin
        k7ddrphy_dqspattern_o <= 1'd0;
        if (k7ddrphy_wlevel_strobe_re) begin
            k7ddrphy_dqspattern_o <= 1'd1;
        end
    end
end
always @(*) begin
    k7ddrphy_bitslip00 <= 8'd0;
    case (k7ddrphy_bitslip0_value0)
        1'd0: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip00 <= k7ddrphy_bitslip0_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip10 <= 8'd0;
    case (k7ddrphy_bitslip1_value0)
        1'd0: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip10 <= k7ddrphy_bitslip1_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip20 <= 8'd0;
    case (k7ddrphy_bitslip2_value0)
        1'd0: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip20 <= k7ddrphy_bitslip2_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip30 <= 8'd0;
    case (k7ddrphy_bitslip3_value0)
        1'd0: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip30 <= k7ddrphy_bitslip3_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip01 <= 8'd0;
    case (k7ddrphy_bitslip0_value1)
        1'd0: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip01 <= k7ddrphy_bitslip0_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip11 <= 8'd0;
    case (k7ddrphy_bitslip1_value1)
        1'd0: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip11 <= k7ddrphy_bitslip1_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip21 <= 8'd0;
    case (k7ddrphy_bitslip2_value1)
        1'd0: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip21 <= k7ddrphy_bitslip2_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip31 <= 8'd0;
    case (k7ddrphy_bitslip3_value1)
        1'd0: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip31 <= k7ddrphy_bitslip3_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip02 <= 8'd0;
    case (k7ddrphy_bitslip0_value2)
        1'd0: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip02 <= k7ddrphy_bitslip0_r2[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip04 <= 8'd0;
    case (k7ddrphy_bitslip0_value3)
        1'd0: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip04 <= k7ddrphy_bitslip0_r3[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip12 <= 8'd0;
    case (k7ddrphy_bitslip1_value2)
        1'd0: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip12 <= k7ddrphy_bitslip1_r2[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip14 <= 8'd0;
    case (k7ddrphy_bitslip1_value3)
        1'd0: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip14 <= k7ddrphy_bitslip1_r3[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip22 <= 8'd0;
    case (k7ddrphy_bitslip2_value2)
        1'd0: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip22 <= k7ddrphy_bitslip2_r2[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip24 <= 8'd0;
    case (k7ddrphy_bitslip2_value3)
        1'd0: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip24 <= k7ddrphy_bitslip2_r3[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip32 <= 8'd0;
    case (k7ddrphy_bitslip3_value2)
        1'd0: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip32 <= k7ddrphy_bitslip3_r2[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip34 <= 8'd0;
    case (k7ddrphy_bitslip3_value3)
        1'd0: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip34 <= k7ddrphy_bitslip3_r3[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip40 <= 8'd0;
    case (k7ddrphy_bitslip4_value0)
        1'd0: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip40 <= k7ddrphy_bitslip4_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip42 <= 8'd0;
    case (k7ddrphy_bitslip4_value1)
        1'd0: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip42 <= k7ddrphy_bitslip4_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip50 <= 8'd0;
    case (k7ddrphy_bitslip5_value0)
        1'd0: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip50 <= k7ddrphy_bitslip5_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip52 <= 8'd0;
    case (k7ddrphy_bitslip5_value1)
        1'd0: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip52 <= k7ddrphy_bitslip5_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip60 <= 8'd0;
    case (k7ddrphy_bitslip6_value0)
        1'd0: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip60 <= k7ddrphy_bitslip6_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip62 <= 8'd0;
    case (k7ddrphy_bitslip6_value1)
        1'd0: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip62 <= k7ddrphy_bitslip6_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip70 <= 8'd0;
    case (k7ddrphy_bitslip7_value0)
        1'd0: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip70 <= k7ddrphy_bitslip7_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip72 <= 8'd0;
    case (k7ddrphy_bitslip7_value1)
        1'd0: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip72 <= k7ddrphy_bitslip7_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip80 <= 8'd0;
    case (k7ddrphy_bitslip8_value0)
        1'd0: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip80 <= k7ddrphy_bitslip8_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip82 <= 8'd0;
    case (k7ddrphy_bitslip8_value1)
        1'd0: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip82 <= k7ddrphy_bitslip8_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip90 <= 8'd0;
    case (k7ddrphy_bitslip9_value0)
        1'd0: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip90 <= k7ddrphy_bitslip9_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip92 <= 8'd0;
    case (k7ddrphy_bitslip9_value1)
        1'd0: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip92 <= k7ddrphy_bitslip9_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip100 <= 8'd0;
    case (k7ddrphy_bitslip10_value0)
        1'd0: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip100 <= k7ddrphy_bitslip10_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip102 <= 8'd0;
    case (k7ddrphy_bitslip10_value1)
        1'd0: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip102 <= k7ddrphy_bitslip10_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip110 <= 8'd0;
    case (k7ddrphy_bitslip11_value0)
        1'd0: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip110 <= k7ddrphy_bitslip11_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip112 <= 8'd0;
    case (k7ddrphy_bitslip11_value1)
        1'd0: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip112 <= k7ddrphy_bitslip11_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip120 <= 8'd0;
    case (k7ddrphy_bitslip12_value0)
        1'd0: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip120 <= k7ddrphy_bitslip12_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip122 <= 8'd0;
    case (k7ddrphy_bitslip12_value1)
        1'd0: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip122 <= k7ddrphy_bitslip12_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip130 <= 8'd0;
    case (k7ddrphy_bitslip13_value0)
        1'd0: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip130 <= k7ddrphy_bitslip13_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip132 <= 8'd0;
    case (k7ddrphy_bitslip13_value1)
        1'd0: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip132 <= k7ddrphy_bitslip13_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip140 <= 8'd0;
    case (k7ddrphy_bitslip14_value0)
        1'd0: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip140 <= k7ddrphy_bitslip14_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip142 <= 8'd0;
    case (k7ddrphy_bitslip14_value1)
        1'd0: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip142 <= k7ddrphy_bitslip14_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip150 <= 8'd0;
    case (k7ddrphy_bitslip15_value0)
        1'd0: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip150 <= k7ddrphy_bitslip15_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip152 <= 8'd0;
    case (k7ddrphy_bitslip15_value1)
        1'd0: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip152 <= k7ddrphy_bitslip15_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip160 <= 8'd0;
    case (k7ddrphy_bitslip16_value0)
        1'd0: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip160 <= k7ddrphy_bitslip16_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip162 <= 8'd0;
    case (k7ddrphy_bitslip16_value1)
        1'd0: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip162 <= k7ddrphy_bitslip16_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip170 <= 8'd0;
    case (k7ddrphy_bitslip17_value0)
        1'd0: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip170 <= k7ddrphy_bitslip17_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip172 <= 8'd0;
    case (k7ddrphy_bitslip17_value1)
        1'd0: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip172 <= k7ddrphy_bitslip17_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip180 <= 8'd0;
    case (k7ddrphy_bitslip18_value0)
        1'd0: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip180 <= k7ddrphy_bitslip18_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip182 <= 8'd0;
    case (k7ddrphy_bitslip18_value1)
        1'd0: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip182 <= k7ddrphy_bitslip18_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip190 <= 8'd0;
    case (k7ddrphy_bitslip19_value0)
        1'd0: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip190 <= k7ddrphy_bitslip19_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip192 <= 8'd0;
    case (k7ddrphy_bitslip19_value1)
        1'd0: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip192 <= k7ddrphy_bitslip19_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip200 <= 8'd0;
    case (k7ddrphy_bitslip20_value0)
        1'd0: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip200 <= k7ddrphy_bitslip20_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip202 <= 8'd0;
    case (k7ddrphy_bitslip20_value1)
        1'd0: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip202 <= k7ddrphy_bitslip20_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip210 <= 8'd0;
    case (k7ddrphy_bitslip21_value0)
        1'd0: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip210 <= k7ddrphy_bitslip21_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip212 <= 8'd0;
    case (k7ddrphy_bitslip21_value1)
        1'd0: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip212 <= k7ddrphy_bitslip21_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip220 <= 8'd0;
    case (k7ddrphy_bitslip22_value0)
        1'd0: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip220 <= k7ddrphy_bitslip22_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip222 <= 8'd0;
    case (k7ddrphy_bitslip22_value1)
        1'd0: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip222 <= k7ddrphy_bitslip22_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip230 <= 8'd0;
    case (k7ddrphy_bitslip23_value0)
        1'd0: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip230 <= k7ddrphy_bitslip23_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip232 <= 8'd0;
    case (k7ddrphy_bitslip23_value1)
        1'd0: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip232 <= k7ddrphy_bitslip23_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip240 <= 8'd0;
    case (k7ddrphy_bitslip24_value0)
        1'd0: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip240 <= k7ddrphy_bitslip24_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip242 <= 8'd0;
    case (k7ddrphy_bitslip24_value1)
        1'd0: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip242 <= k7ddrphy_bitslip24_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip250 <= 8'd0;
    case (k7ddrphy_bitslip25_value0)
        1'd0: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip250 <= k7ddrphy_bitslip25_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip252 <= 8'd0;
    case (k7ddrphy_bitslip25_value1)
        1'd0: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip252 <= k7ddrphy_bitslip25_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip260 <= 8'd0;
    case (k7ddrphy_bitslip26_value0)
        1'd0: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip260 <= k7ddrphy_bitslip26_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip262 <= 8'd0;
    case (k7ddrphy_bitslip26_value1)
        1'd0: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip262 <= k7ddrphy_bitslip26_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip270 <= 8'd0;
    case (k7ddrphy_bitslip27_value0)
        1'd0: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip270 <= k7ddrphy_bitslip27_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip272 <= 8'd0;
    case (k7ddrphy_bitslip27_value1)
        1'd0: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip272 <= k7ddrphy_bitslip27_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip280 <= 8'd0;
    case (k7ddrphy_bitslip28_value0)
        1'd0: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip280 <= k7ddrphy_bitslip28_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip282 <= 8'd0;
    case (k7ddrphy_bitslip28_value1)
        1'd0: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip282 <= k7ddrphy_bitslip28_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip290 <= 8'd0;
    case (k7ddrphy_bitslip29_value0)
        1'd0: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip290 <= k7ddrphy_bitslip29_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip292 <= 8'd0;
    case (k7ddrphy_bitslip29_value1)
        1'd0: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip292 <= k7ddrphy_bitslip29_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip300 <= 8'd0;
    case (k7ddrphy_bitslip30_value0)
        1'd0: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip300 <= k7ddrphy_bitslip30_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip302 <= 8'd0;
    case (k7ddrphy_bitslip30_value1)
        1'd0: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip302 <= k7ddrphy_bitslip30_r1[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip310 <= 8'd0;
    case (k7ddrphy_bitslip31_value0)
        1'd0: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip310 <= k7ddrphy_bitslip31_r0[15:8];
        end
    endcase
end
always @(*) begin
    k7ddrphy_bitslip312 <= 8'd0;
    case (k7ddrphy_bitslip31_value1)
        1'd0: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[8:1];
        end
        1'd1: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[9:2];
        end
        2'd2: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[10:3];
        end
        2'd3: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[11:4];
        end
        3'd4: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[12:5];
        end
        3'd5: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[13:6];
        end
        3'd6: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[14:7];
        end
        3'd7: begin
            k7ddrphy_bitslip312 <= k7ddrphy_bitslip31_r1[15:8];
        end
    endcase
end
assign k7ddrphy_dfi_p0_address = litedramcore_master_p0_address;
assign k7ddrphy_dfi_p0_bank = litedramcore_master_p0_bank;
assign k7ddrphy_dfi_p0_cas_n = litedramcore_master_p0_cas_n;
assign k7ddrphy_dfi_p0_cs_n = litedramcore_master_p0_cs_n;
assign k7ddrphy_dfi_p0_ras_n = litedramcore_master_p0_ras_n;
assign k7ddrphy_dfi_p0_we_n = litedramcore_master_p0_we_n;
assign k7ddrphy_dfi_p0_cke = litedramcore_master_p0_cke;
assign k7ddrphy_dfi_p0_odt = litedramcore_master_p0_odt;
assign k7ddrphy_dfi_p0_reset_n = litedramcore_master_p0_reset_n;
assign k7ddrphy_dfi_p0_act_n = litedramcore_master_p0_act_n;
assign k7ddrphy_dfi_p0_wrdata = litedramcore_master_p0_wrdata;
assign k7ddrphy_dfi_p0_wrdata_en = litedramcore_master_p0_wrdata_en;
assign k7ddrphy_dfi_p0_wrdata_mask = litedramcore_master_p0_wrdata_mask;
assign k7ddrphy_dfi_p0_rddata_en = litedramcore_master_p0_rddata_en;
assign litedramcore_master_p0_rddata = k7ddrphy_dfi_p0_rddata;
assign litedramcore_master_p0_rddata_valid = k7ddrphy_dfi_p0_rddata_valid;
assign k7ddrphy_dfi_p1_address = litedramcore_master_p1_address;
assign k7ddrphy_dfi_p1_bank = litedramcore_master_p1_bank;
assign k7ddrphy_dfi_p1_cas_n = litedramcore_master_p1_cas_n;
assign k7ddrphy_dfi_p1_cs_n = litedramcore_master_p1_cs_n;
assign k7ddrphy_dfi_p1_ras_n = litedramcore_master_p1_ras_n;
assign k7ddrphy_dfi_p1_we_n = litedramcore_master_p1_we_n;
assign k7ddrphy_dfi_p1_cke = litedramcore_master_p1_cke;
assign k7ddrphy_dfi_p1_odt = litedramcore_master_p1_odt;
assign k7ddrphy_dfi_p1_reset_n = litedramcore_master_p1_reset_n;
assign k7ddrphy_dfi_p1_act_n = litedramcore_master_p1_act_n;
assign k7ddrphy_dfi_p1_wrdata = litedramcore_master_p1_wrdata;
assign k7ddrphy_dfi_p1_wrdata_en = litedramcore_master_p1_wrdata_en;
assign k7ddrphy_dfi_p1_wrdata_mask = litedramcore_master_p1_wrdata_mask;
assign k7ddrphy_dfi_p1_rddata_en = litedramcore_master_p1_rddata_en;
assign litedramcore_master_p1_rddata = k7ddrphy_dfi_p1_rddata;
assign litedramcore_master_p1_rddata_valid = k7ddrphy_dfi_p1_rddata_valid;
assign k7ddrphy_dfi_p2_address = litedramcore_master_p2_address;
assign k7ddrphy_dfi_p2_bank = litedramcore_master_p2_bank;
assign k7ddrphy_dfi_p2_cas_n = litedramcore_master_p2_cas_n;
assign k7ddrphy_dfi_p2_cs_n = litedramcore_master_p2_cs_n;
assign k7ddrphy_dfi_p2_ras_n = litedramcore_master_p2_ras_n;
assign k7ddrphy_dfi_p2_we_n = litedramcore_master_p2_we_n;
assign k7ddrphy_dfi_p2_cke = litedramcore_master_p2_cke;
assign k7ddrphy_dfi_p2_odt = litedramcore_master_p2_odt;
assign k7ddrphy_dfi_p2_reset_n = litedramcore_master_p2_reset_n;
assign k7ddrphy_dfi_p2_act_n = litedramcore_master_p2_act_n;
assign k7ddrphy_dfi_p2_wrdata = litedramcore_master_p2_wrdata;
assign k7ddrphy_dfi_p2_wrdata_en = litedramcore_master_p2_wrdata_en;
assign k7ddrphy_dfi_p2_wrdata_mask = litedramcore_master_p2_wrdata_mask;
assign k7ddrphy_dfi_p2_rddata_en = litedramcore_master_p2_rddata_en;
assign litedramcore_master_p2_rddata = k7ddrphy_dfi_p2_rddata;
assign litedramcore_master_p2_rddata_valid = k7ddrphy_dfi_p2_rddata_valid;
assign k7ddrphy_dfi_p3_address = litedramcore_master_p3_address;
assign k7ddrphy_dfi_p3_bank = litedramcore_master_p3_bank;
assign k7ddrphy_dfi_p3_cas_n = litedramcore_master_p3_cas_n;
assign k7ddrphy_dfi_p3_cs_n = litedramcore_master_p3_cs_n;
assign k7ddrphy_dfi_p3_ras_n = litedramcore_master_p3_ras_n;
assign k7ddrphy_dfi_p3_we_n = litedramcore_master_p3_we_n;
assign k7ddrphy_dfi_p3_cke = litedramcore_master_p3_cke;
assign k7ddrphy_dfi_p3_odt = litedramcore_master_p3_odt;
assign k7ddrphy_dfi_p3_reset_n = litedramcore_master_p3_reset_n;
assign k7ddrphy_dfi_p3_act_n = litedramcore_master_p3_act_n;
assign k7ddrphy_dfi_p3_wrdata = litedramcore_master_p3_wrdata;
assign k7ddrphy_dfi_p3_wrdata_en = litedramcore_master_p3_wrdata_en;
assign k7ddrphy_dfi_p3_wrdata_mask = litedramcore_master_p3_wrdata_mask;
assign k7ddrphy_dfi_p3_rddata_en = litedramcore_master_p3_rddata_en;
assign litedramcore_master_p3_rddata = k7ddrphy_dfi_p3_rddata;
assign litedramcore_master_p3_rddata_valid = k7ddrphy_dfi_p3_rddata_valid;
assign litedramcore_slave_p0_address = litedramcore_dfi_p0_address;
assign litedramcore_slave_p0_bank = litedramcore_dfi_p0_bank;
assign litedramcore_slave_p0_cas_n = litedramcore_dfi_p0_cas_n;
assign litedramcore_slave_p0_cs_n = litedramcore_dfi_p0_cs_n;
assign litedramcore_slave_p0_ras_n = litedramcore_dfi_p0_ras_n;
assign litedramcore_slave_p0_we_n = litedramcore_dfi_p0_we_n;
assign litedramcore_slave_p0_cke = litedramcore_dfi_p0_cke;
assign litedramcore_slave_p0_odt = litedramcore_dfi_p0_odt;
assign litedramcore_slave_p0_reset_n = litedramcore_dfi_p0_reset_n;
assign litedramcore_slave_p0_act_n = litedramcore_dfi_p0_act_n;
assign litedramcore_slave_p0_wrdata = litedramcore_dfi_p0_wrdata;
assign litedramcore_slave_p0_wrdata_en = litedramcore_dfi_p0_wrdata_en;
assign litedramcore_slave_p0_wrdata_mask = litedramcore_dfi_p0_wrdata_mask;
assign litedramcore_slave_p0_rddata_en = litedramcore_dfi_p0_rddata_en;
assign litedramcore_dfi_p0_rddata = litedramcore_slave_p0_rddata;
assign litedramcore_dfi_p0_rddata_valid = litedramcore_slave_p0_rddata_valid;
assign litedramcore_slave_p1_address = litedramcore_dfi_p1_address;
assign litedramcore_slave_p1_bank = litedramcore_dfi_p1_bank;
assign litedramcore_slave_p1_cas_n = litedramcore_dfi_p1_cas_n;
assign litedramcore_slave_p1_cs_n = litedramcore_dfi_p1_cs_n;
assign litedramcore_slave_p1_ras_n = litedramcore_dfi_p1_ras_n;
assign litedramcore_slave_p1_we_n = litedramcore_dfi_p1_we_n;
assign litedramcore_slave_p1_cke = litedramcore_dfi_p1_cke;
assign litedramcore_slave_p1_odt = litedramcore_dfi_p1_odt;
assign litedramcore_slave_p1_reset_n = litedramcore_dfi_p1_reset_n;
assign litedramcore_slave_p1_act_n = litedramcore_dfi_p1_act_n;
assign litedramcore_slave_p1_wrdata = litedramcore_dfi_p1_wrdata;
assign litedramcore_slave_p1_wrdata_en = litedramcore_dfi_p1_wrdata_en;
assign litedramcore_slave_p1_wrdata_mask = litedramcore_dfi_p1_wrdata_mask;
assign litedramcore_slave_p1_rddata_en = litedramcore_dfi_p1_rddata_en;
assign litedramcore_dfi_p1_rddata = litedramcore_slave_p1_rddata;
assign litedramcore_dfi_p1_rddata_valid = litedramcore_slave_p1_rddata_valid;
assign litedramcore_slave_p2_address = litedramcore_dfi_p2_address;
assign litedramcore_slave_p2_bank = litedramcore_dfi_p2_bank;
assign litedramcore_slave_p2_cas_n = litedramcore_dfi_p2_cas_n;
assign litedramcore_slave_p2_cs_n = litedramcore_dfi_p2_cs_n;
assign litedramcore_slave_p2_ras_n = litedramcore_dfi_p2_ras_n;
assign litedramcore_slave_p2_we_n = litedramcore_dfi_p2_we_n;
assign litedramcore_slave_p2_cke = litedramcore_dfi_p2_cke;
assign litedramcore_slave_p2_odt = litedramcore_dfi_p2_odt;
assign litedramcore_slave_p2_reset_n = litedramcore_dfi_p2_reset_n;
assign litedramcore_slave_p2_act_n = litedramcore_dfi_p2_act_n;
assign litedramcore_slave_p2_wrdata = litedramcore_dfi_p2_wrdata;
assign litedramcore_slave_p2_wrdata_en = litedramcore_dfi_p2_wrdata_en;
assign litedramcore_slave_p2_wrdata_mask = litedramcore_dfi_p2_wrdata_mask;
assign litedramcore_slave_p2_rddata_en = litedramcore_dfi_p2_rddata_en;
assign litedramcore_dfi_p2_rddata = litedramcore_slave_p2_rddata;
assign litedramcore_dfi_p2_rddata_valid = litedramcore_slave_p2_rddata_valid;
assign litedramcore_slave_p3_address = litedramcore_dfi_p3_address;
assign litedramcore_slave_p3_bank = litedramcore_dfi_p3_bank;
assign litedramcore_slave_p3_cas_n = litedramcore_dfi_p3_cas_n;
assign litedramcore_slave_p3_cs_n = litedramcore_dfi_p3_cs_n;
assign litedramcore_slave_p3_ras_n = litedramcore_dfi_p3_ras_n;
assign litedramcore_slave_p3_we_n = litedramcore_dfi_p3_we_n;
assign litedramcore_slave_p3_cke = litedramcore_dfi_p3_cke;
assign litedramcore_slave_p3_odt = litedramcore_dfi_p3_odt;
assign litedramcore_slave_p3_reset_n = litedramcore_dfi_p3_reset_n;
assign litedramcore_slave_p3_act_n = litedramcore_dfi_p3_act_n;
assign litedramcore_slave_p3_wrdata = litedramcore_dfi_p3_wrdata;
assign litedramcore_slave_p3_wrdata_en = litedramcore_dfi_p3_wrdata_en;
assign litedramcore_slave_p3_wrdata_mask = litedramcore_dfi_p3_wrdata_mask;
assign litedramcore_slave_p3_rddata_en = litedramcore_dfi_p3_rddata_en;
assign litedramcore_dfi_p3_rddata = litedramcore_slave_p3_rddata;
assign litedramcore_dfi_p3_rddata_valid = litedramcore_slave_p3_rddata_valid;
always @(*) begin
    litedramcore_csr_dfi_p0_rddata <= 64'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p0_rddata <= litedramcore_master_p0_rddata;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p0_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p0_rddata_valid <= litedramcore_master_p0_rddata_valid;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p1_rddata <= 64'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p1_rddata <= litedramcore_master_p1_rddata;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p1_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p1_rddata_valid <= litedramcore_master_p1_rddata_valid;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p2_rddata <= 64'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p2_rddata <= litedramcore_master_p2_rddata;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p2_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p2_rddata_valid <= litedramcore_master_p2_rddata_valid;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p3_rddata <= 64'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p3_rddata <= litedramcore_master_p3_rddata;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p3_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
    end else begin
        litedramcore_csr_dfi_p3_rddata_valid <= litedramcore_master_p3_rddata_valid;
    end
end
always @(*) begin
    litedramcore_ext_dfi_p0_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p0_rddata <= litedramcore_master_p0_rddata;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p0_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p0_rddata_valid <= litedramcore_master_p0_rddata_valid;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p1_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p1_rddata <= litedramcore_master_p1_rddata;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p1_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p1_rddata_valid <= litedramcore_master_p1_rddata_valid;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p2_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p2_rddata <= litedramcore_master_p2_rddata;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p2_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p2_rddata_valid <= litedramcore_master_p2_rddata_valid;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p0_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p0_rddata <= litedramcore_master_p0_rddata;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p0_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p0_rddata_valid <= litedramcore_master_p0_rddata_valid;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p3_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p3_rddata <= litedramcore_master_p3_rddata;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_ext_dfi_p3_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_ext_dfi_p3_rddata_valid <= litedramcore_master_p3_rddata_valid;
        end else begin
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p1_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p1_rddata <= litedramcore_master_p1_rddata;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p1_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p1_rddata_valid <= litedramcore_master_p1_rddata_valid;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p2_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p2_rddata <= litedramcore_master_p2_rddata;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p2_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p2_rddata_valid <= litedramcore_master_p2_rddata_valid;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p3_rddata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p3_rddata <= litedramcore_master_p3_rddata;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_slave_p3_rddata_valid <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
        end else begin
            litedramcore_slave_p3_rddata_valid <= litedramcore_master_p3_rddata_valid;
        end
    end else begin
    end
end
always @(*) begin
    litedramcore_master_p0_address <= 15'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_address <= litedramcore_ext_dfi_p0_address;
        end else begin
            litedramcore_master_p0_address <= litedramcore_slave_p0_address;
        end
    end else begin
        litedramcore_master_p0_address <= litedramcore_csr_dfi_p0_address;
    end
end
always @(*) begin
    litedramcore_master_p0_bank <= 3'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_bank <= litedramcore_ext_dfi_p0_bank;
        end else begin
            litedramcore_master_p0_bank <= litedramcore_slave_p0_bank;
        end
    end else begin
        litedramcore_master_p0_bank <= litedramcore_csr_dfi_p0_bank;
    end
end
always @(*) begin
    litedramcore_master_p0_cas_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_cas_n <= litedramcore_ext_dfi_p0_cas_n;
        end else begin
            litedramcore_master_p0_cas_n <= litedramcore_slave_p0_cas_n;
        end
    end else begin
        litedramcore_master_p0_cas_n <= litedramcore_csr_dfi_p0_cas_n;
    end
end
always @(*) begin
    litedramcore_master_p0_cs_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_cs_n <= litedramcore_ext_dfi_p0_cs_n;
        end else begin
            litedramcore_master_p0_cs_n <= litedramcore_slave_p0_cs_n;
        end
    end else begin
        litedramcore_master_p0_cs_n <= litedramcore_csr_dfi_p0_cs_n;
    end
end
always @(*) begin
    litedramcore_master_p0_ras_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_ras_n <= litedramcore_ext_dfi_p0_ras_n;
        end else begin
            litedramcore_master_p0_ras_n <= litedramcore_slave_p0_ras_n;
        end
    end else begin
        litedramcore_master_p0_ras_n <= litedramcore_csr_dfi_p0_ras_n;
    end
end
always @(*) begin
    litedramcore_master_p0_we_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_we_n <= litedramcore_ext_dfi_p0_we_n;
        end else begin
            litedramcore_master_p0_we_n <= litedramcore_slave_p0_we_n;
        end
    end else begin
        litedramcore_master_p0_we_n <= litedramcore_csr_dfi_p0_we_n;
    end
end
always @(*) begin
    litedramcore_master_p0_cke <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_cke <= litedramcore_ext_dfi_p0_cke;
        end else begin
            litedramcore_master_p0_cke <= litedramcore_slave_p0_cke;
        end
    end else begin
        litedramcore_master_p0_cke <= litedramcore_csr_dfi_p0_cke;
    end
end
always @(*) begin
    litedramcore_master_p0_odt <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_odt <= litedramcore_ext_dfi_p0_odt;
        end else begin
            litedramcore_master_p0_odt <= litedramcore_slave_p0_odt;
        end
    end else begin
        litedramcore_master_p0_odt <= litedramcore_csr_dfi_p0_odt;
    end
end
always @(*) begin
    litedramcore_master_p0_reset_n <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_reset_n <= litedramcore_ext_dfi_p0_reset_n;
        end else begin
            litedramcore_master_p0_reset_n <= litedramcore_slave_p0_reset_n;
        end
    end else begin
        litedramcore_master_p0_reset_n <= litedramcore_csr_dfi_p0_reset_n;
    end
end
always @(*) begin
    litedramcore_master_p0_act_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_act_n <= litedramcore_ext_dfi_p0_act_n;
        end else begin
            litedramcore_master_p0_act_n <= litedramcore_slave_p0_act_n;
        end
    end else begin
        litedramcore_master_p0_act_n <= litedramcore_csr_dfi_p0_act_n;
    end
end
always @(*) begin
    litedramcore_master_p0_wrdata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_wrdata <= litedramcore_ext_dfi_p0_wrdata;
        end else begin
            litedramcore_master_p0_wrdata <= litedramcore_slave_p0_wrdata;
        end
    end else begin
        litedramcore_master_p0_wrdata <= litedramcore_csr_dfi_p0_wrdata;
    end
end
always @(*) begin
    litedramcore_master_p0_wrdata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_wrdata_en <= litedramcore_ext_dfi_p0_wrdata_en;
        end else begin
            litedramcore_master_p0_wrdata_en <= litedramcore_slave_p0_wrdata_en;
        end
    end else begin
        litedramcore_master_p0_wrdata_en <= litedramcore_csr_dfi_p0_wrdata_en;
    end
end
always @(*) begin
    litedramcore_master_p0_wrdata_mask <= 8'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_wrdata_mask <= litedramcore_ext_dfi_p0_wrdata_mask;
        end else begin
            litedramcore_master_p0_wrdata_mask <= litedramcore_slave_p0_wrdata_mask;
        end
    end else begin
        litedramcore_master_p0_wrdata_mask <= litedramcore_csr_dfi_p0_wrdata_mask;
    end
end
always @(*) begin
    litedramcore_master_p0_rddata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p0_rddata_en <= litedramcore_ext_dfi_p0_rddata_en;
        end else begin
            litedramcore_master_p0_rddata_en <= litedramcore_slave_p0_rddata_en;
        end
    end else begin
        litedramcore_master_p0_rddata_en <= litedramcore_csr_dfi_p0_rddata_en;
    end
end
always @(*) begin
    litedramcore_master_p1_address <= 15'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_address <= litedramcore_ext_dfi_p1_address;
        end else begin
            litedramcore_master_p1_address <= litedramcore_slave_p1_address;
        end
    end else begin
        litedramcore_master_p1_address <= litedramcore_csr_dfi_p1_address;
    end
end
always @(*) begin
    litedramcore_master_p1_bank <= 3'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_bank <= litedramcore_ext_dfi_p1_bank;
        end else begin
            litedramcore_master_p1_bank <= litedramcore_slave_p1_bank;
        end
    end else begin
        litedramcore_master_p1_bank <= litedramcore_csr_dfi_p1_bank;
    end
end
always @(*) begin
    litedramcore_master_p1_cas_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_cas_n <= litedramcore_ext_dfi_p1_cas_n;
        end else begin
            litedramcore_master_p1_cas_n <= litedramcore_slave_p1_cas_n;
        end
    end else begin
        litedramcore_master_p1_cas_n <= litedramcore_csr_dfi_p1_cas_n;
    end
end
always @(*) begin
    litedramcore_master_p1_cs_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_cs_n <= litedramcore_ext_dfi_p1_cs_n;
        end else begin
            litedramcore_master_p1_cs_n <= litedramcore_slave_p1_cs_n;
        end
    end else begin
        litedramcore_master_p1_cs_n <= litedramcore_csr_dfi_p1_cs_n;
    end
end
always @(*) begin
    litedramcore_master_p1_ras_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_ras_n <= litedramcore_ext_dfi_p1_ras_n;
        end else begin
            litedramcore_master_p1_ras_n <= litedramcore_slave_p1_ras_n;
        end
    end else begin
        litedramcore_master_p1_ras_n <= litedramcore_csr_dfi_p1_ras_n;
    end
end
always @(*) begin
    litedramcore_master_p1_we_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_we_n <= litedramcore_ext_dfi_p1_we_n;
        end else begin
            litedramcore_master_p1_we_n <= litedramcore_slave_p1_we_n;
        end
    end else begin
        litedramcore_master_p1_we_n <= litedramcore_csr_dfi_p1_we_n;
    end
end
always @(*) begin
    litedramcore_master_p1_cke <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_cke <= litedramcore_ext_dfi_p1_cke;
        end else begin
            litedramcore_master_p1_cke <= litedramcore_slave_p1_cke;
        end
    end else begin
        litedramcore_master_p1_cke <= litedramcore_csr_dfi_p1_cke;
    end
end
always @(*) begin
    litedramcore_master_p1_odt <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_odt <= litedramcore_ext_dfi_p1_odt;
        end else begin
            litedramcore_master_p1_odt <= litedramcore_slave_p1_odt;
        end
    end else begin
        litedramcore_master_p1_odt <= litedramcore_csr_dfi_p1_odt;
    end
end
always @(*) begin
    litedramcore_master_p1_reset_n <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_reset_n <= litedramcore_ext_dfi_p1_reset_n;
        end else begin
            litedramcore_master_p1_reset_n <= litedramcore_slave_p1_reset_n;
        end
    end else begin
        litedramcore_master_p1_reset_n <= litedramcore_csr_dfi_p1_reset_n;
    end
end
always @(*) begin
    litedramcore_master_p1_act_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_act_n <= litedramcore_ext_dfi_p1_act_n;
        end else begin
            litedramcore_master_p1_act_n <= litedramcore_slave_p1_act_n;
        end
    end else begin
        litedramcore_master_p1_act_n <= litedramcore_csr_dfi_p1_act_n;
    end
end
always @(*) begin
    litedramcore_master_p1_wrdata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_wrdata <= litedramcore_ext_dfi_p1_wrdata;
        end else begin
            litedramcore_master_p1_wrdata <= litedramcore_slave_p1_wrdata;
        end
    end else begin
        litedramcore_master_p1_wrdata <= litedramcore_csr_dfi_p1_wrdata;
    end
end
always @(*) begin
    litedramcore_master_p1_wrdata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_wrdata_en <= litedramcore_ext_dfi_p1_wrdata_en;
        end else begin
            litedramcore_master_p1_wrdata_en <= litedramcore_slave_p1_wrdata_en;
        end
    end else begin
        litedramcore_master_p1_wrdata_en <= litedramcore_csr_dfi_p1_wrdata_en;
    end
end
always @(*) begin
    litedramcore_master_p1_wrdata_mask <= 8'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_wrdata_mask <= litedramcore_ext_dfi_p1_wrdata_mask;
        end else begin
            litedramcore_master_p1_wrdata_mask <= litedramcore_slave_p1_wrdata_mask;
        end
    end else begin
        litedramcore_master_p1_wrdata_mask <= litedramcore_csr_dfi_p1_wrdata_mask;
    end
end
always @(*) begin
    litedramcore_master_p1_rddata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p1_rddata_en <= litedramcore_ext_dfi_p1_rddata_en;
        end else begin
            litedramcore_master_p1_rddata_en <= litedramcore_slave_p1_rddata_en;
        end
    end else begin
        litedramcore_master_p1_rddata_en <= litedramcore_csr_dfi_p1_rddata_en;
    end
end
always @(*) begin
    litedramcore_master_p2_address <= 15'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_address <= litedramcore_ext_dfi_p2_address;
        end else begin
            litedramcore_master_p2_address <= litedramcore_slave_p2_address;
        end
    end else begin
        litedramcore_master_p2_address <= litedramcore_csr_dfi_p2_address;
    end
end
always @(*) begin
    litedramcore_master_p2_bank <= 3'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_bank <= litedramcore_ext_dfi_p2_bank;
        end else begin
            litedramcore_master_p2_bank <= litedramcore_slave_p2_bank;
        end
    end else begin
        litedramcore_master_p2_bank <= litedramcore_csr_dfi_p2_bank;
    end
end
always @(*) begin
    litedramcore_master_p2_cas_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_cas_n <= litedramcore_ext_dfi_p2_cas_n;
        end else begin
            litedramcore_master_p2_cas_n <= litedramcore_slave_p2_cas_n;
        end
    end else begin
        litedramcore_master_p2_cas_n <= litedramcore_csr_dfi_p2_cas_n;
    end
end
always @(*) begin
    litedramcore_master_p2_cs_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_cs_n <= litedramcore_ext_dfi_p2_cs_n;
        end else begin
            litedramcore_master_p2_cs_n <= litedramcore_slave_p2_cs_n;
        end
    end else begin
        litedramcore_master_p2_cs_n <= litedramcore_csr_dfi_p2_cs_n;
    end
end
always @(*) begin
    litedramcore_master_p2_ras_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_ras_n <= litedramcore_ext_dfi_p2_ras_n;
        end else begin
            litedramcore_master_p2_ras_n <= litedramcore_slave_p2_ras_n;
        end
    end else begin
        litedramcore_master_p2_ras_n <= litedramcore_csr_dfi_p2_ras_n;
    end
end
always @(*) begin
    litedramcore_master_p2_we_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_we_n <= litedramcore_ext_dfi_p2_we_n;
        end else begin
            litedramcore_master_p2_we_n <= litedramcore_slave_p2_we_n;
        end
    end else begin
        litedramcore_master_p2_we_n <= litedramcore_csr_dfi_p2_we_n;
    end
end
always @(*) begin
    litedramcore_master_p2_cke <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_cke <= litedramcore_ext_dfi_p2_cke;
        end else begin
            litedramcore_master_p2_cke <= litedramcore_slave_p2_cke;
        end
    end else begin
        litedramcore_master_p2_cke <= litedramcore_csr_dfi_p2_cke;
    end
end
always @(*) begin
    litedramcore_master_p2_odt <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_odt <= litedramcore_ext_dfi_p2_odt;
        end else begin
            litedramcore_master_p2_odt <= litedramcore_slave_p2_odt;
        end
    end else begin
        litedramcore_master_p2_odt <= litedramcore_csr_dfi_p2_odt;
    end
end
always @(*) begin
    litedramcore_master_p2_reset_n <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_reset_n <= litedramcore_ext_dfi_p2_reset_n;
        end else begin
            litedramcore_master_p2_reset_n <= litedramcore_slave_p2_reset_n;
        end
    end else begin
        litedramcore_master_p2_reset_n <= litedramcore_csr_dfi_p2_reset_n;
    end
end
always @(*) begin
    litedramcore_master_p2_act_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_act_n <= litedramcore_ext_dfi_p2_act_n;
        end else begin
            litedramcore_master_p2_act_n <= litedramcore_slave_p2_act_n;
        end
    end else begin
        litedramcore_master_p2_act_n <= litedramcore_csr_dfi_p2_act_n;
    end
end
always @(*) begin
    litedramcore_master_p2_wrdata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_wrdata <= litedramcore_ext_dfi_p2_wrdata;
        end else begin
            litedramcore_master_p2_wrdata <= litedramcore_slave_p2_wrdata;
        end
    end else begin
        litedramcore_master_p2_wrdata <= litedramcore_csr_dfi_p2_wrdata;
    end
end
always @(*) begin
    litedramcore_master_p2_wrdata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_wrdata_en <= litedramcore_ext_dfi_p2_wrdata_en;
        end else begin
            litedramcore_master_p2_wrdata_en <= litedramcore_slave_p2_wrdata_en;
        end
    end else begin
        litedramcore_master_p2_wrdata_en <= litedramcore_csr_dfi_p2_wrdata_en;
    end
end
always @(*) begin
    litedramcore_master_p2_wrdata_mask <= 8'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_wrdata_mask <= litedramcore_ext_dfi_p2_wrdata_mask;
        end else begin
            litedramcore_master_p2_wrdata_mask <= litedramcore_slave_p2_wrdata_mask;
        end
    end else begin
        litedramcore_master_p2_wrdata_mask <= litedramcore_csr_dfi_p2_wrdata_mask;
    end
end
always @(*) begin
    litedramcore_master_p2_rddata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p2_rddata_en <= litedramcore_ext_dfi_p2_rddata_en;
        end else begin
            litedramcore_master_p2_rddata_en <= litedramcore_slave_p2_rddata_en;
        end
    end else begin
        litedramcore_master_p2_rddata_en <= litedramcore_csr_dfi_p2_rddata_en;
    end
end
always @(*) begin
    litedramcore_master_p3_address <= 15'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_address <= litedramcore_ext_dfi_p3_address;
        end else begin
            litedramcore_master_p3_address <= litedramcore_slave_p3_address;
        end
    end else begin
        litedramcore_master_p3_address <= litedramcore_csr_dfi_p3_address;
    end
end
always @(*) begin
    litedramcore_master_p3_bank <= 3'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_bank <= litedramcore_ext_dfi_p3_bank;
        end else begin
            litedramcore_master_p3_bank <= litedramcore_slave_p3_bank;
        end
    end else begin
        litedramcore_master_p3_bank <= litedramcore_csr_dfi_p3_bank;
    end
end
always @(*) begin
    litedramcore_master_p3_cas_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_cas_n <= litedramcore_ext_dfi_p3_cas_n;
        end else begin
            litedramcore_master_p3_cas_n <= litedramcore_slave_p3_cas_n;
        end
    end else begin
        litedramcore_master_p3_cas_n <= litedramcore_csr_dfi_p3_cas_n;
    end
end
always @(*) begin
    litedramcore_master_p3_cs_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_cs_n <= litedramcore_ext_dfi_p3_cs_n;
        end else begin
            litedramcore_master_p3_cs_n <= litedramcore_slave_p3_cs_n;
        end
    end else begin
        litedramcore_master_p3_cs_n <= litedramcore_csr_dfi_p3_cs_n;
    end
end
always @(*) begin
    litedramcore_master_p3_ras_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_ras_n <= litedramcore_ext_dfi_p3_ras_n;
        end else begin
            litedramcore_master_p3_ras_n <= litedramcore_slave_p3_ras_n;
        end
    end else begin
        litedramcore_master_p3_ras_n <= litedramcore_csr_dfi_p3_ras_n;
    end
end
always @(*) begin
    litedramcore_master_p3_we_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_we_n <= litedramcore_ext_dfi_p3_we_n;
        end else begin
            litedramcore_master_p3_we_n <= litedramcore_slave_p3_we_n;
        end
    end else begin
        litedramcore_master_p3_we_n <= litedramcore_csr_dfi_p3_we_n;
    end
end
always @(*) begin
    litedramcore_master_p3_cke <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_cke <= litedramcore_ext_dfi_p3_cke;
        end else begin
            litedramcore_master_p3_cke <= litedramcore_slave_p3_cke;
        end
    end else begin
        litedramcore_master_p3_cke <= litedramcore_csr_dfi_p3_cke;
    end
end
always @(*) begin
    litedramcore_master_p3_odt <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_odt <= litedramcore_ext_dfi_p3_odt;
        end else begin
            litedramcore_master_p3_odt <= litedramcore_slave_p3_odt;
        end
    end else begin
        litedramcore_master_p3_odt <= litedramcore_csr_dfi_p3_odt;
    end
end
always @(*) begin
    litedramcore_master_p3_reset_n <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_reset_n <= litedramcore_ext_dfi_p3_reset_n;
        end else begin
            litedramcore_master_p3_reset_n <= litedramcore_slave_p3_reset_n;
        end
    end else begin
        litedramcore_master_p3_reset_n <= litedramcore_csr_dfi_p3_reset_n;
    end
end
always @(*) begin
    litedramcore_master_p3_act_n <= 1'd1;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_act_n <= litedramcore_ext_dfi_p3_act_n;
        end else begin
            litedramcore_master_p3_act_n <= litedramcore_slave_p3_act_n;
        end
    end else begin
        litedramcore_master_p3_act_n <= litedramcore_csr_dfi_p3_act_n;
    end
end
always @(*) begin
    litedramcore_master_p3_wrdata <= 64'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_wrdata <= litedramcore_ext_dfi_p3_wrdata;
        end else begin
            litedramcore_master_p3_wrdata <= litedramcore_slave_p3_wrdata;
        end
    end else begin
        litedramcore_master_p3_wrdata <= litedramcore_csr_dfi_p3_wrdata;
    end
end
always @(*) begin
    litedramcore_master_p3_wrdata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_wrdata_en <= litedramcore_ext_dfi_p3_wrdata_en;
        end else begin
            litedramcore_master_p3_wrdata_en <= litedramcore_slave_p3_wrdata_en;
        end
    end else begin
        litedramcore_master_p3_wrdata_en <= litedramcore_csr_dfi_p3_wrdata_en;
    end
end
always @(*) begin
    litedramcore_master_p3_wrdata_mask <= 8'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_wrdata_mask <= litedramcore_ext_dfi_p3_wrdata_mask;
        end else begin
            litedramcore_master_p3_wrdata_mask <= litedramcore_slave_p3_wrdata_mask;
        end
    end else begin
        litedramcore_master_p3_wrdata_mask <= litedramcore_csr_dfi_p3_wrdata_mask;
    end
end
always @(*) begin
    litedramcore_master_p3_rddata_en <= 1'd0;
    if (litedramcore_sel) begin
        if (litedramcore_ext_dfi_sel) begin
            litedramcore_master_p3_rddata_en <= litedramcore_ext_dfi_p3_rddata_en;
        end else begin
            litedramcore_master_p3_rddata_en <= litedramcore_slave_p3_rddata_en;
        end
    end else begin
        litedramcore_master_p3_rddata_en <= litedramcore_csr_dfi_p3_rddata_en;
    end
end
assign litedramcore_csr_dfi_p0_cke = litedramcore_cke;
assign litedramcore_csr_dfi_p1_cke = litedramcore_cke;
assign litedramcore_csr_dfi_p2_cke = litedramcore_cke;
assign litedramcore_csr_dfi_p3_cke = litedramcore_cke;
assign litedramcore_csr_dfi_p0_odt = litedramcore_odt;
assign litedramcore_csr_dfi_p1_odt = litedramcore_odt;
assign litedramcore_csr_dfi_p2_odt = litedramcore_odt;
assign litedramcore_csr_dfi_p3_odt = litedramcore_odt;
assign litedramcore_csr_dfi_p0_reset_n = litedramcore_reset_n;
assign litedramcore_csr_dfi_p1_reset_n = litedramcore_reset_n;
assign litedramcore_csr_dfi_p2_reset_n = litedramcore_reset_n;
assign litedramcore_csr_dfi_p3_reset_n = litedramcore_reset_n;
always @(*) begin
    litedramcore_csr_dfi_p0_cs_n <= 1'd1;
    if (litedramcore_phaseinjector0_command_issue_re) begin
        litedramcore_csr_dfi_p0_cs_n <= {1{(~litedramcore_phaseinjector0_csrfield_cs)}};
    end else begin
        litedramcore_csr_dfi_p0_cs_n <= {1{1'd1}};
    end
end
always @(*) begin
    litedramcore_csr_dfi_p0_ras_n <= 1'd1;
    if (litedramcore_phaseinjector0_command_issue_re) begin
        litedramcore_csr_dfi_p0_ras_n <= (~litedramcore_phaseinjector0_csrfield_ras);
    end else begin
        litedramcore_csr_dfi_p0_ras_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p0_we_n <= 1'd1;
    if (litedramcore_phaseinjector0_command_issue_re) begin
        litedramcore_csr_dfi_p0_we_n <= (~litedramcore_phaseinjector0_csrfield_we);
    end else begin
        litedramcore_csr_dfi_p0_we_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p0_cas_n <= 1'd1;
    if (litedramcore_phaseinjector0_command_issue_re) begin
        litedramcore_csr_dfi_p0_cas_n <= (~litedramcore_phaseinjector0_csrfield_cas);
    end else begin
        litedramcore_csr_dfi_p0_cas_n <= 1'd1;
    end
end
assign litedramcore_csr_dfi_p0_address = litedramcore_phaseinjector0_address_storage;
assign litedramcore_csr_dfi_p0_bank = litedramcore_phaseinjector0_baddress_storage;
assign litedramcore_csr_dfi_p0_wrdata_en = (litedramcore_phaseinjector0_command_issue_re & litedramcore_phaseinjector0_csrfield_wren);
assign litedramcore_csr_dfi_p0_rddata_en = (litedramcore_phaseinjector0_command_issue_re & litedramcore_phaseinjector0_csrfield_rden);
assign litedramcore_csr_dfi_p0_wrdata = litedramcore_phaseinjector0_wrdata_storage;
assign litedramcore_csr_dfi_p0_wrdata_mask = 1'd0;
always @(*) begin
    litedramcore_csr_dfi_p1_cs_n <= 1'd1;
    if (litedramcore_phaseinjector1_command_issue_re) begin
        litedramcore_csr_dfi_p1_cs_n <= {1{(~litedramcore_phaseinjector1_csrfield_cs)}};
    end else begin
        litedramcore_csr_dfi_p1_cs_n <= {1{1'd1}};
    end
end
always @(*) begin
    litedramcore_csr_dfi_p1_ras_n <= 1'd1;
    if (litedramcore_phaseinjector1_command_issue_re) begin
        litedramcore_csr_dfi_p1_ras_n <= (~litedramcore_phaseinjector1_csrfield_ras);
    end else begin
        litedramcore_csr_dfi_p1_ras_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p1_we_n <= 1'd1;
    if (litedramcore_phaseinjector1_command_issue_re) begin
        litedramcore_csr_dfi_p1_we_n <= (~litedramcore_phaseinjector1_csrfield_we);
    end else begin
        litedramcore_csr_dfi_p1_we_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p1_cas_n <= 1'd1;
    if (litedramcore_phaseinjector1_command_issue_re) begin
        litedramcore_csr_dfi_p1_cas_n <= (~litedramcore_phaseinjector1_csrfield_cas);
    end else begin
        litedramcore_csr_dfi_p1_cas_n <= 1'd1;
    end
end
assign litedramcore_csr_dfi_p1_address = litedramcore_phaseinjector1_address_storage;
assign litedramcore_csr_dfi_p1_bank = litedramcore_phaseinjector1_baddress_storage;
assign litedramcore_csr_dfi_p1_wrdata_en = (litedramcore_phaseinjector1_command_issue_re & litedramcore_phaseinjector1_csrfield_wren);
assign litedramcore_csr_dfi_p1_rddata_en = (litedramcore_phaseinjector1_command_issue_re & litedramcore_phaseinjector1_csrfield_rden);
assign litedramcore_csr_dfi_p1_wrdata = litedramcore_phaseinjector1_wrdata_storage;
assign litedramcore_csr_dfi_p1_wrdata_mask = 1'd0;
always @(*) begin
    litedramcore_csr_dfi_p2_cs_n <= 1'd1;
    if (litedramcore_phaseinjector2_command_issue_re) begin
        litedramcore_csr_dfi_p2_cs_n <= {1{(~litedramcore_phaseinjector2_csrfield_cs)}};
    end else begin
        litedramcore_csr_dfi_p2_cs_n <= {1{1'd1}};
    end
end
always @(*) begin
    litedramcore_csr_dfi_p2_ras_n <= 1'd1;
    if (litedramcore_phaseinjector2_command_issue_re) begin
        litedramcore_csr_dfi_p2_ras_n <= (~litedramcore_phaseinjector2_csrfield_ras);
    end else begin
        litedramcore_csr_dfi_p2_ras_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p2_we_n <= 1'd1;
    if (litedramcore_phaseinjector2_command_issue_re) begin
        litedramcore_csr_dfi_p2_we_n <= (~litedramcore_phaseinjector2_csrfield_we);
    end else begin
        litedramcore_csr_dfi_p2_we_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p2_cas_n <= 1'd1;
    if (litedramcore_phaseinjector2_command_issue_re) begin
        litedramcore_csr_dfi_p2_cas_n <= (~litedramcore_phaseinjector2_csrfield_cas);
    end else begin
        litedramcore_csr_dfi_p2_cas_n <= 1'd1;
    end
end
assign litedramcore_csr_dfi_p2_address = litedramcore_phaseinjector2_address_storage;
assign litedramcore_csr_dfi_p2_bank = litedramcore_phaseinjector2_baddress_storage;
assign litedramcore_csr_dfi_p2_wrdata_en = (litedramcore_phaseinjector2_command_issue_re & litedramcore_phaseinjector2_csrfield_wren);
assign litedramcore_csr_dfi_p2_rddata_en = (litedramcore_phaseinjector2_command_issue_re & litedramcore_phaseinjector2_csrfield_rden);
assign litedramcore_csr_dfi_p2_wrdata = litedramcore_phaseinjector2_wrdata_storage;
assign litedramcore_csr_dfi_p2_wrdata_mask = 1'd0;
always @(*) begin
    litedramcore_csr_dfi_p3_cs_n <= 1'd1;
    if (litedramcore_phaseinjector3_command_issue_re) begin
        litedramcore_csr_dfi_p3_cs_n <= {1{(~litedramcore_phaseinjector3_csrfield_cs)}};
    end else begin
        litedramcore_csr_dfi_p3_cs_n <= {1{1'd1}};
    end
end
always @(*) begin
    litedramcore_csr_dfi_p3_ras_n <= 1'd1;
    if (litedramcore_phaseinjector3_command_issue_re) begin
        litedramcore_csr_dfi_p3_ras_n <= (~litedramcore_phaseinjector3_csrfield_ras);
    end else begin
        litedramcore_csr_dfi_p3_ras_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p3_we_n <= 1'd1;
    if (litedramcore_phaseinjector3_command_issue_re) begin
        litedramcore_csr_dfi_p3_we_n <= (~litedramcore_phaseinjector3_csrfield_we);
    end else begin
        litedramcore_csr_dfi_p3_we_n <= 1'd1;
    end
end
always @(*) begin
    litedramcore_csr_dfi_p3_cas_n <= 1'd1;
    if (litedramcore_phaseinjector3_command_issue_re) begin
        litedramcore_csr_dfi_p3_cas_n <= (~litedramcore_phaseinjector3_csrfield_cas);
    end else begin
        litedramcore_csr_dfi_p3_cas_n <= 1'd1;
    end
end
assign litedramcore_csr_dfi_p3_address = litedramcore_phaseinjector3_address_storage;
assign litedramcore_csr_dfi_p3_bank = litedramcore_phaseinjector3_baddress_storage;
assign litedramcore_csr_dfi_p3_wrdata_en = (litedramcore_phaseinjector3_command_issue_re & litedramcore_phaseinjector3_csrfield_wren);
assign litedramcore_csr_dfi_p3_rddata_en = (litedramcore_phaseinjector3_command_issue_re & litedramcore_phaseinjector3_csrfield_rden);
assign litedramcore_csr_dfi_p3_wrdata = litedramcore_phaseinjector3_wrdata_storage;
assign litedramcore_csr_dfi_p3_wrdata_mask = 1'd0;
assign litedramcore_bankmachine0_req_valid = litedramcore_interface_bank0_valid;
assign litedramcore_interface_bank0_ready = litedramcore_bankmachine0_req_ready;
assign litedramcore_bankmachine0_req_we = litedramcore_interface_bank0_we;
assign litedramcore_bankmachine0_req_addr = litedramcore_interface_bank0_addr;
assign litedramcore_interface_bank0_lock = litedramcore_bankmachine0_req_lock;
assign litedramcore_interface_bank0_wdata_ready = litedramcore_bankmachine0_req_wdata_ready;
assign litedramcore_interface_bank0_rdata_valid = litedramcore_bankmachine0_req_rdata_valid;
assign litedramcore_bankmachine1_req_valid = litedramcore_interface_bank1_valid;
assign litedramcore_interface_bank1_ready = litedramcore_bankmachine1_req_ready;
assign litedramcore_bankmachine1_req_we = litedramcore_interface_bank1_we;
assign litedramcore_bankmachine1_req_addr = litedramcore_interface_bank1_addr;
assign litedramcore_interface_bank1_lock = litedramcore_bankmachine1_req_lock;
assign litedramcore_interface_bank1_wdata_ready = litedramcore_bankmachine1_req_wdata_ready;
assign litedramcore_interface_bank1_rdata_valid = litedramcore_bankmachine1_req_rdata_valid;
assign litedramcore_bankmachine2_req_valid = litedramcore_interface_bank2_valid;
assign litedramcore_interface_bank2_ready = litedramcore_bankmachine2_req_ready;
assign litedramcore_bankmachine2_req_we = litedramcore_interface_bank2_we;
assign litedramcore_bankmachine2_req_addr = litedramcore_interface_bank2_addr;
assign litedramcore_interface_bank2_lock = litedramcore_bankmachine2_req_lock;
assign litedramcore_interface_bank2_wdata_ready = litedramcore_bankmachine2_req_wdata_ready;
assign litedramcore_interface_bank2_rdata_valid = litedramcore_bankmachine2_req_rdata_valid;
assign litedramcore_bankmachine3_req_valid = litedramcore_interface_bank3_valid;
assign litedramcore_interface_bank3_ready = litedramcore_bankmachine3_req_ready;
assign litedramcore_bankmachine3_req_we = litedramcore_interface_bank3_we;
assign litedramcore_bankmachine3_req_addr = litedramcore_interface_bank3_addr;
assign litedramcore_interface_bank3_lock = litedramcore_bankmachine3_req_lock;
assign litedramcore_interface_bank3_wdata_ready = litedramcore_bankmachine3_req_wdata_ready;
assign litedramcore_interface_bank3_rdata_valid = litedramcore_bankmachine3_req_rdata_valid;
assign litedramcore_bankmachine4_req_valid = litedramcore_interface_bank4_valid;
assign litedramcore_interface_bank4_ready = litedramcore_bankmachine4_req_ready;
assign litedramcore_bankmachine4_req_we = litedramcore_interface_bank4_we;
assign litedramcore_bankmachine4_req_addr = litedramcore_interface_bank4_addr;
assign litedramcore_interface_bank4_lock = litedramcore_bankmachine4_req_lock;
assign litedramcore_interface_bank4_wdata_ready = litedramcore_bankmachine4_req_wdata_ready;
assign litedramcore_interface_bank4_rdata_valid = litedramcore_bankmachine4_req_rdata_valid;
assign litedramcore_bankmachine5_req_valid = litedramcore_interface_bank5_valid;
assign litedramcore_interface_bank5_ready = litedramcore_bankmachine5_req_ready;
assign litedramcore_bankmachine5_req_we = litedramcore_interface_bank5_we;
assign litedramcore_bankmachine5_req_addr = litedramcore_interface_bank5_addr;
assign litedramcore_interface_bank5_lock = litedramcore_bankmachine5_req_lock;
assign litedramcore_interface_bank5_wdata_ready = litedramcore_bankmachine5_req_wdata_ready;
assign litedramcore_interface_bank5_rdata_valid = litedramcore_bankmachine5_req_rdata_valid;
assign litedramcore_bankmachine6_req_valid = litedramcore_interface_bank6_valid;
assign litedramcore_interface_bank6_ready = litedramcore_bankmachine6_req_ready;
assign litedramcore_bankmachine6_req_we = litedramcore_interface_bank6_we;
assign litedramcore_bankmachine6_req_addr = litedramcore_interface_bank6_addr;
assign litedramcore_interface_bank6_lock = litedramcore_bankmachine6_req_lock;
assign litedramcore_interface_bank6_wdata_ready = litedramcore_bankmachine6_req_wdata_ready;
assign litedramcore_interface_bank6_rdata_valid = litedramcore_bankmachine6_req_rdata_valid;
assign litedramcore_bankmachine7_req_valid = litedramcore_interface_bank7_valid;
assign litedramcore_interface_bank7_ready = litedramcore_bankmachine7_req_ready;
assign litedramcore_bankmachine7_req_we = litedramcore_interface_bank7_we;
assign litedramcore_bankmachine7_req_addr = litedramcore_interface_bank7_addr;
assign litedramcore_interface_bank7_lock = litedramcore_bankmachine7_req_lock;
assign litedramcore_interface_bank7_wdata_ready = litedramcore_bankmachine7_req_wdata_ready;
assign litedramcore_interface_bank7_rdata_valid = litedramcore_bankmachine7_req_rdata_valid;
assign litedramcore_timer_wait = (~litedramcore_timer_done0);
assign litedramcore_postponer_req_i = litedramcore_timer_done0;
assign litedramcore_wants_refresh = litedramcore_postponer_req_o;
assign litedramcore_wants_zqcs = litedramcore_zqcs_timer_done0;
assign litedramcore_zqcs_timer_wait = (~litedramcore_zqcs_executer_done);
assign litedramcore_timer_done1 = (litedramcore_timer_count1 == 1'd0);
assign litedramcore_timer_done0 = litedramcore_timer_done1;
assign litedramcore_timer_count0 = litedramcore_timer_count1;
assign litedramcore_sequencer_start1 = (litedramcore_sequencer_start0 | (litedramcore_sequencer_count != 1'd0));
assign litedramcore_sequencer_done0 = (litedramcore_sequencer_done1 & (litedramcore_sequencer_count == 1'd0));
assign litedramcore_zqcs_timer_done1 = (litedramcore_zqcs_timer_count1 == 1'd0);
assign litedramcore_zqcs_timer_done0 = litedramcore_zqcs_timer_done1;
assign litedramcore_zqcs_timer_count0 = litedramcore_zqcs_timer_count1;
always @(*) begin
    litedramcore_refresher_next_state <= 2'd0;
    litedramcore_refresher_next_state <= litedramcore_refresher_state;
    case (litedramcore_refresher_state)
        1'd1: begin
            if (litedramcore_cmd_ready) begin
                litedramcore_refresher_next_state <= 2'd2;
            end
        end
        2'd2: begin
            if (litedramcore_sequencer_done0) begin
                if (litedramcore_wants_zqcs) begin
                    litedramcore_refresher_next_state <= 2'd3;
                end else begin
                    litedramcore_refresher_next_state <= 1'd0;
                end
            end
        end
        2'd3: begin
            if (litedramcore_zqcs_executer_done) begin
                litedramcore_refresher_next_state <= 1'd0;
            end
        end
        default: begin
            if (1'd1) begin
                if (litedramcore_wants_refresh) begin
                    litedramcore_refresher_next_state <= 1'd1;
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_cmd_valid <= 1'd0;
    case (litedramcore_refresher_state)
        1'd1: begin
            litedramcore_cmd_valid <= 1'd1;
        end
        2'd2: begin
            litedramcore_cmd_valid <= 1'd1;
            if (litedramcore_sequencer_done0) begin
                if (litedramcore_wants_zqcs) begin
                end else begin
                    litedramcore_cmd_valid <= 1'd0;
                end
            end
        end
        2'd3: begin
            litedramcore_cmd_valid <= 1'd1;
            if (litedramcore_zqcs_executer_done) begin
                litedramcore_cmd_valid <= 1'd0;
            end
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_zqcs_executer_start <= 1'd0;
    case (litedramcore_refresher_state)
        1'd1: begin
        end
        2'd2: begin
            if (litedramcore_sequencer_done0) begin
                if (litedramcore_wants_zqcs) begin
                    litedramcore_zqcs_executer_start <= 1'd1;
                end else begin
                end
            end
        end
        2'd3: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_cmd_last <= 1'd0;
    case (litedramcore_refresher_state)
        1'd1: begin
        end
        2'd2: begin
            if (litedramcore_sequencer_done0) begin
                if (litedramcore_wants_zqcs) begin
                end else begin
                    litedramcore_cmd_last <= 1'd1;
                end
            end
        end
        2'd3: begin
            if (litedramcore_zqcs_executer_done) begin
                litedramcore_cmd_last <= 1'd1;
            end
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_sequencer_start0 <= 1'd0;
    case (litedramcore_refresher_state)
        1'd1: begin
            if (litedramcore_cmd_ready) begin
                litedramcore_sequencer_start0 <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        default: begin
        end
    endcase
end
assign litedramcore_bankmachine0_sink_valid = litedramcore_bankmachine0_req_valid;
assign litedramcore_bankmachine0_req_ready = litedramcore_bankmachine0_sink_ready;
assign litedramcore_bankmachine0_sink_payload_we = litedramcore_bankmachine0_req_we;
assign litedramcore_bankmachine0_sink_payload_addr = litedramcore_bankmachine0_req_addr;
assign litedramcore_bankmachine0_sink_sink_valid = litedramcore_bankmachine0_source_valid;
assign litedramcore_bankmachine0_source_ready = litedramcore_bankmachine0_sink_sink_ready;
assign litedramcore_bankmachine0_sink_sink_first = litedramcore_bankmachine0_source_first;
assign litedramcore_bankmachine0_sink_sink_last = litedramcore_bankmachine0_source_last;
assign litedramcore_bankmachine0_sink_sink_payload_we = litedramcore_bankmachine0_source_payload_we;
assign litedramcore_bankmachine0_sink_sink_payload_addr = litedramcore_bankmachine0_source_payload_addr;
assign litedramcore_bankmachine0_source_source_ready = (litedramcore_bankmachine0_req_wdata_ready | litedramcore_bankmachine0_req_rdata_valid);
assign litedramcore_bankmachine0_req_lock = (litedramcore_bankmachine0_source_valid | litedramcore_bankmachine0_source_source_valid);
assign litedramcore_bankmachine0_row_hit = (litedramcore_bankmachine0_row == litedramcore_bankmachine0_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine0_cmd_payload_ba = 1'd0;
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine0_row_col_n_addr_sel) begin
        litedramcore_bankmachine0_cmd_payload_a <= litedramcore_bankmachine0_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine0_cmd_payload_a <= ((litedramcore_bankmachine0_auto_precharge <<< 4'd10) | {litedramcore_bankmachine0_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine0_twtpcon_valid = ((litedramcore_bankmachine0_cmd_valid & litedramcore_bankmachine0_cmd_ready) & litedramcore_bankmachine0_cmd_payload_is_write);
assign litedramcore_bankmachine0_trccon_valid = ((litedramcore_bankmachine0_cmd_valid & litedramcore_bankmachine0_cmd_ready) & litedramcore_bankmachine0_row_open);
assign litedramcore_bankmachine0_trascon_valid = ((litedramcore_bankmachine0_cmd_valid & litedramcore_bankmachine0_cmd_ready) & litedramcore_bankmachine0_row_open);
always @(*) begin
    litedramcore_bankmachine0_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine0_source_valid & litedramcore_bankmachine0_source_source_valid)) begin
        if ((litedramcore_bankmachine0_source_payload_addr[21:7] != litedramcore_bankmachine0_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine0_auto_precharge <= (litedramcore_bankmachine0_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine0_syncfifo0_din = {litedramcore_bankmachine0_fifo_in_last, litedramcore_bankmachine0_fifo_in_first, litedramcore_bankmachine0_fifo_in_payload_addr, litedramcore_bankmachine0_fifo_in_payload_we};
assign {litedramcore_bankmachine0_fifo_out_last, litedramcore_bankmachine0_fifo_out_first, litedramcore_bankmachine0_fifo_out_payload_addr, litedramcore_bankmachine0_fifo_out_payload_we} = litedramcore_bankmachine0_syncfifo0_dout;
assign {litedramcore_bankmachine0_fifo_out_last, litedramcore_bankmachine0_fifo_out_first, litedramcore_bankmachine0_fifo_out_payload_addr, litedramcore_bankmachine0_fifo_out_payload_we} = litedramcore_bankmachine0_syncfifo0_dout;
assign {litedramcore_bankmachine0_fifo_out_last, litedramcore_bankmachine0_fifo_out_first, litedramcore_bankmachine0_fifo_out_payload_addr, litedramcore_bankmachine0_fifo_out_payload_we} = litedramcore_bankmachine0_syncfifo0_dout;
assign {litedramcore_bankmachine0_fifo_out_last, litedramcore_bankmachine0_fifo_out_first, litedramcore_bankmachine0_fifo_out_payload_addr, litedramcore_bankmachine0_fifo_out_payload_we} = litedramcore_bankmachine0_syncfifo0_dout;
assign litedramcore_bankmachine0_sink_ready = litedramcore_bankmachine0_syncfifo0_writable;
assign litedramcore_bankmachine0_syncfifo0_we = litedramcore_bankmachine0_sink_valid;
assign litedramcore_bankmachine0_fifo_in_first = litedramcore_bankmachine0_sink_first;
assign litedramcore_bankmachine0_fifo_in_last = litedramcore_bankmachine0_sink_last;
assign litedramcore_bankmachine0_fifo_in_payload_we = litedramcore_bankmachine0_sink_payload_we;
assign litedramcore_bankmachine0_fifo_in_payload_addr = litedramcore_bankmachine0_sink_payload_addr;
assign litedramcore_bankmachine0_source_valid = litedramcore_bankmachine0_syncfifo0_readable;
assign litedramcore_bankmachine0_source_first = litedramcore_bankmachine0_fifo_out_first;
assign litedramcore_bankmachine0_source_last = litedramcore_bankmachine0_fifo_out_last;
assign litedramcore_bankmachine0_source_payload_we = litedramcore_bankmachine0_fifo_out_payload_we;
assign litedramcore_bankmachine0_source_payload_addr = litedramcore_bankmachine0_fifo_out_payload_addr;
assign litedramcore_bankmachine0_syncfifo0_re = litedramcore_bankmachine0_source_ready;
always @(*) begin
    litedramcore_bankmachine0_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine0_replace) begin
        litedramcore_bankmachine0_wrport_adr <= (litedramcore_bankmachine0_produce - 1'd1);
    end else begin
        litedramcore_bankmachine0_wrport_adr <= litedramcore_bankmachine0_produce;
    end
end
assign litedramcore_bankmachine0_wrport_dat_w = litedramcore_bankmachine0_syncfifo0_din;
assign litedramcore_bankmachine0_wrport_we = (litedramcore_bankmachine0_syncfifo0_we & (litedramcore_bankmachine0_syncfifo0_writable | litedramcore_bankmachine0_replace));
assign litedramcore_bankmachine0_do_read = (litedramcore_bankmachine0_syncfifo0_readable & litedramcore_bankmachine0_syncfifo0_re);
assign litedramcore_bankmachine0_rdport_adr = litedramcore_bankmachine0_consume;
assign litedramcore_bankmachine0_syncfifo0_dout = litedramcore_bankmachine0_rdport_dat_r;
assign litedramcore_bankmachine0_syncfifo0_writable = (litedramcore_bankmachine0_level != 5'd16);
assign litedramcore_bankmachine0_syncfifo0_readable = (litedramcore_bankmachine0_level != 1'd0);
assign litedramcore_bankmachine0_pipe_valid_sink_ready = ((~litedramcore_bankmachine0_pipe_valid_source_valid) | litedramcore_bankmachine0_pipe_valid_source_ready);
assign litedramcore_bankmachine0_pipe_valid_sink_valid = litedramcore_bankmachine0_sink_sink_valid;
assign litedramcore_bankmachine0_sink_sink_ready = litedramcore_bankmachine0_pipe_valid_sink_ready;
assign litedramcore_bankmachine0_pipe_valid_sink_first = litedramcore_bankmachine0_sink_sink_first;
assign litedramcore_bankmachine0_pipe_valid_sink_last = litedramcore_bankmachine0_sink_sink_last;
assign litedramcore_bankmachine0_pipe_valid_sink_payload_we = litedramcore_bankmachine0_sink_sink_payload_we;
assign litedramcore_bankmachine0_pipe_valid_sink_payload_addr = litedramcore_bankmachine0_sink_sink_payload_addr;
assign litedramcore_bankmachine0_source_source_valid = litedramcore_bankmachine0_pipe_valid_source_valid;
assign litedramcore_bankmachine0_pipe_valid_source_ready = litedramcore_bankmachine0_source_source_ready;
assign litedramcore_bankmachine0_source_source_first = litedramcore_bankmachine0_pipe_valid_source_first;
assign litedramcore_bankmachine0_source_source_last = litedramcore_bankmachine0_pipe_valid_source_last;
assign litedramcore_bankmachine0_source_source_payload_we = litedramcore_bankmachine0_pipe_valid_source_payload_we;
assign litedramcore_bankmachine0_source_source_payload_addr = litedramcore_bankmachine0_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine0_next_state <= 4'd0;
    litedramcore_bankmachine0_next_state <= litedramcore_bankmachine0_state;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
            if ((litedramcore_bankmachine0_twtpcon_ready & litedramcore_bankmachine0_trascon_ready)) begin
                if (litedramcore_bankmachine0_cmd_ready) begin
                    litedramcore_bankmachine0_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine0_twtpcon_ready & litedramcore_bankmachine0_trascon_ready)) begin
                litedramcore_bankmachine0_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine0_trccon_ready) begin
                if (litedramcore_bankmachine0_cmd_ready) begin
                    litedramcore_bankmachine0_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine0_refresh_req)) begin
                litedramcore_bankmachine0_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine0_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine0_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine0_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine0_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
                litedramcore_bankmachine0_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            if ((litedramcore_bankmachine0_cmd_ready & litedramcore_bankmachine0_auto_precharge)) begin
                                litedramcore_bankmachine0_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine0_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine0_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            if (litedramcore_bankmachine0_source_source_payload_we) begin
                                litedramcore_bankmachine0_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            if (litedramcore_bankmachine0_source_source_payload_we) begin
                                litedramcore_bankmachine0_req_wdata_ready <= litedramcore_bankmachine0_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            if (litedramcore_bankmachine0_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine0_req_rdata_valid <= litedramcore_bankmachine0_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine0_twtpcon_ready) begin
                litedramcore_bankmachine0_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_row_open <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine0_trccon_ready) begin
                litedramcore_bankmachine0_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
            if ((litedramcore_bankmachine0_twtpcon_ready & litedramcore_bankmachine0_trascon_ready)) begin
                litedramcore_bankmachine0_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine0_trccon_ready) begin
                litedramcore_bankmachine0_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            litedramcore_bankmachine0_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_row_close <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
            litedramcore_bankmachine0_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine0_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine0_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine0_trccon_ready) begin
                litedramcore_bankmachine0_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            litedramcore_bankmachine0_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
            if ((litedramcore_bankmachine0_twtpcon_ready & litedramcore_bankmachine0_trascon_ready)) begin
                litedramcore_bankmachine0_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine0_trccon_ready) begin
                litedramcore_bankmachine0_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
            if ((litedramcore_bankmachine0_twtpcon_ready & litedramcore_bankmachine0_trascon_ready)) begin
                litedramcore_bankmachine0_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            if (litedramcore_bankmachine0_source_source_payload_we) begin
                                litedramcore_bankmachine0_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
            if ((litedramcore_bankmachine0_twtpcon_ready & litedramcore_bankmachine0_trascon_ready)) begin
                litedramcore_bankmachine0_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine0_trccon_ready) begin
                litedramcore_bankmachine0_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine0_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine0_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine0_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine0_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine0_source_source_valid) begin
                    if (litedramcore_bankmachine0_row_opened) begin
                        if (litedramcore_bankmachine0_row_hit) begin
                            if (litedramcore_bankmachine0_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine0_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
assign litedramcore_bankmachine1_sink_valid = litedramcore_bankmachine1_req_valid;
assign litedramcore_bankmachine1_req_ready = litedramcore_bankmachine1_sink_ready;
assign litedramcore_bankmachine1_sink_payload_we = litedramcore_bankmachine1_req_we;
assign litedramcore_bankmachine1_sink_payload_addr = litedramcore_bankmachine1_req_addr;
assign litedramcore_bankmachine1_sink_sink_valid = litedramcore_bankmachine1_source_valid;
assign litedramcore_bankmachine1_source_ready = litedramcore_bankmachine1_sink_sink_ready;
assign litedramcore_bankmachine1_sink_sink_first = litedramcore_bankmachine1_source_first;
assign litedramcore_bankmachine1_sink_sink_last = litedramcore_bankmachine1_source_last;
assign litedramcore_bankmachine1_sink_sink_payload_we = litedramcore_bankmachine1_source_payload_we;
assign litedramcore_bankmachine1_sink_sink_payload_addr = litedramcore_bankmachine1_source_payload_addr;
assign litedramcore_bankmachine1_source_source_ready = (litedramcore_bankmachine1_req_wdata_ready | litedramcore_bankmachine1_req_rdata_valid);
assign litedramcore_bankmachine1_req_lock = (litedramcore_bankmachine1_source_valid | litedramcore_bankmachine1_source_source_valid);
assign litedramcore_bankmachine1_row_hit = (litedramcore_bankmachine1_row == litedramcore_bankmachine1_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine1_cmd_payload_ba = 1'd1;
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine1_row_col_n_addr_sel) begin
        litedramcore_bankmachine1_cmd_payload_a <= litedramcore_bankmachine1_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine1_cmd_payload_a <= ((litedramcore_bankmachine1_auto_precharge <<< 4'd10) | {litedramcore_bankmachine1_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine1_twtpcon_valid = ((litedramcore_bankmachine1_cmd_valid & litedramcore_bankmachine1_cmd_ready) & litedramcore_bankmachine1_cmd_payload_is_write);
assign litedramcore_bankmachine1_trccon_valid = ((litedramcore_bankmachine1_cmd_valid & litedramcore_bankmachine1_cmd_ready) & litedramcore_bankmachine1_row_open);
assign litedramcore_bankmachine1_trascon_valid = ((litedramcore_bankmachine1_cmd_valid & litedramcore_bankmachine1_cmd_ready) & litedramcore_bankmachine1_row_open);
always @(*) begin
    litedramcore_bankmachine1_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine1_source_valid & litedramcore_bankmachine1_source_source_valid)) begin
        if ((litedramcore_bankmachine1_source_payload_addr[21:7] != litedramcore_bankmachine1_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine1_auto_precharge <= (litedramcore_bankmachine1_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine1_syncfifo1_din = {litedramcore_bankmachine1_fifo_in_last, litedramcore_bankmachine1_fifo_in_first, litedramcore_bankmachine1_fifo_in_payload_addr, litedramcore_bankmachine1_fifo_in_payload_we};
assign {litedramcore_bankmachine1_fifo_out_last, litedramcore_bankmachine1_fifo_out_first, litedramcore_bankmachine1_fifo_out_payload_addr, litedramcore_bankmachine1_fifo_out_payload_we} = litedramcore_bankmachine1_syncfifo1_dout;
assign {litedramcore_bankmachine1_fifo_out_last, litedramcore_bankmachine1_fifo_out_first, litedramcore_bankmachine1_fifo_out_payload_addr, litedramcore_bankmachine1_fifo_out_payload_we} = litedramcore_bankmachine1_syncfifo1_dout;
assign {litedramcore_bankmachine1_fifo_out_last, litedramcore_bankmachine1_fifo_out_first, litedramcore_bankmachine1_fifo_out_payload_addr, litedramcore_bankmachine1_fifo_out_payload_we} = litedramcore_bankmachine1_syncfifo1_dout;
assign {litedramcore_bankmachine1_fifo_out_last, litedramcore_bankmachine1_fifo_out_first, litedramcore_bankmachine1_fifo_out_payload_addr, litedramcore_bankmachine1_fifo_out_payload_we} = litedramcore_bankmachine1_syncfifo1_dout;
assign litedramcore_bankmachine1_sink_ready = litedramcore_bankmachine1_syncfifo1_writable;
assign litedramcore_bankmachine1_syncfifo1_we = litedramcore_bankmachine1_sink_valid;
assign litedramcore_bankmachine1_fifo_in_first = litedramcore_bankmachine1_sink_first;
assign litedramcore_bankmachine1_fifo_in_last = litedramcore_bankmachine1_sink_last;
assign litedramcore_bankmachine1_fifo_in_payload_we = litedramcore_bankmachine1_sink_payload_we;
assign litedramcore_bankmachine1_fifo_in_payload_addr = litedramcore_bankmachine1_sink_payload_addr;
assign litedramcore_bankmachine1_source_valid = litedramcore_bankmachine1_syncfifo1_readable;
assign litedramcore_bankmachine1_source_first = litedramcore_bankmachine1_fifo_out_first;
assign litedramcore_bankmachine1_source_last = litedramcore_bankmachine1_fifo_out_last;
assign litedramcore_bankmachine1_source_payload_we = litedramcore_bankmachine1_fifo_out_payload_we;
assign litedramcore_bankmachine1_source_payload_addr = litedramcore_bankmachine1_fifo_out_payload_addr;
assign litedramcore_bankmachine1_syncfifo1_re = litedramcore_bankmachine1_source_ready;
always @(*) begin
    litedramcore_bankmachine1_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine1_replace) begin
        litedramcore_bankmachine1_wrport_adr <= (litedramcore_bankmachine1_produce - 1'd1);
    end else begin
        litedramcore_bankmachine1_wrport_adr <= litedramcore_bankmachine1_produce;
    end
end
assign litedramcore_bankmachine1_wrport_dat_w = litedramcore_bankmachine1_syncfifo1_din;
assign litedramcore_bankmachine1_wrport_we = (litedramcore_bankmachine1_syncfifo1_we & (litedramcore_bankmachine1_syncfifo1_writable | litedramcore_bankmachine1_replace));
assign litedramcore_bankmachine1_do_read = (litedramcore_bankmachine1_syncfifo1_readable & litedramcore_bankmachine1_syncfifo1_re);
assign litedramcore_bankmachine1_rdport_adr = litedramcore_bankmachine1_consume;
assign litedramcore_bankmachine1_syncfifo1_dout = litedramcore_bankmachine1_rdport_dat_r;
assign litedramcore_bankmachine1_syncfifo1_writable = (litedramcore_bankmachine1_level != 5'd16);
assign litedramcore_bankmachine1_syncfifo1_readable = (litedramcore_bankmachine1_level != 1'd0);
assign litedramcore_bankmachine1_pipe_valid_sink_ready = ((~litedramcore_bankmachine1_pipe_valid_source_valid) | litedramcore_bankmachine1_pipe_valid_source_ready);
assign litedramcore_bankmachine1_pipe_valid_sink_valid = litedramcore_bankmachine1_sink_sink_valid;
assign litedramcore_bankmachine1_sink_sink_ready = litedramcore_bankmachine1_pipe_valid_sink_ready;
assign litedramcore_bankmachine1_pipe_valid_sink_first = litedramcore_bankmachine1_sink_sink_first;
assign litedramcore_bankmachine1_pipe_valid_sink_last = litedramcore_bankmachine1_sink_sink_last;
assign litedramcore_bankmachine1_pipe_valid_sink_payload_we = litedramcore_bankmachine1_sink_sink_payload_we;
assign litedramcore_bankmachine1_pipe_valid_sink_payload_addr = litedramcore_bankmachine1_sink_sink_payload_addr;
assign litedramcore_bankmachine1_source_source_valid = litedramcore_bankmachine1_pipe_valid_source_valid;
assign litedramcore_bankmachine1_pipe_valid_source_ready = litedramcore_bankmachine1_source_source_ready;
assign litedramcore_bankmachine1_source_source_first = litedramcore_bankmachine1_pipe_valid_source_first;
assign litedramcore_bankmachine1_source_source_last = litedramcore_bankmachine1_pipe_valid_source_last;
assign litedramcore_bankmachine1_source_source_payload_we = litedramcore_bankmachine1_pipe_valid_source_payload_we;
assign litedramcore_bankmachine1_source_source_payload_addr = litedramcore_bankmachine1_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine1_next_state <= 4'd0;
    litedramcore_bankmachine1_next_state <= litedramcore_bankmachine1_state;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
            if ((litedramcore_bankmachine1_twtpcon_ready & litedramcore_bankmachine1_trascon_ready)) begin
                if (litedramcore_bankmachine1_cmd_ready) begin
                    litedramcore_bankmachine1_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine1_twtpcon_ready & litedramcore_bankmachine1_trascon_ready)) begin
                litedramcore_bankmachine1_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine1_trccon_ready) begin
                if (litedramcore_bankmachine1_cmd_ready) begin
                    litedramcore_bankmachine1_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine1_refresh_req)) begin
                litedramcore_bankmachine1_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine1_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine1_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine1_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine1_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
                litedramcore_bankmachine1_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            if ((litedramcore_bankmachine1_cmd_ready & litedramcore_bankmachine1_auto_precharge)) begin
                                litedramcore_bankmachine1_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine1_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine1_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_row_open <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine1_trccon_ready) begin
                litedramcore_bankmachine1_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
            if ((litedramcore_bankmachine1_twtpcon_ready & litedramcore_bankmachine1_trascon_ready)) begin
                litedramcore_bankmachine1_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine1_trccon_ready) begin
                litedramcore_bankmachine1_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            litedramcore_bankmachine1_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_row_close <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
            litedramcore_bankmachine1_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine1_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine1_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine1_twtpcon_ready) begin
                litedramcore_bankmachine1_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine1_trccon_ready) begin
                litedramcore_bankmachine1_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            litedramcore_bankmachine1_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
            if ((litedramcore_bankmachine1_twtpcon_ready & litedramcore_bankmachine1_trascon_ready)) begin
                litedramcore_bankmachine1_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine1_trccon_ready) begin
                litedramcore_bankmachine1_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
            if ((litedramcore_bankmachine1_twtpcon_ready & litedramcore_bankmachine1_trascon_ready)) begin
                litedramcore_bankmachine1_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            if (litedramcore_bankmachine1_source_source_payload_we) begin
                                litedramcore_bankmachine1_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
            if ((litedramcore_bankmachine1_twtpcon_ready & litedramcore_bankmachine1_trascon_ready)) begin
                litedramcore_bankmachine1_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine1_trccon_ready) begin
                litedramcore_bankmachine1_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine1_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            if (litedramcore_bankmachine1_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine1_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            if (litedramcore_bankmachine1_source_source_payload_we) begin
                                litedramcore_bankmachine1_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            if (litedramcore_bankmachine1_source_source_payload_we) begin
                                litedramcore_bankmachine1_req_wdata_ready <= litedramcore_bankmachine1_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine1_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine1_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine1_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine1_source_source_valid) begin
                    if (litedramcore_bankmachine1_row_opened) begin
                        if (litedramcore_bankmachine1_row_hit) begin
                            if (litedramcore_bankmachine1_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine1_req_rdata_valid <= litedramcore_bankmachine1_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
assign litedramcore_bankmachine2_sink_valid = litedramcore_bankmachine2_req_valid;
assign litedramcore_bankmachine2_req_ready = litedramcore_bankmachine2_sink_ready;
assign litedramcore_bankmachine2_sink_payload_we = litedramcore_bankmachine2_req_we;
assign litedramcore_bankmachine2_sink_payload_addr = litedramcore_bankmachine2_req_addr;
assign litedramcore_bankmachine2_sink_sink_valid = litedramcore_bankmachine2_source_valid;
assign litedramcore_bankmachine2_source_ready = litedramcore_bankmachine2_sink_sink_ready;
assign litedramcore_bankmachine2_sink_sink_first = litedramcore_bankmachine2_source_first;
assign litedramcore_bankmachine2_sink_sink_last = litedramcore_bankmachine2_source_last;
assign litedramcore_bankmachine2_sink_sink_payload_we = litedramcore_bankmachine2_source_payload_we;
assign litedramcore_bankmachine2_sink_sink_payload_addr = litedramcore_bankmachine2_source_payload_addr;
assign litedramcore_bankmachine2_source_source_ready = (litedramcore_bankmachine2_req_wdata_ready | litedramcore_bankmachine2_req_rdata_valid);
assign litedramcore_bankmachine2_req_lock = (litedramcore_bankmachine2_source_valid | litedramcore_bankmachine2_source_source_valid);
assign litedramcore_bankmachine2_row_hit = (litedramcore_bankmachine2_row == litedramcore_bankmachine2_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine2_cmd_payload_ba = 2'd2;
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine2_row_col_n_addr_sel) begin
        litedramcore_bankmachine2_cmd_payload_a <= litedramcore_bankmachine2_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine2_cmd_payload_a <= ((litedramcore_bankmachine2_auto_precharge <<< 4'd10) | {litedramcore_bankmachine2_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine2_twtpcon_valid = ((litedramcore_bankmachine2_cmd_valid & litedramcore_bankmachine2_cmd_ready) & litedramcore_bankmachine2_cmd_payload_is_write);
assign litedramcore_bankmachine2_trccon_valid = ((litedramcore_bankmachine2_cmd_valid & litedramcore_bankmachine2_cmd_ready) & litedramcore_bankmachine2_row_open);
assign litedramcore_bankmachine2_trascon_valid = ((litedramcore_bankmachine2_cmd_valid & litedramcore_bankmachine2_cmd_ready) & litedramcore_bankmachine2_row_open);
always @(*) begin
    litedramcore_bankmachine2_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine2_source_valid & litedramcore_bankmachine2_source_source_valid)) begin
        if ((litedramcore_bankmachine2_source_payload_addr[21:7] != litedramcore_bankmachine2_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine2_auto_precharge <= (litedramcore_bankmachine2_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine2_syncfifo2_din = {litedramcore_bankmachine2_fifo_in_last, litedramcore_bankmachine2_fifo_in_first, litedramcore_bankmachine2_fifo_in_payload_addr, litedramcore_bankmachine2_fifo_in_payload_we};
assign {litedramcore_bankmachine2_fifo_out_last, litedramcore_bankmachine2_fifo_out_first, litedramcore_bankmachine2_fifo_out_payload_addr, litedramcore_bankmachine2_fifo_out_payload_we} = litedramcore_bankmachine2_syncfifo2_dout;
assign {litedramcore_bankmachine2_fifo_out_last, litedramcore_bankmachine2_fifo_out_first, litedramcore_bankmachine2_fifo_out_payload_addr, litedramcore_bankmachine2_fifo_out_payload_we} = litedramcore_bankmachine2_syncfifo2_dout;
assign {litedramcore_bankmachine2_fifo_out_last, litedramcore_bankmachine2_fifo_out_first, litedramcore_bankmachine2_fifo_out_payload_addr, litedramcore_bankmachine2_fifo_out_payload_we} = litedramcore_bankmachine2_syncfifo2_dout;
assign {litedramcore_bankmachine2_fifo_out_last, litedramcore_bankmachine2_fifo_out_first, litedramcore_bankmachine2_fifo_out_payload_addr, litedramcore_bankmachine2_fifo_out_payload_we} = litedramcore_bankmachine2_syncfifo2_dout;
assign litedramcore_bankmachine2_sink_ready = litedramcore_bankmachine2_syncfifo2_writable;
assign litedramcore_bankmachine2_syncfifo2_we = litedramcore_bankmachine2_sink_valid;
assign litedramcore_bankmachine2_fifo_in_first = litedramcore_bankmachine2_sink_first;
assign litedramcore_bankmachine2_fifo_in_last = litedramcore_bankmachine2_sink_last;
assign litedramcore_bankmachine2_fifo_in_payload_we = litedramcore_bankmachine2_sink_payload_we;
assign litedramcore_bankmachine2_fifo_in_payload_addr = litedramcore_bankmachine2_sink_payload_addr;
assign litedramcore_bankmachine2_source_valid = litedramcore_bankmachine2_syncfifo2_readable;
assign litedramcore_bankmachine2_source_first = litedramcore_bankmachine2_fifo_out_first;
assign litedramcore_bankmachine2_source_last = litedramcore_bankmachine2_fifo_out_last;
assign litedramcore_bankmachine2_source_payload_we = litedramcore_bankmachine2_fifo_out_payload_we;
assign litedramcore_bankmachine2_source_payload_addr = litedramcore_bankmachine2_fifo_out_payload_addr;
assign litedramcore_bankmachine2_syncfifo2_re = litedramcore_bankmachine2_source_ready;
always @(*) begin
    litedramcore_bankmachine2_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine2_replace) begin
        litedramcore_bankmachine2_wrport_adr <= (litedramcore_bankmachine2_produce - 1'd1);
    end else begin
        litedramcore_bankmachine2_wrport_adr <= litedramcore_bankmachine2_produce;
    end
end
assign litedramcore_bankmachine2_wrport_dat_w = litedramcore_bankmachine2_syncfifo2_din;
assign litedramcore_bankmachine2_wrport_we = (litedramcore_bankmachine2_syncfifo2_we & (litedramcore_bankmachine2_syncfifo2_writable | litedramcore_bankmachine2_replace));
assign litedramcore_bankmachine2_do_read = (litedramcore_bankmachine2_syncfifo2_readable & litedramcore_bankmachine2_syncfifo2_re);
assign litedramcore_bankmachine2_rdport_adr = litedramcore_bankmachine2_consume;
assign litedramcore_bankmachine2_syncfifo2_dout = litedramcore_bankmachine2_rdport_dat_r;
assign litedramcore_bankmachine2_syncfifo2_writable = (litedramcore_bankmachine2_level != 5'd16);
assign litedramcore_bankmachine2_syncfifo2_readable = (litedramcore_bankmachine2_level != 1'd0);
assign litedramcore_bankmachine2_pipe_valid_sink_ready = ((~litedramcore_bankmachine2_pipe_valid_source_valid) | litedramcore_bankmachine2_pipe_valid_source_ready);
assign litedramcore_bankmachine2_pipe_valid_sink_valid = litedramcore_bankmachine2_sink_sink_valid;
assign litedramcore_bankmachine2_sink_sink_ready = litedramcore_bankmachine2_pipe_valid_sink_ready;
assign litedramcore_bankmachine2_pipe_valid_sink_first = litedramcore_bankmachine2_sink_sink_first;
assign litedramcore_bankmachine2_pipe_valid_sink_last = litedramcore_bankmachine2_sink_sink_last;
assign litedramcore_bankmachine2_pipe_valid_sink_payload_we = litedramcore_bankmachine2_sink_sink_payload_we;
assign litedramcore_bankmachine2_pipe_valid_sink_payload_addr = litedramcore_bankmachine2_sink_sink_payload_addr;
assign litedramcore_bankmachine2_source_source_valid = litedramcore_bankmachine2_pipe_valid_source_valid;
assign litedramcore_bankmachine2_pipe_valid_source_ready = litedramcore_bankmachine2_source_source_ready;
assign litedramcore_bankmachine2_source_source_first = litedramcore_bankmachine2_pipe_valid_source_first;
assign litedramcore_bankmachine2_source_source_last = litedramcore_bankmachine2_pipe_valid_source_last;
assign litedramcore_bankmachine2_source_source_payload_we = litedramcore_bankmachine2_pipe_valid_source_payload_we;
assign litedramcore_bankmachine2_source_source_payload_addr = litedramcore_bankmachine2_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine2_next_state <= 4'd0;
    litedramcore_bankmachine2_next_state <= litedramcore_bankmachine2_state;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
            if ((litedramcore_bankmachine2_twtpcon_ready & litedramcore_bankmachine2_trascon_ready)) begin
                if (litedramcore_bankmachine2_cmd_ready) begin
                    litedramcore_bankmachine2_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine2_twtpcon_ready & litedramcore_bankmachine2_trascon_ready)) begin
                litedramcore_bankmachine2_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine2_trccon_ready) begin
                if (litedramcore_bankmachine2_cmd_ready) begin
                    litedramcore_bankmachine2_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine2_refresh_req)) begin
                litedramcore_bankmachine2_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine2_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine2_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine2_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine2_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
                litedramcore_bankmachine2_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            if ((litedramcore_bankmachine2_cmd_ready & litedramcore_bankmachine2_auto_precharge)) begin
                                litedramcore_bankmachine2_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine2_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine2_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine2_trccon_ready) begin
                litedramcore_bankmachine2_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            litedramcore_bankmachine2_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
            if ((litedramcore_bankmachine2_twtpcon_ready & litedramcore_bankmachine2_trascon_ready)) begin
                litedramcore_bankmachine2_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine2_trccon_ready) begin
                litedramcore_bankmachine2_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
            if ((litedramcore_bankmachine2_twtpcon_ready & litedramcore_bankmachine2_trascon_ready)) begin
                litedramcore_bankmachine2_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            if (litedramcore_bankmachine2_source_source_payload_we) begin
                                litedramcore_bankmachine2_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
            if ((litedramcore_bankmachine2_twtpcon_ready & litedramcore_bankmachine2_trascon_ready)) begin
                litedramcore_bankmachine2_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine2_trccon_ready) begin
                litedramcore_bankmachine2_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine2_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            if (litedramcore_bankmachine2_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine2_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            if (litedramcore_bankmachine2_source_source_payload_we) begin
                                litedramcore_bankmachine2_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            if (litedramcore_bankmachine2_source_source_payload_we) begin
                                litedramcore_bankmachine2_req_wdata_ready <= litedramcore_bankmachine2_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            if (litedramcore_bankmachine2_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine2_req_rdata_valid <= litedramcore_bankmachine2_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine2_twtpcon_ready) begin
                litedramcore_bankmachine2_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_row_open <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine2_trccon_ready) begin
                litedramcore_bankmachine2_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
            if ((litedramcore_bankmachine2_twtpcon_ready & litedramcore_bankmachine2_trascon_ready)) begin
                litedramcore_bankmachine2_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine2_trccon_ready) begin
                litedramcore_bankmachine2_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine2_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine2_source_source_valid) begin
                    if (litedramcore_bankmachine2_row_opened) begin
                        if (litedramcore_bankmachine2_row_hit) begin
                            litedramcore_bankmachine2_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine2_row_close <= 1'd0;
    case (litedramcore_bankmachine2_state)
        1'd1: begin
            litedramcore_bankmachine2_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine2_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine2_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
assign litedramcore_bankmachine3_sink_valid = litedramcore_bankmachine3_req_valid;
assign litedramcore_bankmachine3_req_ready = litedramcore_bankmachine3_sink_ready;
assign litedramcore_bankmachine3_sink_payload_we = litedramcore_bankmachine3_req_we;
assign litedramcore_bankmachine3_sink_payload_addr = litedramcore_bankmachine3_req_addr;
assign litedramcore_bankmachine3_sink_sink_valid = litedramcore_bankmachine3_source_valid;
assign litedramcore_bankmachine3_source_ready = litedramcore_bankmachine3_sink_sink_ready;
assign litedramcore_bankmachine3_sink_sink_first = litedramcore_bankmachine3_source_first;
assign litedramcore_bankmachine3_sink_sink_last = litedramcore_bankmachine3_source_last;
assign litedramcore_bankmachine3_sink_sink_payload_we = litedramcore_bankmachine3_source_payload_we;
assign litedramcore_bankmachine3_sink_sink_payload_addr = litedramcore_bankmachine3_source_payload_addr;
assign litedramcore_bankmachine3_source_source_ready = (litedramcore_bankmachine3_req_wdata_ready | litedramcore_bankmachine3_req_rdata_valid);
assign litedramcore_bankmachine3_req_lock = (litedramcore_bankmachine3_source_valid | litedramcore_bankmachine3_source_source_valid);
assign litedramcore_bankmachine3_row_hit = (litedramcore_bankmachine3_row == litedramcore_bankmachine3_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine3_cmd_payload_ba = 2'd3;
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine3_row_col_n_addr_sel) begin
        litedramcore_bankmachine3_cmd_payload_a <= litedramcore_bankmachine3_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine3_cmd_payload_a <= ((litedramcore_bankmachine3_auto_precharge <<< 4'd10) | {litedramcore_bankmachine3_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine3_twtpcon_valid = ((litedramcore_bankmachine3_cmd_valid & litedramcore_bankmachine3_cmd_ready) & litedramcore_bankmachine3_cmd_payload_is_write);
assign litedramcore_bankmachine3_trccon_valid = ((litedramcore_bankmachine3_cmd_valid & litedramcore_bankmachine3_cmd_ready) & litedramcore_bankmachine3_row_open);
assign litedramcore_bankmachine3_trascon_valid = ((litedramcore_bankmachine3_cmd_valid & litedramcore_bankmachine3_cmd_ready) & litedramcore_bankmachine3_row_open);
always @(*) begin
    litedramcore_bankmachine3_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine3_source_valid & litedramcore_bankmachine3_source_source_valid)) begin
        if ((litedramcore_bankmachine3_source_payload_addr[21:7] != litedramcore_bankmachine3_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine3_auto_precharge <= (litedramcore_bankmachine3_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine3_syncfifo3_din = {litedramcore_bankmachine3_fifo_in_last, litedramcore_bankmachine3_fifo_in_first, litedramcore_bankmachine3_fifo_in_payload_addr, litedramcore_bankmachine3_fifo_in_payload_we};
assign {litedramcore_bankmachine3_fifo_out_last, litedramcore_bankmachine3_fifo_out_first, litedramcore_bankmachine3_fifo_out_payload_addr, litedramcore_bankmachine3_fifo_out_payload_we} = litedramcore_bankmachine3_syncfifo3_dout;
assign {litedramcore_bankmachine3_fifo_out_last, litedramcore_bankmachine3_fifo_out_first, litedramcore_bankmachine3_fifo_out_payload_addr, litedramcore_bankmachine3_fifo_out_payload_we} = litedramcore_bankmachine3_syncfifo3_dout;
assign {litedramcore_bankmachine3_fifo_out_last, litedramcore_bankmachine3_fifo_out_first, litedramcore_bankmachine3_fifo_out_payload_addr, litedramcore_bankmachine3_fifo_out_payload_we} = litedramcore_bankmachine3_syncfifo3_dout;
assign {litedramcore_bankmachine3_fifo_out_last, litedramcore_bankmachine3_fifo_out_first, litedramcore_bankmachine3_fifo_out_payload_addr, litedramcore_bankmachine3_fifo_out_payload_we} = litedramcore_bankmachine3_syncfifo3_dout;
assign litedramcore_bankmachine3_sink_ready = litedramcore_bankmachine3_syncfifo3_writable;
assign litedramcore_bankmachine3_syncfifo3_we = litedramcore_bankmachine3_sink_valid;
assign litedramcore_bankmachine3_fifo_in_first = litedramcore_bankmachine3_sink_first;
assign litedramcore_bankmachine3_fifo_in_last = litedramcore_bankmachine3_sink_last;
assign litedramcore_bankmachine3_fifo_in_payload_we = litedramcore_bankmachine3_sink_payload_we;
assign litedramcore_bankmachine3_fifo_in_payload_addr = litedramcore_bankmachine3_sink_payload_addr;
assign litedramcore_bankmachine3_source_valid = litedramcore_bankmachine3_syncfifo3_readable;
assign litedramcore_bankmachine3_source_first = litedramcore_bankmachine3_fifo_out_first;
assign litedramcore_bankmachine3_source_last = litedramcore_bankmachine3_fifo_out_last;
assign litedramcore_bankmachine3_source_payload_we = litedramcore_bankmachine3_fifo_out_payload_we;
assign litedramcore_bankmachine3_source_payload_addr = litedramcore_bankmachine3_fifo_out_payload_addr;
assign litedramcore_bankmachine3_syncfifo3_re = litedramcore_bankmachine3_source_ready;
always @(*) begin
    litedramcore_bankmachine3_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine3_replace) begin
        litedramcore_bankmachine3_wrport_adr <= (litedramcore_bankmachine3_produce - 1'd1);
    end else begin
        litedramcore_bankmachine3_wrport_adr <= litedramcore_bankmachine3_produce;
    end
end
assign litedramcore_bankmachine3_wrport_dat_w = litedramcore_bankmachine3_syncfifo3_din;
assign litedramcore_bankmachine3_wrport_we = (litedramcore_bankmachine3_syncfifo3_we & (litedramcore_bankmachine3_syncfifo3_writable | litedramcore_bankmachine3_replace));
assign litedramcore_bankmachine3_do_read = (litedramcore_bankmachine3_syncfifo3_readable & litedramcore_bankmachine3_syncfifo3_re);
assign litedramcore_bankmachine3_rdport_adr = litedramcore_bankmachine3_consume;
assign litedramcore_bankmachine3_syncfifo3_dout = litedramcore_bankmachine3_rdport_dat_r;
assign litedramcore_bankmachine3_syncfifo3_writable = (litedramcore_bankmachine3_level != 5'd16);
assign litedramcore_bankmachine3_syncfifo3_readable = (litedramcore_bankmachine3_level != 1'd0);
assign litedramcore_bankmachine3_pipe_valid_sink_ready = ((~litedramcore_bankmachine3_pipe_valid_source_valid) | litedramcore_bankmachine3_pipe_valid_source_ready);
assign litedramcore_bankmachine3_pipe_valid_sink_valid = litedramcore_bankmachine3_sink_sink_valid;
assign litedramcore_bankmachine3_sink_sink_ready = litedramcore_bankmachine3_pipe_valid_sink_ready;
assign litedramcore_bankmachine3_pipe_valid_sink_first = litedramcore_bankmachine3_sink_sink_first;
assign litedramcore_bankmachine3_pipe_valid_sink_last = litedramcore_bankmachine3_sink_sink_last;
assign litedramcore_bankmachine3_pipe_valid_sink_payload_we = litedramcore_bankmachine3_sink_sink_payload_we;
assign litedramcore_bankmachine3_pipe_valid_sink_payload_addr = litedramcore_bankmachine3_sink_sink_payload_addr;
assign litedramcore_bankmachine3_source_source_valid = litedramcore_bankmachine3_pipe_valid_source_valid;
assign litedramcore_bankmachine3_pipe_valid_source_ready = litedramcore_bankmachine3_source_source_ready;
assign litedramcore_bankmachine3_source_source_first = litedramcore_bankmachine3_pipe_valid_source_first;
assign litedramcore_bankmachine3_source_source_last = litedramcore_bankmachine3_pipe_valid_source_last;
assign litedramcore_bankmachine3_source_source_payload_we = litedramcore_bankmachine3_pipe_valid_source_payload_we;
assign litedramcore_bankmachine3_source_source_payload_addr = litedramcore_bankmachine3_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine3_next_state <= 4'd0;
    litedramcore_bankmachine3_next_state <= litedramcore_bankmachine3_state;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
            if ((litedramcore_bankmachine3_twtpcon_ready & litedramcore_bankmachine3_trascon_ready)) begin
                if (litedramcore_bankmachine3_cmd_ready) begin
                    litedramcore_bankmachine3_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine3_twtpcon_ready & litedramcore_bankmachine3_trascon_ready)) begin
                litedramcore_bankmachine3_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine3_trccon_ready) begin
                if (litedramcore_bankmachine3_cmd_ready) begin
                    litedramcore_bankmachine3_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine3_refresh_req)) begin
                litedramcore_bankmachine3_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine3_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine3_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine3_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine3_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
                litedramcore_bankmachine3_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            if ((litedramcore_bankmachine3_cmd_ready & litedramcore_bankmachine3_auto_precharge)) begin
                                litedramcore_bankmachine3_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine3_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine3_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
            if ((litedramcore_bankmachine3_twtpcon_ready & litedramcore_bankmachine3_trascon_ready)) begin
                litedramcore_bankmachine3_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine3_trccon_ready) begin
                litedramcore_bankmachine3_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
            if ((litedramcore_bankmachine3_twtpcon_ready & litedramcore_bankmachine3_trascon_ready)) begin
                litedramcore_bankmachine3_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            if (litedramcore_bankmachine3_source_source_payload_we) begin
                                litedramcore_bankmachine3_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
            if ((litedramcore_bankmachine3_twtpcon_ready & litedramcore_bankmachine3_trascon_ready)) begin
                litedramcore_bankmachine3_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine3_trccon_ready) begin
                litedramcore_bankmachine3_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine3_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            if (litedramcore_bankmachine3_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine3_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            if (litedramcore_bankmachine3_source_source_payload_we) begin
                                litedramcore_bankmachine3_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            if (litedramcore_bankmachine3_source_source_payload_we) begin
                                litedramcore_bankmachine3_req_wdata_ready <= litedramcore_bankmachine3_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            if (litedramcore_bankmachine3_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine3_req_rdata_valid <= litedramcore_bankmachine3_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine3_twtpcon_ready) begin
                litedramcore_bankmachine3_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_row_open <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine3_trccon_ready) begin
                litedramcore_bankmachine3_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
            if ((litedramcore_bankmachine3_twtpcon_ready & litedramcore_bankmachine3_trascon_ready)) begin
                litedramcore_bankmachine3_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine3_trccon_ready) begin
                litedramcore_bankmachine3_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            litedramcore_bankmachine3_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_row_close <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
            litedramcore_bankmachine3_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine3_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine3_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine3_trccon_ready) begin
                litedramcore_bankmachine3_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine3_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine3_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine3_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine3_source_source_valid) begin
                    if (litedramcore_bankmachine3_row_opened) begin
                        if (litedramcore_bankmachine3_row_hit) begin
                            litedramcore_bankmachine3_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
assign litedramcore_bankmachine4_sink_valid = litedramcore_bankmachine4_req_valid;
assign litedramcore_bankmachine4_req_ready = litedramcore_bankmachine4_sink_ready;
assign litedramcore_bankmachine4_sink_payload_we = litedramcore_bankmachine4_req_we;
assign litedramcore_bankmachine4_sink_payload_addr = litedramcore_bankmachine4_req_addr;
assign litedramcore_bankmachine4_sink_sink_valid = litedramcore_bankmachine4_source_valid;
assign litedramcore_bankmachine4_source_ready = litedramcore_bankmachine4_sink_sink_ready;
assign litedramcore_bankmachine4_sink_sink_first = litedramcore_bankmachine4_source_first;
assign litedramcore_bankmachine4_sink_sink_last = litedramcore_bankmachine4_source_last;
assign litedramcore_bankmachine4_sink_sink_payload_we = litedramcore_bankmachine4_source_payload_we;
assign litedramcore_bankmachine4_sink_sink_payload_addr = litedramcore_bankmachine4_source_payload_addr;
assign litedramcore_bankmachine4_source_source_ready = (litedramcore_bankmachine4_req_wdata_ready | litedramcore_bankmachine4_req_rdata_valid);
assign litedramcore_bankmachine4_req_lock = (litedramcore_bankmachine4_source_valid | litedramcore_bankmachine4_source_source_valid);
assign litedramcore_bankmachine4_row_hit = (litedramcore_bankmachine4_row == litedramcore_bankmachine4_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine4_cmd_payload_ba = 3'd4;
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine4_row_col_n_addr_sel) begin
        litedramcore_bankmachine4_cmd_payload_a <= litedramcore_bankmachine4_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine4_cmd_payload_a <= ((litedramcore_bankmachine4_auto_precharge <<< 4'd10) | {litedramcore_bankmachine4_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine4_twtpcon_valid = ((litedramcore_bankmachine4_cmd_valid & litedramcore_bankmachine4_cmd_ready) & litedramcore_bankmachine4_cmd_payload_is_write);
assign litedramcore_bankmachine4_trccon_valid = ((litedramcore_bankmachine4_cmd_valid & litedramcore_bankmachine4_cmd_ready) & litedramcore_bankmachine4_row_open);
assign litedramcore_bankmachine4_trascon_valid = ((litedramcore_bankmachine4_cmd_valid & litedramcore_bankmachine4_cmd_ready) & litedramcore_bankmachine4_row_open);
always @(*) begin
    litedramcore_bankmachine4_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine4_source_valid & litedramcore_bankmachine4_source_source_valid)) begin
        if ((litedramcore_bankmachine4_source_payload_addr[21:7] != litedramcore_bankmachine4_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine4_auto_precharge <= (litedramcore_bankmachine4_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine4_syncfifo4_din = {litedramcore_bankmachine4_fifo_in_last, litedramcore_bankmachine4_fifo_in_first, litedramcore_bankmachine4_fifo_in_payload_addr, litedramcore_bankmachine4_fifo_in_payload_we};
assign {litedramcore_bankmachine4_fifo_out_last, litedramcore_bankmachine4_fifo_out_first, litedramcore_bankmachine4_fifo_out_payload_addr, litedramcore_bankmachine4_fifo_out_payload_we} = litedramcore_bankmachine4_syncfifo4_dout;
assign {litedramcore_bankmachine4_fifo_out_last, litedramcore_bankmachine4_fifo_out_first, litedramcore_bankmachine4_fifo_out_payload_addr, litedramcore_bankmachine4_fifo_out_payload_we} = litedramcore_bankmachine4_syncfifo4_dout;
assign {litedramcore_bankmachine4_fifo_out_last, litedramcore_bankmachine4_fifo_out_first, litedramcore_bankmachine4_fifo_out_payload_addr, litedramcore_bankmachine4_fifo_out_payload_we} = litedramcore_bankmachine4_syncfifo4_dout;
assign {litedramcore_bankmachine4_fifo_out_last, litedramcore_bankmachine4_fifo_out_first, litedramcore_bankmachine4_fifo_out_payload_addr, litedramcore_bankmachine4_fifo_out_payload_we} = litedramcore_bankmachine4_syncfifo4_dout;
assign litedramcore_bankmachine4_sink_ready = litedramcore_bankmachine4_syncfifo4_writable;
assign litedramcore_bankmachine4_syncfifo4_we = litedramcore_bankmachine4_sink_valid;
assign litedramcore_bankmachine4_fifo_in_first = litedramcore_bankmachine4_sink_first;
assign litedramcore_bankmachine4_fifo_in_last = litedramcore_bankmachine4_sink_last;
assign litedramcore_bankmachine4_fifo_in_payload_we = litedramcore_bankmachine4_sink_payload_we;
assign litedramcore_bankmachine4_fifo_in_payload_addr = litedramcore_bankmachine4_sink_payload_addr;
assign litedramcore_bankmachine4_source_valid = litedramcore_bankmachine4_syncfifo4_readable;
assign litedramcore_bankmachine4_source_first = litedramcore_bankmachine4_fifo_out_first;
assign litedramcore_bankmachine4_source_last = litedramcore_bankmachine4_fifo_out_last;
assign litedramcore_bankmachine4_source_payload_we = litedramcore_bankmachine4_fifo_out_payload_we;
assign litedramcore_bankmachine4_source_payload_addr = litedramcore_bankmachine4_fifo_out_payload_addr;
assign litedramcore_bankmachine4_syncfifo4_re = litedramcore_bankmachine4_source_ready;
always @(*) begin
    litedramcore_bankmachine4_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine4_replace) begin
        litedramcore_bankmachine4_wrport_adr <= (litedramcore_bankmachine4_produce - 1'd1);
    end else begin
        litedramcore_bankmachine4_wrport_adr <= litedramcore_bankmachine4_produce;
    end
end
assign litedramcore_bankmachine4_wrport_dat_w = litedramcore_bankmachine4_syncfifo4_din;
assign litedramcore_bankmachine4_wrport_we = (litedramcore_bankmachine4_syncfifo4_we & (litedramcore_bankmachine4_syncfifo4_writable | litedramcore_bankmachine4_replace));
assign litedramcore_bankmachine4_do_read = (litedramcore_bankmachine4_syncfifo4_readable & litedramcore_bankmachine4_syncfifo4_re);
assign litedramcore_bankmachine4_rdport_adr = litedramcore_bankmachine4_consume;
assign litedramcore_bankmachine4_syncfifo4_dout = litedramcore_bankmachine4_rdport_dat_r;
assign litedramcore_bankmachine4_syncfifo4_writable = (litedramcore_bankmachine4_level != 5'd16);
assign litedramcore_bankmachine4_syncfifo4_readable = (litedramcore_bankmachine4_level != 1'd0);
assign litedramcore_bankmachine4_pipe_valid_sink_ready = ((~litedramcore_bankmachine4_pipe_valid_source_valid) | litedramcore_bankmachine4_pipe_valid_source_ready);
assign litedramcore_bankmachine4_pipe_valid_sink_valid = litedramcore_bankmachine4_sink_sink_valid;
assign litedramcore_bankmachine4_sink_sink_ready = litedramcore_bankmachine4_pipe_valid_sink_ready;
assign litedramcore_bankmachine4_pipe_valid_sink_first = litedramcore_bankmachine4_sink_sink_first;
assign litedramcore_bankmachine4_pipe_valid_sink_last = litedramcore_bankmachine4_sink_sink_last;
assign litedramcore_bankmachine4_pipe_valid_sink_payload_we = litedramcore_bankmachine4_sink_sink_payload_we;
assign litedramcore_bankmachine4_pipe_valid_sink_payload_addr = litedramcore_bankmachine4_sink_sink_payload_addr;
assign litedramcore_bankmachine4_source_source_valid = litedramcore_bankmachine4_pipe_valid_source_valid;
assign litedramcore_bankmachine4_pipe_valid_source_ready = litedramcore_bankmachine4_source_source_ready;
assign litedramcore_bankmachine4_source_source_first = litedramcore_bankmachine4_pipe_valid_source_first;
assign litedramcore_bankmachine4_source_source_last = litedramcore_bankmachine4_pipe_valid_source_last;
assign litedramcore_bankmachine4_source_source_payload_we = litedramcore_bankmachine4_pipe_valid_source_payload_we;
assign litedramcore_bankmachine4_source_source_payload_addr = litedramcore_bankmachine4_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine4_next_state <= 4'd0;
    litedramcore_bankmachine4_next_state <= litedramcore_bankmachine4_state;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
            if ((litedramcore_bankmachine4_twtpcon_ready & litedramcore_bankmachine4_trascon_ready)) begin
                if (litedramcore_bankmachine4_cmd_ready) begin
                    litedramcore_bankmachine4_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine4_twtpcon_ready & litedramcore_bankmachine4_trascon_ready)) begin
                litedramcore_bankmachine4_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine4_trccon_ready) begin
                if (litedramcore_bankmachine4_cmd_ready) begin
                    litedramcore_bankmachine4_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine4_refresh_req)) begin
                litedramcore_bankmachine4_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine4_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine4_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine4_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine4_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
                litedramcore_bankmachine4_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            if ((litedramcore_bankmachine4_cmd_ready & litedramcore_bankmachine4_auto_precharge)) begin
                                litedramcore_bankmachine4_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine4_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine4_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            if (litedramcore_bankmachine4_source_source_payload_we) begin
                                litedramcore_bankmachine4_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            if (litedramcore_bankmachine4_source_source_payload_we) begin
                                litedramcore_bankmachine4_req_wdata_ready <= litedramcore_bankmachine4_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            if (litedramcore_bankmachine4_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine4_req_rdata_valid <= litedramcore_bankmachine4_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine4_twtpcon_ready) begin
                litedramcore_bankmachine4_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_row_open <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine4_trccon_ready) begin
                litedramcore_bankmachine4_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
            if ((litedramcore_bankmachine4_twtpcon_ready & litedramcore_bankmachine4_trascon_ready)) begin
                litedramcore_bankmachine4_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine4_trccon_ready) begin
                litedramcore_bankmachine4_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            litedramcore_bankmachine4_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_row_close <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
            litedramcore_bankmachine4_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine4_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine4_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine4_trccon_ready) begin
                litedramcore_bankmachine4_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            litedramcore_bankmachine4_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
            if ((litedramcore_bankmachine4_twtpcon_ready & litedramcore_bankmachine4_trascon_ready)) begin
                litedramcore_bankmachine4_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine4_trccon_ready) begin
                litedramcore_bankmachine4_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
            if ((litedramcore_bankmachine4_twtpcon_ready & litedramcore_bankmachine4_trascon_ready)) begin
                litedramcore_bankmachine4_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            if (litedramcore_bankmachine4_source_source_payload_we) begin
                                litedramcore_bankmachine4_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
            if ((litedramcore_bankmachine4_twtpcon_ready & litedramcore_bankmachine4_trascon_ready)) begin
                litedramcore_bankmachine4_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine4_trccon_ready) begin
                litedramcore_bankmachine4_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine4_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine4_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine4_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine4_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine4_source_source_valid) begin
                    if (litedramcore_bankmachine4_row_opened) begin
                        if (litedramcore_bankmachine4_row_hit) begin
                            if (litedramcore_bankmachine4_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine4_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
assign litedramcore_bankmachine5_sink_valid = litedramcore_bankmachine5_req_valid;
assign litedramcore_bankmachine5_req_ready = litedramcore_bankmachine5_sink_ready;
assign litedramcore_bankmachine5_sink_payload_we = litedramcore_bankmachine5_req_we;
assign litedramcore_bankmachine5_sink_payload_addr = litedramcore_bankmachine5_req_addr;
assign litedramcore_bankmachine5_sink_sink_valid = litedramcore_bankmachine5_source_valid;
assign litedramcore_bankmachine5_source_ready = litedramcore_bankmachine5_sink_sink_ready;
assign litedramcore_bankmachine5_sink_sink_first = litedramcore_bankmachine5_source_first;
assign litedramcore_bankmachine5_sink_sink_last = litedramcore_bankmachine5_source_last;
assign litedramcore_bankmachine5_sink_sink_payload_we = litedramcore_bankmachine5_source_payload_we;
assign litedramcore_bankmachine5_sink_sink_payload_addr = litedramcore_bankmachine5_source_payload_addr;
assign litedramcore_bankmachine5_source_source_ready = (litedramcore_bankmachine5_req_wdata_ready | litedramcore_bankmachine5_req_rdata_valid);
assign litedramcore_bankmachine5_req_lock = (litedramcore_bankmachine5_source_valid | litedramcore_bankmachine5_source_source_valid);
assign litedramcore_bankmachine5_row_hit = (litedramcore_bankmachine5_row == litedramcore_bankmachine5_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine5_cmd_payload_ba = 3'd5;
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine5_row_col_n_addr_sel) begin
        litedramcore_bankmachine5_cmd_payload_a <= litedramcore_bankmachine5_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine5_cmd_payload_a <= ((litedramcore_bankmachine5_auto_precharge <<< 4'd10) | {litedramcore_bankmachine5_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine5_twtpcon_valid = ((litedramcore_bankmachine5_cmd_valid & litedramcore_bankmachine5_cmd_ready) & litedramcore_bankmachine5_cmd_payload_is_write);
assign litedramcore_bankmachine5_trccon_valid = ((litedramcore_bankmachine5_cmd_valid & litedramcore_bankmachine5_cmd_ready) & litedramcore_bankmachine5_row_open);
assign litedramcore_bankmachine5_trascon_valid = ((litedramcore_bankmachine5_cmd_valid & litedramcore_bankmachine5_cmd_ready) & litedramcore_bankmachine5_row_open);
always @(*) begin
    litedramcore_bankmachine5_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine5_source_valid & litedramcore_bankmachine5_source_source_valid)) begin
        if ((litedramcore_bankmachine5_source_payload_addr[21:7] != litedramcore_bankmachine5_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine5_auto_precharge <= (litedramcore_bankmachine5_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine5_syncfifo5_din = {litedramcore_bankmachine5_fifo_in_last, litedramcore_bankmachine5_fifo_in_first, litedramcore_bankmachine5_fifo_in_payload_addr, litedramcore_bankmachine5_fifo_in_payload_we};
assign {litedramcore_bankmachine5_fifo_out_last, litedramcore_bankmachine5_fifo_out_first, litedramcore_bankmachine5_fifo_out_payload_addr, litedramcore_bankmachine5_fifo_out_payload_we} = litedramcore_bankmachine5_syncfifo5_dout;
assign {litedramcore_bankmachine5_fifo_out_last, litedramcore_bankmachine5_fifo_out_first, litedramcore_bankmachine5_fifo_out_payload_addr, litedramcore_bankmachine5_fifo_out_payload_we} = litedramcore_bankmachine5_syncfifo5_dout;
assign {litedramcore_bankmachine5_fifo_out_last, litedramcore_bankmachine5_fifo_out_first, litedramcore_bankmachine5_fifo_out_payload_addr, litedramcore_bankmachine5_fifo_out_payload_we} = litedramcore_bankmachine5_syncfifo5_dout;
assign {litedramcore_bankmachine5_fifo_out_last, litedramcore_bankmachine5_fifo_out_first, litedramcore_bankmachine5_fifo_out_payload_addr, litedramcore_bankmachine5_fifo_out_payload_we} = litedramcore_bankmachine5_syncfifo5_dout;
assign litedramcore_bankmachine5_sink_ready = litedramcore_bankmachine5_syncfifo5_writable;
assign litedramcore_bankmachine5_syncfifo5_we = litedramcore_bankmachine5_sink_valid;
assign litedramcore_bankmachine5_fifo_in_first = litedramcore_bankmachine5_sink_first;
assign litedramcore_bankmachine5_fifo_in_last = litedramcore_bankmachine5_sink_last;
assign litedramcore_bankmachine5_fifo_in_payload_we = litedramcore_bankmachine5_sink_payload_we;
assign litedramcore_bankmachine5_fifo_in_payload_addr = litedramcore_bankmachine5_sink_payload_addr;
assign litedramcore_bankmachine5_source_valid = litedramcore_bankmachine5_syncfifo5_readable;
assign litedramcore_bankmachine5_source_first = litedramcore_bankmachine5_fifo_out_first;
assign litedramcore_bankmachine5_source_last = litedramcore_bankmachine5_fifo_out_last;
assign litedramcore_bankmachine5_source_payload_we = litedramcore_bankmachine5_fifo_out_payload_we;
assign litedramcore_bankmachine5_source_payload_addr = litedramcore_bankmachine5_fifo_out_payload_addr;
assign litedramcore_bankmachine5_syncfifo5_re = litedramcore_bankmachine5_source_ready;
always @(*) begin
    litedramcore_bankmachine5_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine5_replace) begin
        litedramcore_bankmachine5_wrport_adr <= (litedramcore_bankmachine5_produce - 1'd1);
    end else begin
        litedramcore_bankmachine5_wrport_adr <= litedramcore_bankmachine5_produce;
    end
end
assign litedramcore_bankmachine5_wrport_dat_w = litedramcore_bankmachine5_syncfifo5_din;
assign litedramcore_bankmachine5_wrport_we = (litedramcore_bankmachine5_syncfifo5_we & (litedramcore_bankmachine5_syncfifo5_writable | litedramcore_bankmachine5_replace));
assign litedramcore_bankmachine5_do_read = (litedramcore_bankmachine5_syncfifo5_readable & litedramcore_bankmachine5_syncfifo5_re);
assign litedramcore_bankmachine5_rdport_adr = litedramcore_bankmachine5_consume;
assign litedramcore_bankmachine5_syncfifo5_dout = litedramcore_bankmachine5_rdport_dat_r;
assign litedramcore_bankmachine5_syncfifo5_writable = (litedramcore_bankmachine5_level != 5'd16);
assign litedramcore_bankmachine5_syncfifo5_readable = (litedramcore_bankmachine5_level != 1'd0);
assign litedramcore_bankmachine5_pipe_valid_sink_ready = ((~litedramcore_bankmachine5_pipe_valid_source_valid) | litedramcore_bankmachine5_pipe_valid_source_ready);
assign litedramcore_bankmachine5_pipe_valid_sink_valid = litedramcore_bankmachine5_sink_sink_valid;
assign litedramcore_bankmachine5_sink_sink_ready = litedramcore_bankmachine5_pipe_valid_sink_ready;
assign litedramcore_bankmachine5_pipe_valid_sink_first = litedramcore_bankmachine5_sink_sink_first;
assign litedramcore_bankmachine5_pipe_valid_sink_last = litedramcore_bankmachine5_sink_sink_last;
assign litedramcore_bankmachine5_pipe_valid_sink_payload_we = litedramcore_bankmachine5_sink_sink_payload_we;
assign litedramcore_bankmachine5_pipe_valid_sink_payload_addr = litedramcore_bankmachine5_sink_sink_payload_addr;
assign litedramcore_bankmachine5_source_source_valid = litedramcore_bankmachine5_pipe_valid_source_valid;
assign litedramcore_bankmachine5_pipe_valid_source_ready = litedramcore_bankmachine5_source_source_ready;
assign litedramcore_bankmachine5_source_source_first = litedramcore_bankmachine5_pipe_valid_source_first;
assign litedramcore_bankmachine5_source_source_last = litedramcore_bankmachine5_pipe_valid_source_last;
assign litedramcore_bankmachine5_source_source_payload_we = litedramcore_bankmachine5_pipe_valid_source_payload_we;
assign litedramcore_bankmachine5_source_source_payload_addr = litedramcore_bankmachine5_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine5_next_state <= 4'd0;
    litedramcore_bankmachine5_next_state <= litedramcore_bankmachine5_state;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
            if ((litedramcore_bankmachine5_twtpcon_ready & litedramcore_bankmachine5_trascon_ready)) begin
                if (litedramcore_bankmachine5_cmd_ready) begin
                    litedramcore_bankmachine5_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine5_twtpcon_ready & litedramcore_bankmachine5_trascon_ready)) begin
                litedramcore_bankmachine5_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine5_trccon_ready) begin
                if (litedramcore_bankmachine5_cmd_ready) begin
                    litedramcore_bankmachine5_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine5_refresh_req)) begin
                litedramcore_bankmachine5_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine5_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine5_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine5_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine5_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
                litedramcore_bankmachine5_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            if ((litedramcore_bankmachine5_cmd_ready & litedramcore_bankmachine5_auto_precharge)) begin
                                litedramcore_bankmachine5_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine5_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine5_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_row_open <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine5_trccon_ready) begin
                litedramcore_bankmachine5_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
            if ((litedramcore_bankmachine5_twtpcon_ready & litedramcore_bankmachine5_trascon_ready)) begin
                litedramcore_bankmachine5_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine5_trccon_ready) begin
                litedramcore_bankmachine5_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            litedramcore_bankmachine5_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_row_close <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
            litedramcore_bankmachine5_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine5_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine5_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine5_twtpcon_ready) begin
                litedramcore_bankmachine5_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine5_trccon_ready) begin
                litedramcore_bankmachine5_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            litedramcore_bankmachine5_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
            if ((litedramcore_bankmachine5_twtpcon_ready & litedramcore_bankmachine5_trascon_ready)) begin
                litedramcore_bankmachine5_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine5_trccon_ready) begin
                litedramcore_bankmachine5_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
            if ((litedramcore_bankmachine5_twtpcon_ready & litedramcore_bankmachine5_trascon_ready)) begin
                litedramcore_bankmachine5_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            if (litedramcore_bankmachine5_source_source_payload_we) begin
                                litedramcore_bankmachine5_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
            if ((litedramcore_bankmachine5_twtpcon_ready & litedramcore_bankmachine5_trascon_ready)) begin
                litedramcore_bankmachine5_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine5_trccon_ready) begin
                litedramcore_bankmachine5_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine5_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            if (litedramcore_bankmachine5_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine5_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            if (litedramcore_bankmachine5_source_source_payload_we) begin
                                litedramcore_bankmachine5_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            if (litedramcore_bankmachine5_source_source_payload_we) begin
                                litedramcore_bankmachine5_req_wdata_ready <= litedramcore_bankmachine5_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine5_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine5_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine5_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine5_source_source_valid) begin
                    if (litedramcore_bankmachine5_row_opened) begin
                        if (litedramcore_bankmachine5_row_hit) begin
                            if (litedramcore_bankmachine5_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine5_req_rdata_valid <= litedramcore_bankmachine5_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
assign litedramcore_bankmachine6_sink_valid = litedramcore_bankmachine6_req_valid;
assign litedramcore_bankmachine6_req_ready = litedramcore_bankmachine6_sink_ready;
assign litedramcore_bankmachine6_sink_payload_we = litedramcore_bankmachine6_req_we;
assign litedramcore_bankmachine6_sink_payload_addr = litedramcore_bankmachine6_req_addr;
assign litedramcore_bankmachine6_sink_sink_valid = litedramcore_bankmachine6_source_valid;
assign litedramcore_bankmachine6_source_ready = litedramcore_bankmachine6_sink_sink_ready;
assign litedramcore_bankmachine6_sink_sink_first = litedramcore_bankmachine6_source_first;
assign litedramcore_bankmachine6_sink_sink_last = litedramcore_bankmachine6_source_last;
assign litedramcore_bankmachine6_sink_sink_payload_we = litedramcore_bankmachine6_source_payload_we;
assign litedramcore_bankmachine6_sink_sink_payload_addr = litedramcore_bankmachine6_source_payload_addr;
assign litedramcore_bankmachine6_source_source_ready = (litedramcore_bankmachine6_req_wdata_ready | litedramcore_bankmachine6_req_rdata_valid);
assign litedramcore_bankmachine6_req_lock = (litedramcore_bankmachine6_source_valid | litedramcore_bankmachine6_source_source_valid);
assign litedramcore_bankmachine6_row_hit = (litedramcore_bankmachine6_row == litedramcore_bankmachine6_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine6_cmd_payload_ba = 3'd6;
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine6_row_col_n_addr_sel) begin
        litedramcore_bankmachine6_cmd_payload_a <= litedramcore_bankmachine6_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine6_cmd_payload_a <= ((litedramcore_bankmachine6_auto_precharge <<< 4'd10) | {litedramcore_bankmachine6_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine6_twtpcon_valid = ((litedramcore_bankmachine6_cmd_valid & litedramcore_bankmachine6_cmd_ready) & litedramcore_bankmachine6_cmd_payload_is_write);
assign litedramcore_bankmachine6_trccon_valid = ((litedramcore_bankmachine6_cmd_valid & litedramcore_bankmachine6_cmd_ready) & litedramcore_bankmachine6_row_open);
assign litedramcore_bankmachine6_trascon_valid = ((litedramcore_bankmachine6_cmd_valid & litedramcore_bankmachine6_cmd_ready) & litedramcore_bankmachine6_row_open);
always @(*) begin
    litedramcore_bankmachine6_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine6_source_valid & litedramcore_bankmachine6_source_source_valid)) begin
        if ((litedramcore_bankmachine6_source_payload_addr[21:7] != litedramcore_bankmachine6_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine6_auto_precharge <= (litedramcore_bankmachine6_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine6_syncfifo6_din = {litedramcore_bankmachine6_fifo_in_last, litedramcore_bankmachine6_fifo_in_first, litedramcore_bankmachine6_fifo_in_payload_addr, litedramcore_bankmachine6_fifo_in_payload_we};
assign {litedramcore_bankmachine6_fifo_out_last, litedramcore_bankmachine6_fifo_out_first, litedramcore_bankmachine6_fifo_out_payload_addr, litedramcore_bankmachine6_fifo_out_payload_we} = litedramcore_bankmachine6_syncfifo6_dout;
assign {litedramcore_bankmachine6_fifo_out_last, litedramcore_bankmachine6_fifo_out_first, litedramcore_bankmachine6_fifo_out_payload_addr, litedramcore_bankmachine6_fifo_out_payload_we} = litedramcore_bankmachine6_syncfifo6_dout;
assign {litedramcore_bankmachine6_fifo_out_last, litedramcore_bankmachine6_fifo_out_first, litedramcore_bankmachine6_fifo_out_payload_addr, litedramcore_bankmachine6_fifo_out_payload_we} = litedramcore_bankmachine6_syncfifo6_dout;
assign {litedramcore_bankmachine6_fifo_out_last, litedramcore_bankmachine6_fifo_out_first, litedramcore_bankmachine6_fifo_out_payload_addr, litedramcore_bankmachine6_fifo_out_payload_we} = litedramcore_bankmachine6_syncfifo6_dout;
assign litedramcore_bankmachine6_sink_ready = litedramcore_bankmachine6_syncfifo6_writable;
assign litedramcore_bankmachine6_syncfifo6_we = litedramcore_bankmachine6_sink_valid;
assign litedramcore_bankmachine6_fifo_in_first = litedramcore_bankmachine6_sink_first;
assign litedramcore_bankmachine6_fifo_in_last = litedramcore_bankmachine6_sink_last;
assign litedramcore_bankmachine6_fifo_in_payload_we = litedramcore_bankmachine6_sink_payload_we;
assign litedramcore_bankmachine6_fifo_in_payload_addr = litedramcore_bankmachine6_sink_payload_addr;
assign litedramcore_bankmachine6_source_valid = litedramcore_bankmachine6_syncfifo6_readable;
assign litedramcore_bankmachine6_source_first = litedramcore_bankmachine6_fifo_out_first;
assign litedramcore_bankmachine6_source_last = litedramcore_bankmachine6_fifo_out_last;
assign litedramcore_bankmachine6_source_payload_we = litedramcore_bankmachine6_fifo_out_payload_we;
assign litedramcore_bankmachine6_source_payload_addr = litedramcore_bankmachine6_fifo_out_payload_addr;
assign litedramcore_bankmachine6_syncfifo6_re = litedramcore_bankmachine6_source_ready;
always @(*) begin
    litedramcore_bankmachine6_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine6_replace) begin
        litedramcore_bankmachine6_wrport_adr <= (litedramcore_bankmachine6_produce - 1'd1);
    end else begin
        litedramcore_bankmachine6_wrport_adr <= litedramcore_bankmachine6_produce;
    end
end
assign litedramcore_bankmachine6_wrport_dat_w = litedramcore_bankmachine6_syncfifo6_din;
assign litedramcore_bankmachine6_wrport_we = (litedramcore_bankmachine6_syncfifo6_we & (litedramcore_bankmachine6_syncfifo6_writable | litedramcore_bankmachine6_replace));
assign litedramcore_bankmachine6_do_read = (litedramcore_bankmachine6_syncfifo6_readable & litedramcore_bankmachine6_syncfifo6_re);
assign litedramcore_bankmachine6_rdport_adr = litedramcore_bankmachine6_consume;
assign litedramcore_bankmachine6_syncfifo6_dout = litedramcore_bankmachine6_rdport_dat_r;
assign litedramcore_bankmachine6_syncfifo6_writable = (litedramcore_bankmachine6_level != 5'd16);
assign litedramcore_bankmachine6_syncfifo6_readable = (litedramcore_bankmachine6_level != 1'd0);
assign litedramcore_bankmachine6_pipe_valid_sink_ready = ((~litedramcore_bankmachine6_pipe_valid_source_valid) | litedramcore_bankmachine6_pipe_valid_source_ready);
assign litedramcore_bankmachine6_pipe_valid_sink_valid = litedramcore_bankmachine6_sink_sink_valid;
assign litedramcore_bankmachine6_sink_sink_ready = litedramcore_bankmachine6_pipe_valid_sink_ready;
assign litedramcore_bankmachine6_pipe_valid_sink_first = litedramcore_bankmachine6_sink_sink_first;
assign litedramcore_bankmachine6_pipe_valid_sink_last = litedramcore_bankmachine6_sink_sink_last;
assign litedramcore_bankmachine6_pipe_valid_sink_payload_we = litedramcore_bankmachine6_sink_sink_payload_we;
assign litedramcore_bankmachine6_pipe_valid_sink_payload_addr = litedramcore_bankmachine6_sink_sink_payload_addr;
assign litedramcore_bankmachine6_source_source_valid = litedramcore_bankmachine6_pipe_valid_source_valid;
assign litedramcore_bankmachine6_pipe_valid_source_ready = litedramcore_bankmachine6_source_source_ready;
assign litedramcore_bankmachine6_source_source_first = litedramcore_bankmachine6_pipe_valid_source_first;
assign litedramcore_bankmachine6_source_source_last = litedramcore_bankmachine6_pipe_valid_source_last;
assign litedramcore_bankmachine6_source_source_payload_we = litedramcore_bankmachine6_pipe_valid_source_payload_we;
assign litedramcore_bankmachine6_source_source_payload_addr = litedramcore_bankmachine6_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine6_next_state <= 4'd0;
    litedramcore_bankmachine6_next_state <= litedramcore_bankmachine6_state;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
            if ((litedramcore_bankmachine6_twtpcon_ready & litedramcore_bankmachine6_trascon_ready)) begin
                if (litedramcore_bankmachine6_cmd_ready) begin
                    litedramcore_bankmachine6_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine6_twtpcon_ready & litedramcore_bankmachine6_trascon_ready)) begin
                litedramcore_bankmachine6_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine6_trccon_ready) begin
                if (litedramcore_bankmachine6_cmd_ready) begin
                    litedramcore_bankmachine6_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine6_refresh_req)) begin
                litedramcore_bankmachine6_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine6_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine6_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine6_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine6_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
                litedramcore_bankmachine6_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            if ((litedramcore_bankmachine6_cmd_ready & litedramcore_bankmachine6_auto_precharge)) begin
                                litedramcore_bankmachine6_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine6_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine6_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine6_trccon_ready) begin
                litedramcore_bankmachine6_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            litedramcore_bankmachine6_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
            if ((litedramcore_bankmachine6_twtpcon_ready & litedramcore_bankmachine6_trascon_ready)) begin
                litedramcore_bankmachine6_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine6_trccon_ready) begin
                litedramcore_bankmachine6_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
            if ((litedramcore_bankmachine6_twtpcon_ready & litedramcore_bankmachine6_trascon_ready)) begin
                litedramcore_bankmachine6_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            if (litedramcore_bankmachine6_source_source_payload_we) begin
                                litedramcore_bankmachine6_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
            if ((litedramcore_bankmachine6_twtpcon_ready & litedramcore_bankmachine6_trascon_ready)) begin
                litedramcore_bankmachine6_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine6_trccon_ready) begin
                litedramcore_bankmachine6_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine6_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            if (litedramcore_bankmachine6_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine6_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            if (litedramcore_bankmachine6_source_source_payload_we) begin
                                litedramcore_bankmachine6_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            if (litedramcore_bankmachine6_source_source_payload_we) begin
                                litedramcore_bankmachine6_req_wdata_ready <= litedramcore_bankmachine6_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            if (litedramcore_bankmachine6_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine6_req_rdata_valid <= litedramcore_bankmachine6_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine6_twtpcon_ready) begin
                litedramcore_bankmachine6_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_row_open <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine6_trccon_ready) begin
                litedramcore_bankmachine6_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
            if ((litedramcore_bankmachine6_twtpcon_ready & litedramcore_bankmachine6_trascon_ready)) begin
                litedramcore_bankmachine6_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine6_trccon_ready) begin
                litedramcore_bankmachine6_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine6_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine6_source_source_valid) begin
                    if (litedramcore_bankmachine6_row_opened) begin
                        if (litedramcore_bankmachine6_row_hit) begin
                            litedramcore_bankmachine6_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine6_row_close <= 1'd0;
    case (litedramcore_bankmachine6_state)
        1'd1: begin
            litedramcore_bankmachine6_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine6_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine6_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
assign litedramcore_bankmachine7_sink_valid = litedramcore_bankmachine7_req_valid;
assign litedramcore_bankmachine7_req_ready = litedramcore_bankmachine7_sink_ready;
assign litedramcore_bankmachine7_sink_payload_we = litedramcore_bankmachine7_req_we;
assign litedramcore_bankmachine7_sink_payload_addr = litedramcore_bankmachine7_req_addr;
assign litedramcore_bankmachine7_sink_sink_valid = litedramcore_bankmachine7_source_valid;
assign litedramcore_bankmachine7_source_ready = litedramcore_bankmachine7_sink_sink_ready;
assign litedramcore_bankmachine7_sink_sink_first = litedramcore_bankmachine7_source_first;
assign litedramcore_bankmachine7_sink_sink_last = litedramcore_bankmachine7_source_last;
assign litedramcore_bankmachine7_sink_sink_payload_we = litedramcore_bankmachine7_source_payload_we;
assign litedramcore_bankmachine7_sink_sink_payload_addr = litedramcore_bankmachine7_source_payload_addr;
assign litedramcore_bankmachine7_source_source_ready = (litedramcore_bankmachine7_req_wdata_ready | litedramcore_bankmachine7_req_rdata_valid);
assign litedramcore_bankmachine7_req_lock = (litedramcore_bankmachine7_source_valid | litedramcore_bankmachine7_source_source_valid);
assign litedramcore_bankmachine7_row_hit = (litedramcore_bankmachine7_row == litedramcore_bankmachine7_source_source_payload_addr[21:7]);
assign litedramcore_bankmachine7_cmd_payload_ba = 3'd7;
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_a <= 15'd0;
    if (litedramcore_bankmachine7_row_col_n_addr_sel) begin
        litedramcore_bankmachine7_cmd_payload_a <= litedramcore_bankmachine7_source_source_payload_addr[21:7];
    end else begin
        litedramcore_bankmachine7_cmd_payload_a <= ((litedramcore_bankmachine7_auto_precharge <<< 4'd10) | {litedramcore_bankmachine7_source_source_payload_addr[6:0], {3{1'd0}}});
    end
end
assign litedramcore_bankmachine7_twtpcon_valid = ((litedramcore_bankmachine7_cmd_valid & litedramcore_bankmachine7_cmd_ready) & litedramcore_bankmachine7_cmd_payload_is_write);
assign litedramcore_bankmachine7_trccon_valid = ((litedramcore_bankmachine7_cmd_valid & litedramcore_bankmachine7_cmd_ready) & litedramcore_bankmachine7_row_open);
assign litedramcore_bankmachine7_trascon_valid = ((litedramcore_bankmachine7_cmd_valid & litedramcore_bankmachine7_cmd_ready) & litedramcore_bankmachine7_row_open);
always @(*) begin
    litedramcore_bankmachine7_auto_precharge <= 1'd0;
    if ((litedramcore_bankmachine7_source_valid & litedramcore_bankmachine7_source_source_valid)) begin
        if ((litedramcore_bankmachine7_source_payload_addr[21:7] != litedramcore_bankmachine7_source_source_payload_addr[21:7])) begin
            litedramcore_bankmachine7_auto_precharge <= (litedramcore_bankmachine7_row_close == 1'd0);
        end
    end
end
assign litedramcore_bankmachine7_syncfifo7_din = {litedramcore_bankmachine7_fifo_in_last, litedramcore_bankmachine7_fifo_in_first, litedramcore_bankmachine7_fifo_in_payload_addr, litedramcore_bankmachine7_fifo_in_payload_we};
assign {litedramcore_bankmachine7_fifo_out_last, litedramcore_bankmachine7_fifo_out_first, litedramcore_bankmachine7_fifo_out_payload_addr, litedramcore_bankmachine7_fifo_out_payload_we} = litedramcore_bankmachine7_syncfifo7_dout;
assign {litedramcore_bankmachine7_fifo_out_last, litedramcore_bankmachine7_fifo_out_first, litedramcore_bankmachine7_fifo_out_payload_addr, litedramcore_bankmachine7_fifo_out_payload_we} = litedramcore_bankmachine7_syncfifo7_dout;
assign {litedramcore_bankmachine7_fifo_out_last, litedramcore_bankmachine7_fifo_out_first, litedramcore_bankmachine7_fifo_out_payload_addr, litedramcore_bankmachine7_fifo_out_payload_we} = litedramcore_bankmachine7_syncfifo7_dout;
assign {litedramcore_bankmachine7_fifo_out_last, litedramcore_bankmachine7_fifo_out_first, litedramcore_bankmachine7_fifo_out_payload_addr, litedramcore_bankmachine7_fifo_out_payload_we} = litedramcore_bankmachine7_syncfifo7_dout;
assign litedramcore_bankmachine7_sink_ready = litedramcore_bankmachine7_syncfifo7_writable;
assign litedramcore_bankmachine7_syncfifo7_we = litedramcore_bankmachine7_sink_valid;
assign litedramcore_bankmachine7_fifo_in_first = litedramcore_bankmachine7_sink_first;
assign litedramcore_bankmachine7_fifo_in_last = litedramcore_bankmachine7_sink_last;
assign litedramcore_bankmachine7_fifo_in_payload_we = litedramcore_bankmachine7_sink_payload_we;
assign litedramcore_bankmachine7_fifo_in_payload_addr = litedramcore_bankmachine7_sink_payload_addr;
assign litedramcore_bankmachine7_source_valid = litedramcore_bankmachine7_syncfifo7_readable;
assign litedramcore_bankmachine7_source_first = litedramcore_bankmachine7_fifo_out_first;
assign litedramcore_bankmachine7_source_last = litedramcore_bankmachine7_fifo_out_last;
assign litedramcore_bankmachine7_source_payload_we = litedramcore_bankmachine7_fifo_out_payload_we;
assign litedramcore_bankmachine7_source_payload_addr = litedramcore_bankmachine7_fifo_out_payload_addr;
assign litedramcore_bankmachine7_syncfifo7_re = litedramcore_bankmachine7_source_ready;
always @(*) begin
    litedramcore_bankmachine7_wrport_adr <= 4'd0;
    if (litedramcore_bankmachine7_replace) begin
        litedramcore_bankmachine7_wrport_adr <= (litedramcore_bankmachine7_produce - 1'd1);
    end else begin
        litedramcore_bankmachine7_wrport_adr <= litedramcore_bankmachine7_produce;
    end
end
assign litedramcore_bankmachine7_wrport_dat_w = litedramcore_bankmachine7_syncfifo7_din;
assign litedramcore_bankmachine7_wrport_we = (litedramcore_bankmachine7_syncfifo7_we & (litedramcore_bankmachine7_syncfifo7_writable | litedramcore_bankmachine7_replace));
assign litedramcore_bankmachine7_do_read = (litedramcore_bankmachine7_syncfifo7_readable & litedramcore_bankmachine7_syncfifo7_re);
assign litedramcore_bankmachine7_rdport_adr = litedramcore_bankmachine7_consume;
assign litedramcore_bankmachine7_syncfifo7_dout = litedramcore_bankmachine7_rdport_dat_r;
assign litedramcore_bankmachine7_syncfifo7_writable = (litedramcore_bankmachine7_level != 5'd16);
assign litedramcore_bankmachine7_syncfifo7_readable = (litedramcore_bankmachine7_level != 1'd0);
assign litedramcore_bankmachine7_pipe_valid_sink_ready = ((~litedramcore_bankmachine7_pipe_valid_source_valid) | litedramcore_bankmachine7_pipe_valid_source_ready);
assign litedramcore_bankmachine7_pipe_valid_sink_valid = litedramcore_bankmachine7_sink_sink_valid;
assign litedramcore_bankmachine7_sink_sink_ready = litedramcore_bankmachine7_pipe_valid_sink_ready;
assign litedramcore_bankmachine7_pipe_valid_sink_first = litedramcore_bankmachine7_sink_sink_first;
assign litedramcore_bankmachine7_pipe_valid_sink_last = litedramcore_bankmachine7_sink_sink_last;
assign litedramcore_bankmachine7_pipe_valid_sink_payload_we = litedramcore_bankmachine7_sink_sink_payload_we;
assign litedramcore_bankmachine7_pipe_valid_sink_payload_addr = litedramcore_bankmachine7_sink_sink_payload_addr;
assign litedramcore_bankmachine7_source_source_valid = litedramcore_bankmachine7_pipe_valid_source_valid;
assign litedramcore_bankmachine7_pipe_valid_source_ready = litedramcore_bankmachine7_source_source_ready;
assign litedramcore_bankmachine7_source_source_first = litedramcore_bankmachine7_pipe_valid_source_first;
assign litedramcore_bankmachine7_source_source_last = litedramcore_bankmachine7_pipe_valid_source_last;
assign litedramcore_bankmachine7_source_source_payload_we = litedramcore_bankmachine7_pipe_valid_source_payload_we;
assign litedramcore_bankmachine7_source_source_payload_addr = litedramcore_bankmachine7_pipe_valid_source_payload_addr;
always @(*) begin
    litedramcore_bankmachine7_next_state <= 4'd0;
    litedramcore_bankmachine7_next_state <= litedramcore_bankmachine7_state;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
            if ((litedramcore_bankmachine7_twtpcon_ready & litedramcore_bankmachine7_trascon_ready)) begin
                if (litedramcore_bankmachine7_cmd_ready) begin
                    litedramcore_bankmachine7_next_state <= 3'd5;
                end
            end
        end
        2'd2: begin
            if ((litedramcore_bankmachine7_twtpcon_ready & litedramcore_bankmachine7_trascon_ready)) begin
                litedramcore_bankmachine7_next_state <= 3'd5;
            end
        end
        2'd3: begin
            if (litedramcore_bankmachine7_trccon_ready) begin
                if (litedramcore_bankmachine7_cmd_ready) begin
                    litedramcore_bankmachine7_next_state <= 3'd7;
                end
            end
        end
        3'd4: begin
            if ((~litedramcore_bankmachine7_refresh_req)) begin
                litedramcore_bankmachine7_next_state <= 1'd0;
            end
        end
        3'd5: begin
            litedramcore_bankmachine7_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_bankmachine7_next_state <= 2'd3;
        end
        3'd7: begin
            litedramcore_bankmachine7_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_bankmachine7_next_state <= 1'd0;
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
                litedramcore_bankmachine7_next_state <= 3'd4;
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            if ((litedramcore_bankmachine7_cmd_ready & litedramcore_bankmachine7_auto_precharge)) begin
                                litedramcore_bankmachine7_next_state <= 2'd2;
                            end
                        end else begin
                            litedramcore_bankmachine7_next_state <= 1'd1;
                        end
                    end else begin
                        litedramcore_bankmachine7_next_state <= 2'd3;
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_ras <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
            if ((litedramcore_bankmachine7_twtpcon_ready & litedramcore_bankmachine7_trascon_ready)) begin
                litedramcore_bankmachine7_cmd_payload_ras <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine7_trccon_ready) begin
                litedramcore_bankmachine7_cmd_payload_ras <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_we <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
            if ((litedramcore_bankmachine7_twtpcon_ready & litedramcore_bankmachine7_trascon_ready)) begin
                litedramcore_bankmachine7_cmd_payload_we <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            if (litedramcore_bankmachine7_source_source_payload_we) begin
                                litedramcore_bankmachine7_cmd_payload_we <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_is_cmd <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
            if ((litedramcore_bankmachine7_twtpcon_ready & litedramcore_bankmachine7_trascon_ready)) begin
                litedramcore_bankmachine7_cmd_payload_is_cmd <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine7_trccon_ready) begin
                litedramcore_bankmachine7_cmd_payload_is_cmd <= 1'd1;
            end
        end
        3'd4: begin
            litedramcore_bankmachine7_cmd_payload_is_cmd <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_is_read <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            if (litedramcore_bankmachine7_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine7_cmd_payload_is_read <= 1'd1;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_is_write <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            if (litedramcore_bankmachine7_source_source_payload_we) begin
                                litedramcore_bankmachine7_cmd_payload_is_write <= 1'd1;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_req_wdata_ready <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            if (litedramcore_bankmachine7_source_source_payload_we) begin
                                litedramcore_bankmachine7_req_wdata_ready <= litedramcore_bankmachine7_cmd_ready;
                            end else begin
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_req_rdata_valid <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            if (litedramcore_bankmachine7_source_source_payload_we) begin
                            end else begin
                                litedramcore_bankmachine7_req_rdata_valid <= litedramcore_bankmachine7_cmd_ready;
                            end
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_refresh_gnt <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
            if (litedramcore_bankmachine7_twtpcon_ready) begin
                litedramcore_bankmachine7_refresh_gnt <= 1'd1;
            end
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_row_open <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine7_trccon_ready) begin
                litedramcore_bankmachine7_row_open <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_valid <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
            if ((litedramcore_bankmachine7_twtpcon_ready & litedramcore_bankmachine7_trascon_ready)) begin
                litedramcore_bankmachine7_cmd_valid <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine7_trccon_ready) begin
                litedramcore_bankmachine7_cmd_valid <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            litedramcore_bankmachine7_cmd_valid <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_row_close <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
            litedramcore_bankmachine7_row_close <= 1'd1;
        end
        2'd2: begin
            litedramcore_bankmachine7_row_close <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
            litedramcore_bankmachine7_row_close <= 1'd1;
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_row_col_n_addr_sel <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
            if (litedramcore_bankmachine7_trccon_ready) begin
                litedramcore_bankmachine7_row_col_n_addr_sel <= 1'd1;
            end
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_bankmachine7_cmd_payload_cas <= 1'd0;
    case (litedramcore_bankmachine7_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        default: begin
            if (litedramcore_bankmachine7_refresh_req) begin
            end else begin
                if (litedramcore_bankmachine7_source_source_valid) begin
                    if (litedramcore_bankmachine7_row_opened) begin
                        if (litedramcore_bankmachine7_row_hit) begin
                            litedramcore_bankmachine7_cmd_payload_cas <= 1'd1;
                        end else begin
                        end
                    end else begin
                    end
                end
            end
        end
    endcase
end
assign litedramcore_rdcmdphase = (k7ddrphy_rdphase_storage - 1'd1);
assign litedramcore_wrcmdphase = (k7ddrphy_wrphase_storage - 1'd1);
assign litedramcore_trrdcon_valid = ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & ((litedramcore_choose_cmd_cmd_payload_ras & (~litedramcore_choose_cmd_cmd_payload_cas)) & (~litedramcore_choose_cmd_cmd_payload_we)));
assign litedramcore_tfawcon_valid = ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & ((litedramcore_choose_cmd_cmd_payload_ras & (~litedramcore_choose_cmd_cmd_payload_cas)) & (~litedramcore_choose_cmd_cmd_payload_we)));
assign litedramcore_ras_allowed = (litedramcore_trrdcon_ready & litedramcore_tfawcon_ready);
assign litedramcore_tccdcon_valid = ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_cmd_payload_is_write | litedramcore_choose_req_cmd_payload_is_read));
assign litedramcore_cas_allowed = litedramcore_tccdcon_ready;
assign litedramcore_twtrcon_valid = ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_write);
assign litedramcore_read_available = ((((((((litedramcore_bankmachine0_cmd_valid & litedramcore_bankmachine0_cmd_payload_is_read) | (litedramcore_bankmachine1_cmd_valid & litedramcore_bankmachine1_cmd_payload_is_read)) | (litedramcore_bankmachine2_cmd_valid & litedramcore_bankmachine2_cmd_payload_is_read)) | (litedramcore_bankmachine3_cmd_valid & litedramcore_bankmachine3_cmd_payload_is_read)) | (litedramcore_bankmachine4_cmd_valid & litedramcore_bankmachine4_cmd_payload_is_read)) | (litedramcore_bankmachine5_cmd_valid & litedramcore_bankmachine5_cmd_payload_is_read)) | (litedramcore_bankmachine6_cmd_valid & litedramcore_bankmachine6_cmd_payload_is_read)) | (litedramcore_bankmachine7_cmd_valid & litedramcore_bankmachine7_cmd_payload_is_read));
assign litedramcore_write_available = ((((((((litedramcore_bankmachine0_cmd_valid & litedramcore_bankmachine0_cmd_payload_is_write) | (litedramcore_bankmachine1_cmd_valid & litedramcore_bankmachine1_cmd_payload_is_write)) | (litedramcore_bankmachine2_cmd_valid & litedramcore_bankmachine2_cmd_payload_is_write)) | (litedramcore_bankmachine3_cmd_valid & litedramcore_bankmachine3_cmd_payload_is_write)) | (litedramcore_bankmachine4_cmd_valid & litedramcore_bankmachine4_cmd_payload_is_write)) | (litedramcore_bankmachine5_cmd_valid & litedramcore_bankmachine5_cmd_payload_is_write)) | (litedramcore_bankmachine6_cmd_valid & litedramcore_bankmachine6_cmd_payload_is_write)) | (litedramcore_bankmachine7_cmd_valid & litedramcore_bankmachine7_cmd_payload_is_write));
assign litedramcore_max_time0 = (litedramcore_time0 == 1'd0);
assign litedramcore_max_time1 = (litedramcore_time1 == 1'd0);
assign litedramcore_bankmachine0_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine1_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine2_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine3_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine4_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine5_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine6_refresh_req = litedramcore_cmd_valid;
assign litedramcore_bankmachine7_refresh_req = litedramcore_cmd_valid;
assign litedramcore_go_to_refresh = (((((((litedramcore_bankmachine0_refresh_gnt & litedramcore_bankmachine1_refresh_gnt) & litedramcore_bankmachine2_refresh_gnt) & litedramcore_bankmachine3_refresh_gnt) & litedramcore_bankmachine4_refresh_gnt) & litedramcore_bankmachine5_refresh_gnt) & litedramcore_bankmachine6_refresh_gnt) & litedramcore_bankmachine7_refresh_gnt);
assign litedramcore_interface_rdata = {litedramcore_dfi_p3_rddata, litedramcore_dfi_p2_rddata, litedramcore_dfi_p1_rddata, litedramcore_dfi_p0_rddata};
assign {litedramcore_dfi_p3_wrdata, litedramcore_dfi_p2_wrdata, litedramcore_dfi_p1_wrdata, litedramcore_dfi_p0_wrdata} = litedramcore_interface_wdata;
assign {litedramcore_dfi_p3_wrdata, litedramcore_dfi_p2_wrdata, litedramcore_dfi_p1_wrdata, litedramcore_dfi_p0_wrdata} = litedramcore_interface_wdata;
assign {litedramcore_dfi_p3_wrdata, litedramcore_dfi_p2_wrdata, litedramcore_dfi_p1_wrdata, litedramcore_dfi_p0_wrdata} = litedramcore_interface_wdata;
assign {litedramcore_dfi_p3_wrdata, litedramcore_dfi_p2_wrdata, litedramcore_dfi_p1_wrdata, litedramcore_dfi_p0_wrdata} = litedramcore_interface_wdata;
assign {litedramcore_dfi_p3_wrdata_mask, litedramcore_dfi_p2_wrdata_mask, litedramcore_dfi_p1_wrdata_mask, litedramcore_dfi_p0_wrdata_mask} = (~litedramcore_interface_wdata_we);
assign {litedramcore_dfi_p3_wrdata_mask, litedramcore_dfi_p2_wrdata_mask, litedramcore_dfi_p1_wrdata_mask, litedramcore_dfi_p0_wrdata_mask} = (~litedramcore_interface_wdata_we);
assign {litedramcore_dfi_p3_wrdata_mask, litedramcore_dfi_p2_wrdata_mask, litedramcore_dfi_p1_wrdata_mask, litedramcore_dfi_p0_wrdata_mask} = (~litedramcore_interface_wdata_we);
assign {litedramcore_dfi_p3_wrdata_mask, litedramcore_dfi_p2_wrdata_mask, litedramcore_dfi_p1_wrdata_mask, litedramcore_dfi_p0_wrdata_mask} = (~litedramcore_interface_wdata_we);
always @(*) begin
    litedramcore_choose_cmd_valids <= 8'd0;
    litedramcore_choose_cmd_valids[0] <= (litedramcore_bankmachine0_cmd_valid & (((litedramcore_bankmachine0_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine0_cmd_payload_ras & (~litedramcore_bankmachine0_cmd_payload_cas)) & (~litedramcore_bankmachine0_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine0_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine0_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[1] <= (litedramcore_bankmachine1_cmd_valid & (((litedramcore_bankmachine1_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine1_cmd_payload_ras & (~litedramcore_bankmachine1_cmd_payload_cas)) & (~litedramcore_bankmachine1_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine1_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine1_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[2] <= (litedramcore_bankmachine2_cmd_valid & (((litedramcore_bankmachine2_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine2_cmd_payload_ras & (~litedramcore_bankmachine2_cmd_payload_cas)) & (~litedramcore_bankmachine2_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine2_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine2_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[3] <= (litedramcore_bankmachine3_cmd_valid & (((litedramcore_bankmachine3_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine3_cmd_payload_ras & (~litedramcore_bankmachine3_cmd_payload_cas)) & (~litedramcore_bankmachine3_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine3_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine3_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[4] <= (litedramcore_bankmachine4_cmd_valid & (((litedramcore_bankmachine4_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine4_cmd_payload_ras & (~litedramcore_bankmachine4_cmd_payload_cas)) & (~litedramcore_bankmachine4_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine4_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine4_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[5] <= (litedramcore_bankmachine5_cmd_valid & (((litedramcore_bankmachine5_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine5_cmd_payload_ras & (~litedramcore_bankmachine5_cmd_payload_cas)) & (~litedramcore_bankmachine5_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine5_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine5_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[6] <= (litedramcore_bankmachine6_cmd_valid & (((litedramcore_bankmachine6_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine6_cmd_payload_ras & (~litedramcore_bankmachine6_cmd_payload_cas)) & (~litedramcore_bankmachine6_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine6_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine6_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
    litedramcore_choose_cmd_valids[7] <= (litedramcore_bankmachine7_cmd_valid & (((litedramcore_bankmachine7_cmd_payload_is_cmd & litedramcore_choose_cmd_want_cmds) & ((~((litedramcore_bankmachine7_cmd_payload_ras & (~litedramcore_bankmachine7_cmd_payload_cas)) & (~litedramcore_bankmachine7_cmd_payload_we))) | litedramcore_choose_cmd_want_activates)) | ((litedramcore_bankmachine7_cmd_payload_is_read == litedramcore_choose_cmd_want_reads) & (litedramcore_bankmachine7_cmd_payload_is_write == litedramcore_choose_cmd_want_writes))));
end
assign litedramcore_choose_cmd_request = litedramcore_choose_cmd_valids;
assign litedramcore_choose_cmd_cmd_valid = rhs_array_muxed0;
assign litedramcore_choose_cmd_cmd_payload_a = rhs_array_muxed1;
assign litedramcore_choose_cmd_cmd_payload_ba = rhs_array_muxed2;
assign litedramcore_choose_cmd_cmd_payload_is_read = rhs_array_muxed3;
assign litedramcore_choose_cmd_cmd_payload_is_write = rhs_array_muxed4;
assign litedramcore_choose_cmd_cmd_payload_is_cmd = rhs_array_muxed5;
always @(*) begin
    litedramcore_choose_cmd_cmd_payload_cas <= 1'd0;
    if (litedramcore_choose_cmd_cmd_valid) begin
        litedramcore_choose_cmd_cmd_payload_cas <= t_array_muxed0;
    end
end
always @(*) begin
    litedramcore_choose_cmd_cmd_payload_ras <= 1'd0;
    if (litedramcore_choose_cmd_cmd_valid) begin
        litedramcore_choose_cmd_cmd_payload_ras <= t_array_muxed1;
    end
end
always @(*) begin
    litedramcore_choose_cmd_cmd_payload_we <= 1'd0;
    if (litedramcore_choose_cmd_cmd_valid) begin
        litedramcore_choose_cmd_cmd_payload_we <= t_array_muxed2;
    end
end
always @(*) begin
    litedramcore_bankmachine0_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 1'd0))) begin
        litedramcore_bankmachine0_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 1'd0))) begin
        litedramcore_bankmachine0_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine1_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 1'd1))) begin
        litedramcore_bankmachine1_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 1'd1))) begin
        litedramcore_bankmachine1_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine2_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 2'd2))) begin
        litedramcore_bankmachine2_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 2'd2))) begin
        litedramcore_bankmachine2_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine3_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 2'd3))) begin
        litedramcore_bankmachine3_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 2'd3))) begin
        litedramcore_bankmachine3_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine4_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 3'd4))) begin
        litedramcore_bankmachine4_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 3'd4))) begin
        litedramcore_bankmachine4_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine5_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 3'd5))) begin
        litedramcore_bankmachine5_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 3'd5))) begin
        litedramcore_bankmachine5_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine6_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 3'd6))) begin
        litedramcore_bankmachine6_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 3'd6))) begin
        litedramcore_bankmachine6_cmd_ready <= 1'd1;
    end
end
always @(*) begin
    litedramcore_bankmachine7_cmd_ready <= 1'd0;
    if (((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & (litedramcore_choose_cmd_grant == 3'd7))) begin
        litedramcore_bankmachine7_cmd_ready <= 1'd1;
    end
    if (((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & (litedramcore_choose_req_grant == 3'd7))) begin
        litedramcore_bankmachine7_cmd_ready <= 1'd1;
    end
end
assign litedramcore_choose_cmd_ce = (litedramcore_choose_cmd_cmd_ready | (~litedramcore_choose_cmd_cmd_valid));
always @(*) begin
    litedramcore_choose_req_valids <= 8'd0;
    litedramcore_choose_req_valids[0] <= (litedramcore_bankmachine0_cmd_valid & (((litedramcore_bankmachine0_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine0_cmd_payload_ras & (~litedramcore_bankmachine0_cmd_payload_cas)) & (~litedramcore_bankmachine0_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine0_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine0_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[1] <= (litedramcore_bankmachine1_cmd_valid & (((litedramcore_bankmachine1_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine1_cmd_payload_ras & (~litedramcore_bankmachine1_cmd_payload_cas)) & (~litedramcore_bankmachine1_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine1_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine1_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[2] <= (litedramcore_bankmachine2_cmd_valid & (((litedramcore_bankmachine2_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine2_cmd_payload_ras & (~litedramcore_bankmachine2_cmd_payload_cas)) & (~litedramcore_bankmachine2_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine2_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine2_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[3] <= (litedramcore_bankmachine3_cmd_valid & (((litedramcore_bankmachine3_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine3_cmd_payload_ras & (~litedramcore_bankmachine3_cmd_payload_cas)) & (~litedramcore_bankmachine3_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine3_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine3_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[4] <= (litedramcore_bankmachine4_cmd_valid & (((litedramcore_bankmachine4_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine4_cmd_payload_ras & (~litedramcore_bankmachine4_cmd_payload_cas)) & (~litedramcore_bankmachine4_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine4_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine4_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[5] <= (litedramcore_bankmachine5_cmd_valid & (((litedramcore_bankmachine5_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine5_cmd_payload_ras & (~litedramcore_bankmachine5_cmd_payload_cas)) & (~litedramcore_bankmachine5_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine5_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine5_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[6] <= (litedramcore_bankmachine6_cmd_valid & (((litedramcore_bankmachine6_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine6_cmd_payload_ras & (~litedramcore_bankmachine6_cmd_payload_cas)) & (~litedramcore_bankmachine6_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine6_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine6_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
    litedramcore_choose_req_valids[7] <= (litedramcore_bankmachine7_cmd_valid & (((litedramcore_bankmachine7_cmd_payload_is_cmd & litedramcore_choose_req_want_cmds) & ((~((litedramcore_bankmachine7_cmd_payload_ras & (~litedramcore_bankmachine7_cmd_payload_cas)) & (~litedramcore_bankmachine7_cmd_payload_we))) | litedramcore_choose_req_want_activates)) | ((litedramcore_bankmachine7_cmd_payload_is_read == litedramcore_choose_req_want_reads) & (litedramcore_bankmachine7_cmd_payload_is_write == litedramcore_choose_req_want_writes))));
end
assign litedramcore_choose_req_request = litedramcore_choose_req_valids;
assign litedramcore_choose_req_cmd_valid = rhs_array_muxed6;
assign litedramcore_choose_req_cmd_payload_a = rhs_array_muxed7;
assign litedramcore_choose_req_cmd_payload_ba = rhs_array_muxed8;
assign litedramcore_choose_req_cmd_payload_is_read = rhs_array_muxed9;
assign litedramcore_choose_req_cmd_payload_is_write = rhs_array_muxed10;
assign litedramcore_choose_req_cmd_payload_is_cmd = rhs_array_muxed11;
always @(*) begin
    litedramcore_choose_req_cmd_payload_cas <= 1'd0;
    if (litedramcore_choose_req_cmd_valid) begin
        litedramcore_choose_req_cmd_payload_cas <= t_array_muxed3;
    end
end
always @(*) begin
    litedramcore_choose_req_cmd_payload_ras <= 1'd0;
    if (litedramcore_choose_req_cmd_valid) begin
        litedramcore_choose_req_cmd_payload_ras <= t_array_muxed4;
    end
end
always @(*) begin
    litedramcore_choose_req_cmd_payload_we <= 1'd0;
    if (litedramcore_choose_req_cmd_valid) begin
        litedramcore_choose_req_cmd_payload_we <= t_array_muxed5;
    end
end
assign litedramcore_choose_req_ce = (litedramcore_choose_req_cmd_ready | (~litedramcore_choose_req_cmd_valid));
assign litedramcore_dfi_p0_reset_n = 1'd1;
assign litedramcore_dfi_p0_cke = {1{litedramcore_steerer0}};
assign litedramcore_dfi_p0_odt = {1{litedramcore_steerer1}};
assign litedramcore_dfi_p1_reset_n = 1'd1;
assign litedramcore_dfi_p1_cke = {1{litedramcore_steerer2}};
assign litedramcore_dfi_p1_odt = {1{litedramcore_steerer3}};
assign litedramcore_dfi_p2_reset_n = 1'd1;
assign litedramcore_dfi_p2_cke = {1{litedramcore_steerer4}};
assign litedramcore_dfi_p2_odt = {1{litedramcore_steerer5}};
assign litedramcore_dfi_p3_reset_n = 1'd1;
assign litedramcore_dfi_p3_cke = {1{litedramcore_steerer6}};
assign litedramcore_dfi_p3_odt = {1{litedramcore_steerer7}};
assign litedramcore_tfawcon_count = ((((litedramcore_tfawcon_window[0] + litedramcore_tfawcon_window[1]) + litedramcore_tfawcon_window[2]) + litedramcore_tfawcon_window[3]) + litedramcore_tfawcon_window[4]);
always @(*) begin
    litedramcore_multiplexer_next_state <= 4'd0;
    litedramcore_multiplexer_next_state <= litedramcore_multiplexer_state;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            if (litedramcore_read_available) begin
                if (((~litedramcore_write_available) | litedramcore_max_time1)) begin
                    litedramcore_multiplexer_next_state <= 2'd3;
                end
            end
            if (litedramcore_go_to_refresh) begin
                litedramcore_multiplexer_next_state <= 2'd2;
            end
        end
        2'd2: begin
            if (litedramcore_cmd_last) begin
                litedramcore_multiplexer_next_state <= 1'd0;
            end
        end
        2'd3: begin
            if (litedramcore_twtrcon_ready) begin
                litedramcore_multiplexer_next_state <= 1'd0;
            end
        end
        3'd4: begin
            litedramcore_multiplexer_next_state <= 3'd5;
        end
        3'd5: begin
            litedramcore_multiplexer_next_state <= 3'd6;
        end
        3'd6: begin
            litedramcore_multiplexer_next_state <= 3'd7;
        end
        3'd7: begin
            litedramcore_multiplexer_next_state <= 4'd8;
        end
        4'd8: begin
            litedramcore_multiplexer_next_state <= 4'd9;
        end
        4'd9: begin
            litedramcore_multiplexer_next_state <= 4'd10;
        end
        4'd10: begin
            litedramcore_multiplexer_next_state <= 1'd1;
        end
        default: begin
            if (litedramcore_write_available) begin
                if (((~litedramcore_read_available) | litedramcore_max_time0)) begin
                    litedramcore_multiplexer_next_state <= 3'd4;
                end
            end
            if (litedramcore_go_to_refresh) begin
                litedramcore_multiplexer_next_state <= 2'd2;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_steerer_sel0 <= 2'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            litedramcore_steerer_sel0 <= 1'd0;
            if ((k7ddrphy_wrphase_storage == 1'd0)) begin
                litedramcore_steerer_sel0 <= 2'd2;
            end
            if ((litedramcore_wrcmdphase == 1'd0)) begin
                litedramcore_steerer_sel0 <= 1'd1;
            end
        end
        2'd2: begin
            litedramcore_steerer_sel0 <= 2'd3;
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            litedramcore_steerer_sel0 <= 1'd0;
            if ((k7ddrphy_rdphase_storage == 1'd0)) begin
                litedramcore_steerer_sel0 <= 2'd2;
            end
            if ((litedramcore_rdcmdphase == 1'd0)) begin
                litedramcore_steerer_sel0 <= 1'd1;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_cmd_ready <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
        end
        2'd2: begin
            litedramcore_cmd_ready <= 1'd1;
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_steerer_sel1 <= 2'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            litedramcore_steerer_sel1 <= 1'd0;
            if ((k7ddrphy_wrphase_storage == 1'd1)) begin
                litedramcore_steerer_sel1 <= 2'd2;
            end
            if ((litedramcore_wrcmdphase == 1'd1)) begin
                litedramcore_steerer_sel1 <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            litedramcore_steerer_sel1 <= 1'd0;
            if ((k7ddrphy_rdphase_storage == 1'd1)) begin
                litedramcore_steerer_sel1 <= 2'd2;
            end
            if ((litedramcore_rdcmdphase == 1'd1)) begin
                litedramcore_steerer_sel1 <= 1'd1;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_steerer_sel2 <= 2'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            litedramcore_steerer_sel2 <= 1'd0;
            if ((k7ddrphy_wrphase_storage == 2'd2)) begin
                litedramcore_steerer_sel2 <= 2'd2;
            end
            if ((litedramcore_wrcmdphase == 2'd2)) begin
                litedramcore_steerer_sel2 <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            litedramcore_steerer_sel2 <= 1'd0;
            if ((k7ddrphy_rdphase_storage == 2'd2)) begin
                litedramcore_steerer_sel2 <= 2'd2;
            end
            if ((litedramcore_rdcmdphase == 2'd2)) begin
                litedramcore_steerer_sel2 <= 1'd1;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_choose_cmd_want_activates <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            if (1'd0) begin
            end else begin
                litedramcore_choose_cmd_want_activates <= litedramcore_ras_allowed;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            if (1'd0) begin
            end else begin
                litedramcore_choose_cmd_want_activates <= litedramcore_ras_allowed;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_steerer_sel3 <= 2'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            litedramcore_steerer_sel3 <= 1'd0;
            if ((k7ddrphy_wrphase_storage == 2'd3)) begin
                litedramcore_steerer_sel3 <= 2'd2;
            end
            if ((litedramcore_wrcmdphase == 2'd3)) begin
                litedramcore_steerer_sel3 <= 1'd1;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            litedramcore_steerer_sel3 <= 1'd0;
            if ((k7ddrphy_rdphase_storage == 2'd3)) begin
                litedramcore_steerer_sel3 <= 2'd2;
            end
            if ((litedramcore_rdcmdphase == 2'd3)) begin
                litedramcore_steerer_sel3 <= 1'd1;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_en0 <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            litedramcore_en0 <= 1'd1;
        end
    endcase
end
always @(*) begin
    litedramcore_en1 <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            litedramcore_en1 <= 1'd1;
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_choose_cmd_cmd_ready <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            if (1'd0) begin
            end else begin
                litedramcore_choose_cmd_cmd_ready <= ((~((litedramcore_choose_cmd_cmd_payload_ras & (~litedramcore_choose_cmd_cmd_payload_cas)) & (~litedramcore_choose_cmd_cmd_payload_we))) | litedramcore_ras_allowed);
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            if (1'd0) begin
            end else begin
                litedramcore_choose_cmd_cmd_ready <= ((~((litedramcore_choose_cmd_cmd_payload_ras & (~litedramcore_choose_cmd_cmd_payload_cas)) & (~litedramcore_choose_cmd_cmd_payload_we))) | litedramcore_ras_allowed);
            end
        end
    endcase
end
always @(*) begin
    litedramcore_choose_req_want_reads <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            litedramcore_choose_req_want_reads <= 1'd1;
        end
    endcase
end
always @(*) begin
    litedramcore_choose_req_want_writes <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            litedramcore_choose_req_want_writes <= 1'd1;
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_choose_req_cmd_ready <= 1'd0;
    case (litedramcore_multiplexer_state)
        1'd1: begin
            if (1'd0) begin
                litedramcore_choose_req_cmd_ready <= (litedramcore_cas_allowed & ((~((litedramcore_choose_req_cmd_payload_ras & (~litedramcore_choose_req_cmd_payload_cas)) & (~litedramcore_choose_req_cmd_payload_we))) | litedramcore_ras_allowed));
            end else begin
                litedramcore_choose_req_cmd_ready <= litedramcore_cas_allowed;
            end
        end
        2'd2: begin
        end
        2'd3: begin
        end
        3'd4: begin
        end
        3'd5: begin
        end
        3'd6: begin
        end
        3'd7: begin
        end
        4'd8: begin
        end
        4'd9: begin
        end
        4'd10: begin
        end
        default: begin
            if (1'd0) begin
                litedramcore_choose_req_cmd_ready <= (litedramcore_cas_allowed & ((~((litedramcore_choose_req_cmd_payload_ras & (~litedramcore_choose_req_cmd_payload_cas)) & (~litedramcore_choose_req_cmd_payload_we))) | litedramcore_ras_allowed));
            end else begin
                litedramcore_choose_req_cmd_ready <= litedramcore_cas_allowed;
            end
        end
    endcase
end
assign litedramcore_roundrobin0_request = {(((user_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((litedramcore_locked0 | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin0_ce = ((~litedramcore_interface_bank0_valid) & (~litedramcore_interface_bank0_lock));
assign litedramcore_interface_bank0_addr = rhs_array_muxed12;
assign litedramcore_interface_bank0_we = rhs_array_muxed13;
assign litedramcore_interface_bank0_valid = rhs_array_muxed14;
assign litedramcore_roundrobin1_request = {(((user_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((litedramcore_locked1 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin1_ce = ((~litedramcore_interface_bank1_valid) & (~litedramcore_interface_bank1_lock));
assign litedramcore_interface_bank1_addr = rhs_array_muxed15;
assign litedramcore_interface_bank1_we = rhs_array_muxed16;
assign litedramcore_interface_bank1_valid = rhs_array_muxed17;
assign litedramcore_roundrobin2_request = {(((user_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((litedramcore_locked2 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin2_ce = ((~litedramcore_interface_bank2_valid) & (~litedramcore_interface_bank2_lock));
assign litedramcore_interface_bank2_addr = rhs_array_muxed18;
assign litedramcore_interface_bank2_we = rhs_array_muxed19;
assign litedramcore_interface_bank2_valid = rhs_array_muxed20;
assign litedramcore_roundrobin3_request = {(((user_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((litedramcore_locked3 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin3_ce = ((~litedramcore_interface_bank3_valid) & (~litedramcore_interface_bank3_lock));
assign litedramcore_interface_bank3_addr = rhs_array_muxed21;
assign litedramcore_interface_bank3_we = rhs_array_muxed22;
assign litedramcore_interface_bank3_valid = rhs_array_muxed23;
assign litedramcore_roundrobin4_request = {(((user_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((litedramcore_locked4 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin4_ce = ((~litedramcore_interface_bank4_valid) & (~litedramcore_interface_bank4_lock));
assign litedramcore_interface_bank4_addr = rhs_array_muxed24;
assign litedramcore_interface_bank4_we = rhs_array_muxed25;
assign litedramcore_interface_bank4_valid = rhs_array_muxed26;
assign litedramcore_roundrobin5_request = {(((user_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((litedramcore_locked5 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin5_ce = ((~litedramcore_interface_bank5_valid) & (~litedramcore_interface_bank5_lock));
assign litedramcore_interface_bank5_addr = rhs_array_muxed27;
assign litedramcore_interface_bank5_we = rhs_array_muxed28;
assign litedramcore_interface_bank5_valid = rhs_array_muxed29;
assign litedramcore_roundrobin6_request = {(((user_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((litedramcore_locked6 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin6_ce = ((~litedramcore_interface_bank6_valid) & (~litedramcore_interface_bank6_lock));
assign litedramcore_interface_bank6_addr = rhs_array_muxed30;
assign litedramcore_interface_bank6_we = rhs_array_muxed31;
assign litedramcore_interface_bank6_valid = rhs_array_muxed32;
assign litedramcore_roundrobin7_request = {(((user_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((litedramcore_locked7 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))))) & user_port_cmd_valid)};
assign litedramcore_roundrobin7_ce = ((~litedramcore_interface_bank7_valid) & (~litedramcore_interface_bank7_lock));
assign litedramcore_interface_bank7_addr = rhs_array_muxed33;
assign litedramcore_interface_bank7_we = rhs_array_muxed34;
assign litedramcore_interface_bank7_valid = rhs_array_muxed35;
assign user_port_cmd_ready = ((((((((1'd0 | (((litedramcore_roundrobin0_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((litedramcore_locked0 | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank0_ready)) | (((litedramcore_roundrobin1_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((litedramcore_locked1 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank1_ready)) | (((litedramcore_roundrobin2_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((litedramcore_locked2 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank2_ready)) | (((litedramcore_roundrobin3_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((litedramcore_locked3 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank3_ready)) | (((litedramcore_roundrobin4_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((litedramcore_locked4 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank4_ready)) | (((litedramcore_roundrobin5_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((litedramcore_locked5 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank5_ready)) | (((litedramcore_roundrobin6_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((litedramcore_locked6 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0)))))) & litedramcore_interface_bank6_ready)) | (((litedramcore_roundrobin7_grant == 1'd0) & ((user_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((litedramcore_locked7 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0)))))) & litedramcore_interface_bank7_ready));
assign user_port_wdata_ready = litedramcore_new_master_wdata_ready1;
assign user_port_rdata_valid = litedramcore_new_master_rdata_valid8;
always @(*) begin
    litedramcore_interface_wdata <= 256'd0;
    case ({litedramcore_new_master_wdata_ready1})
        1'd1: begin
            litedramcore_interface_wdata <= user_port_wdata_payload_data;
        end
        default: begin
            litedramcore_interface_wdata <= 1'd0;
        end
    endcase
end
always @(*) begin
    litedramcore_interface_wdata_we <= 32'd0;
    case ({litedramcore_new_master_wdata_ready1})
        1'd1: begin
            litedramcore_interface_wdata_we <= user_port_wdata_payload_we;
        end
        default: begin
            litedramcore_interface_wdata_we <= 1'd0;
        end
    endcase
end
assign user_port_rdata_payload_data = litedramcore_interface_rdata;
assign litedramcore_roundrobin0_grant = 1'd0;
assign litedramcore_roundrobin1_grant = 1'd0;
assign litedramcore_roundrobin2_grant = 1'd0;
assign litedramcore_roundrobin3_grant = 1'd0;
assign litedramcore_roundrobin4_grant = 1'd0;
assign litedramcore_roundrobin5_grant = 1'd0;
assign litedramcore_roundrobin6_grant = 1'd0;
assign litedramcore_roundrobin7_grant = 1'd0;
always @(*) begin
    litedramcore_next_state <= 2'd0;
    litedramcore_next_state <= litedramcore_state;
    case (litedramcore_state)
        1'd1: begin
            litedramcore_next_state <= 2'd2;
        end
        2'd2: begin
            litedramcore_next_state <= 1'd0;
        end
        default: begin
            if ((litedramcore_wishbone_cyc & litedramcore_wishbone_stb)) begin
                litedramcore_next_state <= 1'd1;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_wishbone_dat_r <= 32'd0;
    case (litedramcore_state)
        1'd1: begin
        end
        2'd2: begin
            litedramcore_wishbone_dat_r <= litedramcore_dat_r;
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_wishbone_ack <= 1'd0;
    case (litedramcore_state)
        1'd1: begin
        end
        2'd2: begin
            litedramcore_wishbone_ack <= 1'd1;
        end
        default: begin
        end
    endcase
end
always @(*) begin
    litedramcore_dat_w_next_value0 <= 32'd0;
    case (litedramcore_state)
        1'd1: begin
        end
        2'd2: begin
        end
        default: begin
            litedramcore_dat_w_next_value0 <= litedramcore_wishbone_dat_w;
        end
    endcase
end
always @(*) begin
    litedramcore_dat_w_next_value_ce0 <= 1'd0;
    case (litedramcore_state)
        1'd1: begin
        end
        2'd2: begin
        end
        default: begin
            litedramcore_dat_w_next_value_ce0 <= 1'd1;
        end
    endcase
end
always @(*) begin
    litedramcore_adr_next_value1 <= 14'd0;
    case (litedramcore_state)
        1'd1: begin
            litedramcore_adr_next_value1 <= 1'd0;
        end
        2'd2: begin
        end
        default: begin
            if ((litedramcore_wishbone_cyc & litedramcore_wishbone_stb)) begin
                litedramcore_adr_next_value1 <= litedramcore_wishbone_adr;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_adr_next_value_ce1 <= 1'd0;
    case (litedramcore_state)
        1'd1: begin
            litedramcore_adr_next_value_ce1 <= 1'd1;
        end
        2'd2: begin
        end
        default: begin
            if ((litedramcore_wishbone_cyc & litedramcore_wishbone_stb)) begin
                litedramcore_adr_next_value_ce1 <= 1'd1;
            end
        end
    endcase
end
always @(*) begin
    litedramcore_we_next_value2 <= 1'd0;
    case (litedramcore_state)
        1'd1: begin
            litedramcore_we_next_value2 <= 1'd0;
        end
        2'd2: begin
        end
        default: begin
            if ((litedramcore_wishbone_cyc & litedramcore_wishbone_stb)) begin
                litedramcore_we_next_value2 <= (litedramcore_wishbone_we & (litedramcore_wishbone_sel != 1'd0));
            end
        end
    endcase
end
always @(*) begin
    litedramcore_we_next_value_ce2 <= 1'd0;
    case (litedramcore_state)
        1'd1: begin
            litedramcore_we_next_value_ce2 <= 1'd1;
        end
        2'd2: begin
        end
        default: begin
            if ((litedramcore_wishbone_cyc & litedramcore_wishbone_stb)) begin
                litedramcore_we_next_value_ce2 <= 1'd1;
            end
        end
    endcase
end
assign litedramcore_wishbone_adr = wb_bus_adr;
assign litedramcore_wishbone_dat_w = wb_bus_dat_w;
assign wb_bus_dat_r = litedramcore_wishbone_dat_r;
assign litedramcore_wishbone_sel = wb_bus_sel;
assign litedramcore_wishbone_cyc = wb_bus_cyc;
assign litedramcore_wishbone_stb = wb_bus_stb;
assign wb_bus_ack = litedramcore_wishbone_ack;
assign litedramcore_wishbone_we = wb_bus_we;
assign litedramcore_wishbone_cti = wb_bus_cti;
assign litedramcore_wishbone_bte = wb_bus_bte;
assign wb_bus_err = litedramcore_wishbone_err;
assign csrbank0_sel = (interface0_bank_bus_adr[13:9] == 1'd0);
assign csrbank0_init_done0_r = interface0_bank_bus_dat_w[0];
always @(*) begin
    csrbank0_init_done0_re <= 1'd0;
    if ((csrbank0_sel & (interface0_bank_bus_adr[8:0] == 1'd0))) begin
        csrbank0_init_done0_re <= interface0_bank_bus_we;
    end
end
always @(*) begin
    csrbank0_init_done0_we <= 1'd0;
    if ((csrbank0_sel & (interface0_bank_bus_adr[8:0] == 1'd0))) begin
        csrbank0_init_done0_we <= (~interface0_bank_bus_we);
    end
end
assign csrbank0_init_error0_r = interface0_bank_bus_dat_w[0];
always @(*) begin
    csrbank0_init_error0_we <= 1'd0;
    if ((csrbank0_sel & (interface0_bank_bus_adr[8:0] == 1'd1))) begin
        csrbank0_init_error0_we <= (~interface0_bank_bus_we);
    end
end
always @(*) begin
    csrbank0_init_error0_re <= 1'd0;
    if ((csrbank0_sel & (interface0_bank_bus_adr[8:0] == 1'd1))) begin
        csrbank0_init_error0_re <= interface0_bank_bus_we;
    end
end
assign csrbank0_init_done0_w = init_done_storage;
assign csrbank0_init_error0_w = init_error_storage;
assign csrbank1_sel = (interface1_bank_bus_adr[13:9] == 1'd1);
assign csrbank1_rst0_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    csrbank1_rst0_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 1'd0))) begin
        csrbank1_rst0_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    csrbank1_rst0_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 1'd0))) begin
        csrbank1_rst0_re <= interface1_bank_bus_we;
    end
end
assign csrbank1_dly_sel0_r = interface1_bank_bus_dat_w[3:0];
always @(*) begin
    csrbank1_dly_sel0_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 1'd1))) begin
        csrbank1_dly_sel0_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    csrbank1_dly_sel0_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 1'd1))) begin
        csrbank1_dly_sel0_we <= (~interface1_bank_bus_we);
    end
end
assign csrbank1_half_sys8x_taps0_r = interface1_bank_bus_dat_w[4:0];
always @(*) begin
    csrbank1_half_sys8x_taps0_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 2'd2))) begin
        csrbank1_half_sys8x_taps0_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    csrbank1_half_sys8x_taps0_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 2'd2))) begin
        csrbank1_half_sys8x_taps0_we <= (~interface1_bank_bus_we);
    end
end
assign csrbank1_wlevel_en0_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    csrbank1_wlevel_en0_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 2'd3))) begin
        csrbank1_wlevel_en0_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    csrbank1_wlevel_en0_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 2'd3))) begin
        csrbank1_wlevel_en0_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_wlevel_strobe_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wlevel_strobe_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd4))) begin
        k7ddrphy_wlevel_strobe_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    k7ddrphy_wlevel_strobe_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd4))) begin
        k7ddrphy_wlevel_strobe_we <= (~interface1_bank_bus_we);
    end
end
assign k7ddrphy_cdly_rst_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_cdly_rst_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd5))) begin
        k7ddrphy_cdly_rst_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_cdly_rst_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd5))) begin
        k7ddrphy_cdly_rst_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_cdly_inc_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_cdly_inc_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd6))) begin
        k7ddrphy_cdly_inc_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_cdly_inc_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd6))) begin
        k7ddrphy_cdly_inc_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_rdly_dq_rst_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_rdly_dq_rst_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd7))) begin
        k7ddrphy_rdly_dq_rst_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_rdly_dq_rst_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 3'd7))) begin
        k7ddrphy_rdly_dq_rst_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_rdly_dq_inc_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_rdly_dq_inc_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd8))) begin
        k7ddrphy_rdly_dq_inc_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_rdly_dq_inc_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd8))) begin
        k7ddrphy_rdly_dq_inc_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_rdly_dq_bitslip_rst_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_rdly_dq_bitslip_rst_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd9))) begin
        k7ddrphy_rdly_dq_bitslip_rst_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    k7ddrphy_rdly_dq_bitslip_rst_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd9))) begin
        k7ddrphy_rdly_dq_bitslip_rst_we <= (~interface1_bank_bus_we);
    end
end
assign k7ddrphy_rdly_dq_bitslip_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_rdly_dq_bitslip_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd10))) begin
        k7ddrphy_rdly_dq_bitslip_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    k7ddrphy_rdly_dq_bitslip_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd10))) begin
        k7ddrphy_rdly_dq_bitslip_we <= (~interface1_bank_bus_we);
    end
end
assign k7ddrphy_wdly_dq_rst_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wdly_dq_rst_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd11))) begin
        k7ddrphy_wdly_dq_rst_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    k7ddrphy_wdly_dq_rst_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd11))) begin
        k7ddrphy_wdly_dq_rst_we <= (~interface1_bank_bus_we);
    end
end
assign k7ddrphy_wdly_dq_inc_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wdly_dq_inc_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd12))) begin
        k7ddrphy_wdly_dq_inc_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    k7ddrphy_wdly_dq_inc_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd12))) begin
        k7ddrphy_wdly_dq_inc_we <= (~interface1_bank_bus_we);
    end
end
assign k7ddrphy_wdly_dqs_rst_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wdly_dqs_rst_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd13))) begin
        k7ddrphy_wdly_dqs_rst_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_wdly_dqs_rst_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd13))) begin
        k7ddrphy_wdly_dqs_rst_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_wdly_dqs_inc_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wdly_dqs_inc_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd14))) begin
        k7ddrphy_wdly_dqs_inc_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_wdly_dqs_inc_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd14))) begin
        k7ddrphy_wdly_dqs_inc_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_wdly_dq_bitslip_rst_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wdly_dq_bitslip_rst_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd15))) begin
        k7ddrphy_wdly_dq_bitslip_rst_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_wdly_dq_bitslip_rst_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 4'd15))) begin
        k7ddrphy_wdly_dq_bitslip_rst_re <= interface1_bank_bus_we;
    end
end
assign k7ddrphy_wdly_dq_bitslip_r = interface1_bank_bus_dat_w[0];
always @(*) begin
    k7ddrphy_wdly_dq_bitslip_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 5'd16))) begin
        k7ddrphy_wdly_dq_bitslip_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    k7ddrphy_wdly_dq_bitslip_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 5'd16))) begin
        k7ddrphy_wdly_dq_bitslip_re <= interface1_bank_bus_we;
    end
end
assign csrbank1_rdphase0_r = interface1_bank_bus_dat_w[1:0];
always @(*) begin
    csrbank1_rdphase0_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 5'd17))) begin
        csrbank1_rdphase0_re <= interface1_bank_bus_we;
    end
end
always @(*) begin
    csrbank1_rdphase0_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 5'd17))) begin
        csrbank1_rdphase0_we <= (~interface1_bank_bus_we);
    end
end
assign csrbank1_wrphase0_r = interface1_bank_bus_dat_w[1:0];
always @(*) begin
    csrbank1_wrphase0_we <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 5'd18))) begin
        csrbank1_wrphase0_we <= (~interface1_bank_bus_we);
    end
end
always @(*) begin
    csrbank1_wrphase0_re <= 1'd0;
    if ((csrbank1_sel & (interface1_bank_bus_adr[8:0] == 5'd18))) begin
        csrbank1_wrphase0_re <= interface1_bank_bus_we;
    end
end
assign csrbank1_rst0_w = k7ddrphy_rst_storage;
assign csrbank1_dly_sel0_w = k7ddrphy_dly_sel_storage[3:0];
assign csrbank1_half_sys8x_taps0_w = k7ddrphy_half_sys8x_taps_storage[4:0];
assign csrbank1_wlevel_en0_w = k7ddrphy_wlevel_en_storage;
assign csrbank1_rdphase0_w = k7ddrphy_rdphase_storage[1:0];
assign csrbank1_wrphase0_w = k7ddrphy_wrphase_storage[1:0];
assign csrbank2_sel = (interface2_bank_bus_adr[13:9] == 2'd2);
assign csrbank2_dfii_control0_r = interface2_bank_bus_dat_w[3:0];
always @(*) begin
    csrbank2_dfii_control0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 1'd0))) begin
        csrbank2_dfii_control0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_control0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 1'd0))) begin
        csrbank2_dfii_control0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi0_command0_r = interface2_bank_bus_dat_w[5:0];
always @(*) begin
    csrbank2_dfii_pi0_command0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 1'd1))) begin
        csrbank2_dfii_pi0_command0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi0_command0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 1'd1))) begin
        csrbank2_dfii_pi0_command0_re <= interface2_bank_bus_we;
    end
end
assign litedramcore_phaseinjector0_command_issue_r = interface2_bank_bus_dat_w[0];
always @(*) begin
    litedramcore_phaseinjector0_command_issue_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 2'd2))) begin
        litedramcore_phaseinjector0_command_issue_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    litedramcore_phaseinjector0_command_issue_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 2'd2))) begin
        litedramcore_phaseinjector0_command_issue_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi0_address0_r = interface2_bank_bus_dat_w[14:0];
always @(*) begin
    csrbank2_dfii_pi0_address0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 2'd3))) begin
        csrbank2_dfii_pi0_address0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi0_address0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 2'd3))) begin
        csrbank2_dfii_pi0_address0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi0_baddress0_r = interface2_bank_bus_dat_w[2:0];
always @(*) begin
    csrbank2_dfii_pi0_baddress0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd4))) begin
        csrbank2_dfii_pi0_baddress0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi0_baddress0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd4))) begin
        csrbank2_dfii_pi0_baddress0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi0_wrdata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi0_wrdata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd5))) begin
        csrbank2_dfii_pi0_wrdata1_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi0_wrdata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd5))) begin
        csrbank2_dfii_pi0_wrdata1_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi0_wrdata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi0_wrdata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd6))) begin
        csrbank2_dfii_pi0_wrdata0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi0_wrdata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd6))) begin
        csrbank2_dfii_pi0_wrdata0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi0_rddata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi0_rddata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd7))) begin
        csrbank2_dfii_pi0_rddata1_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi0_rddata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 3'd7))) begin
        csrbank2_dfii_pi0_rddata1_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi0_rddata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi0_rddata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd8))) begin
        csrbank2_dfii_pi0_rddata0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi0_rddata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd8))) begin
        csrbank2_dfii_pi0_rddata0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi1_command0_r = interface2_bank_bus_dat_w[5:0];
always @(*) begin
    csrbank2_dfii_pi1_command0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd9))) begin
        csrbank2_dfii_pi1_command0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi1_command0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd9))) begin
        csrbank2_dfii_pi1_command0_we <= (~interface2_bank_bus_we);
    end
end
assign litedramcore_phaseinjector1_command_issue_r = interface2_bank_bus_dat_w[0];
always @(*) begin
    litedramcore_phaseinjector1_command_issue_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd10))) begin
        litedramcore_phaseinjector1_command_issue_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    litedramcore_phaseinjector1_command_issue_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd10))) begin
        litedramcore_phaseinjector1_command_issue_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi1_address0_r = interface2_bank_bus_dat_w[14:0];
always @(*) begin
    csrbank2_dfii_pi1_address0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd11))) begin
        csrbank2_dfii_pi1_address0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi1_address0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd11))) begin
        csrbank2_dfii_pi1_address0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi1_baddress0_r = interface2_bank_bus_dat_w[2:0];
always @(*) begin
    csrbank2_dfii_pi1_baddress0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd12))) begin
        csrbank2_dfii_pi1_baddress0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi1_baddress0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd12))) begin
        csrbank2_dfii_pi1_baddress0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi1_wrdata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi1_wrdata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd13))) begin
        csrbank2_dfii_pi1_wrdata1_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi1_wrdata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd13))) begin
        csrbank2_dfii_pi1_wrdata1_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi1_wrdata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi1_wrdata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd14))) begin
        csrbank2_dfii_pi1_wrdata0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi1_wrdata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd14))) begin
        csrbank2_dfii_pi1_wrdata0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi1_rddata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi1_rddata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd15))) begin
        csrbank2_dfii_pi1_rddata1_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi1_rddata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 4'd15))) begin
        csrbank2_dfii_pi1_rddata1_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi1_rddata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi1_rddata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd16))) begin
        csrbank2_dfii_pi1_rddata0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi1_rddata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd16))) begin
        csrbank2_dfii_pi1_rddata0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi2_command0_r = interface2_bank_bus_dat_w[5:0];
always @(*) begin
    csrbank2_dfii_pi2_command0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd17))) begin
        csrbank2_dfii_pi2_command0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi2_command0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd17))) begin
        csrbank2_dfii_pi2_command0_re <= interface2_bank_bus_we;
    end
end
assign litedramcore_phaseinjector2_command_issue_r = interface2_bank_bus_dat_w[0];
always @(*) begin
    litedramcore_phaseinjector2_command_issue_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd18))) begin
        litedramcore_phaseinjector2_command_issue_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    litedramcore_phaseinjector2_command_issue_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd18))) begin
        litedramcore_phaseinjector2_command_issue_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi2_address0_r = interface2_bank_bus_dat_w[14:0];
always @(*) begin
    csrbank2_dfii_pi2_address0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd19))) begin
        csrbank2_dfii_pi2_address0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi2_address0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd19))) begin
        csrbank2_dfii_pi2_address0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi2_baddress0_r = interface2_bank_bus_dat_w[2:0];
always @(*) begin
    csrbank2_dfii_pi2_baddress0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd20))) begin
        csrbank2_dfii_pi2_baddress0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi2_baddress0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd20))) begin
        csrbank2_dfii_pi2_baddress0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi2_wrdata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi2_wrdata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd21))) begin
        csrbank2_dfii_pi2_wrdata1_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi2_wrdata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd21))) begin
        csrbank2_dfii_pi2_wrdata1_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi2_wrdata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi2_wrdata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd22))) begin
        csrbank2_dfii_pi2_wrdata0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi2_wrdata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd22))) begin
        csrbank2_dfii_pi2_wrdata0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi2_rddata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi2_rddata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd23))) begin
        csrbank2_dfii_pi2_rddata1_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi2_rddata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd23))) begin
        csrbank2_dfii_pi2_rddata1_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi2_rddata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi2_rddata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd24))) begin
        csrbank2_dfii_pi2_rddata0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi2_rddata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd24))) begin
        csrbank2_dfii_pi2_rddata0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi3_command0_r = interface2_bank_bus_dat_w[5:0];
always @(*) begin
    csrbank2_dfii_pi3_command0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd25))) begin
        csrbank2_dfii_pi3_command0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi3_command0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd25))) begin
        csrbank2_dfii_pi3_command0_re <= interface2_bank_bus_we;
    end
end
assign litedramcore_phaseinjector3_command_issue_r = interface2_bank_bus_dat_w[0];
always @(*) begin
    litedramcore_phaseinjector3_command_issue_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd26))) begin
        litedramcore_phaseinjector3_command_issue_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    litedramcore_phaseinjector3_command_issue_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd26))) begin
        litedramcore_phaseinjector3_command_issue_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi3_address0_r = interface2_bank_bus_dat_w[14:0];
always @(*) begin
    csrbank2_dfii_pi3_address0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd27))) begin
        csrbank2_dfii_pi3_address0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi3_address0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd27))) begin
        csrbank2_dfii_pi3_address0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi3_baddress0_r = interface2_bank_bus_dat_w[2:0];
always @(*) begin
    csrbank2_dfii_pi3_baddress0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd28))) begin
        csrbank2_dfii_pi3_baddress0_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi3_baddress0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd28))) begin
        csrbank2_dfii_pi3_baddress0_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi3_wrdata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi3_wrdata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd29))) begin
        csrbank2_dfii_pi3_wrdata1_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi3_wrdata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd29))) begin
        csrbank2_dfii_pi3_wrdata1_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi3_wrdata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi3_wrdata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd30))) begin
        csrbank2_dfii_pi3_wrdata0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi3_wrdata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd30))) begin
        csrbank2_dfii_pi3_wrdata0_we <= (~interface2_bank_bus_we);
    end
end
assign csrbank2_dfii_pi3_rddata1_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi3_rddata1_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd31))) begin
        csrbank2_dfii_pi3_rddata1_we <= (~interface2_bank_bus_we);
    end
end
always @(*) begin
    csrbank2_dfii_pi3_rddata1_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 5'd31))) begin
        csrbank2_dfii_pi3_rddata1_re <= interface2_bank_bus_we;
    end
end
assign csrbank2_dfii_pi3_rddata0_r = interface2_bank_bus_dat_w[31:0];
always @(*) begin
    csrbank2_dfii_pi3_rddata0_re <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 6'd32))) begin
        csrbank2_dfii_pi3_rddata0_re <= interface2_bank_bus_we;
    end
end
always @(*) begin
    csrbank2_dfii_pi3_rddata0_we <= 1'd0;
    if ((csrbank2_sel & (interface2_bank_bus_adr[8:0] == 6'd32))) begin
        csrbank2_dfii_pi3_rddata0_we <= (~interface2_bank_bus_we);
    end
end
assign litedramcore_sel = litedramcore_storage[0];
assign litedramcore_cke = litedramcore_storage[1];
assign litedramcore_odt = litedramcore_storage[2];
assign litedramcore_reset_n = litedramcore_storage[3];
assign csrbank2_dfii_control0_w = litedramcore_storage[3:0];
assign litedramcore_phaseinjector0_csrfield_cs = litedramcore_phaseinjector0_command_storage[0];
assign litedramcore_phaseinjector0_csrfield_we = litedramcore_phaseinjector0_command_storage[1];
assign litedramcore_phaseinjector0_csrfield_cas = litedramcore_phaseinjector0_command_storage[2];
assign litedramcore_phaseinjector0_csrfield_ras = litedramcore_phaseinjector0_command_storage[3];
assign litedramcore_phaseinjector0_csrfield_wren = litedramcore_phaseinjector0_command_storage[4];
assign litedramcore_phaseinjector0_csrfield_rden = litedramcore_phaseinjector0_command_storage[5];
assign csrbank2_dfii_pi0_command0_w = litedramcore_phaseinjector0_command_storage[5:0];
assign csrbank2_dfii_pi0_address0_w = litedramcore_phaseinjector0_address_storage[14:0];
assign csrbank2_dfii_pi0_baddress0_w = litedramcore_phaseinjector0_baddress_storage[2:0];
assign csrbank2_dfii_pi0_wrdata1_w = litedramcore_phaseinjector0_wrdata_storage[63:32];
assign csrbank2_dfii_pi0_wrdata0_w = litedramcore_phaseinjector0_wrdata_storage[31:0];
assign csrbank2_dfii_pi0_rddata1_w = litedramcore_phaseinjector0_rddata_status[63:32];
assign csrbank2_dfii_pi0_rddata0_w = litedramcore_phaseinjector0_rddata_status[31:0];
assign litedramcore_phaseinjector0_rddata_we = csrbank2_dfii_pi0_rddata0_we;
assign litedramcore_phaseinjector1_csrfield_cs = litedramcore_phaseinjector1_command_storage[0];
assign litedramcore_phaseinjector1_csrfield_we = litedramcore_phaseinjector1_command_storage[1];
assign litedramcore_phaseinjector1_csrfield_cas = litedramcore_phaseinjector1_command_storage[2];
assign litedramcore_phaseinjector1_csrfield_ras = litedramcore_phaseinjector1_command_storage[3];
assign litedramcore_phaseinjector1_csrfield_wren = litedramcore_phaseinjector1_command_storage[4];
assign litedramcore_phaseinjector1_csrfield_rden = litedramcore_phaseinjector1_command_storage[5];
assign csrbank2_dfii_pi1_command0_w = litedramcore_phaseinjector1_command_storage[5:0];
assign csrbank2_dfii_pi1_address0_w = litedramcore_phaseinjector1_address_storage[14:0];
assign csrbank2_dfii_pi1_baddress0_w = litedramcore_phaseinjector1_baddress_storage[2:0];
assign csrbank2_dfii_pi1_wrdata1_w = litedramcore_phaseinjector1_wrdata_storage[63:32];
assign csrbank2_dfii_pi1_wrdata0_w = litedramcore_phaseinjector1_wrdata_storage[31:0];
assign csrbank2_dfii_pi1_rddata1_w = litedramcore_phaseinjector1_rddata_status[63:32];
assign csrbank2_dfii_pi1_rddata0_w = litedramcore_phaseinjector1_rddata_status[31:0];
assign litedramcore_phaseinjector1_rddata_we = csrbank2_dfii_pi1_rddata0_we;
assign litedramcore_phaseinjector2_csrfield_cs = litedramcore_phaseinjector2_command_storage[0];
assign litedramcore_phaseinjector2_csrfield_we = litedramcore_phaseinjector2_command_storage[1];
assign litedramcore_phaseinjector2_csrfield_cas = litedramcore_phaseinjector2_command_storage[2];
assign litedramcore_phaseinjector2_csrfield_ras = litedramcore_phaseinjector2_command_storage[3];
assign litedramcore_phaseinjector2_csrfield_wren = litedramcore_phaseinjector2_command_storage[4];
assign litedramcore_phaseinjector2_csrfield_rden = litedramcore_phaseinjector2_command_storage[5];
assign csrbank2_dfii_pi2_command0_w = litedramcore_phaseinjector2_command_storage[5:0];
assign csrbank2_dfii_pi2_address0_w = litedramcore_phaseinjector2_address_storage[14:0];
assign csrbank2_dfii_pi2_baddress0_w = litedramcore_phaseinjector2_baddress_storage[2:0];
assign csrbank2_dfii_pi2_wrdata1_w = litedramcore_phaseinjector2_wrdata_storage[63:32];
assign csrbank2_dfii_pi2_wrdata0_w = litedramcore_phaseinjector2_wrdata_storage[31:0];
assign csrbank2_dfii_pi2_rddata1_w = litedramcore_phaseinjector2_rddata_status[63:32];
assign csrbank2_dfii_pi2_rddata0_w = litedramcore_phaseinjector2_rddata_status[31:0];
assign litedramcore_phaseinjector2_rddata_we = csrbank2_dfii_pi2_rddata0_we;
assign litedramcore_phaseinjector3_csrfield_cs = litedramcore_phaseinjector3_command_storage[0];
assign litedramcore_phaseinjector3_csrfield_we = litedramcore_phaseinjector3_command_storage[1];
assign litedramcore_phaseinjector3_csrfield_cas = litedramcore_phaseinjector3_command_storage[2];
assign litedramcore_phaseinjector3_csrfield_ras = litedramcore_phaseinjector3_command_storage[3];
assign litedramcore_phaseinjector3_csrfield_wren = litedramcore_phaseinjector3_command_storage[4];
assign litedramcore_phaseinjector3_csrfield_rden = litedramcore_phaseinjector3_command_storage[5];
assign csrbank2_dfii_pi3_command0_w = litedramcore_phaseinjector3_command_storage[5:0];
assign csrbank2_dfii_pi3_address0_w = litedramcore_phaseinjector3_address_storage[14:0];
assign csrbank2_dfii_pi3_baddress0_w = litedramcore_phaseinjector3_baddress_storage[2:0];
assign csrbank2_dfii_pi3_wrdata1_w = litedramcore_phaseinjector3_wrdata_storage[63:32];
assign csrbank2_dfii_pi3_wrdata0_w = litedramcore_phaseinjector3_wrdata_storage[31:0];
assign csrbank2_dfii_pi3_rddata1_w = litedramcore_phaseinjector3_rddata_status[63:32];
assign csrbank2_dfii_pi3_rddata0_w = litedramcore_phaseinjector3_rddata_status[31:0];
assign litedramcore_phaseinjector3_rddata_we = csrbank2_dfii_pi3_rddata0_we;
assign csr_interconnect_adr = litedramcore_adr;
assign csr_interconnect_we = litedramcore_we;
assign csr_interconnect_dat_w = litedramcore_dat_w;
assign litedramcore_dat_r = csr_interconnect_dat_r;
assign interface0_bank_bus_adr = csr_interconnect_adr;
assign interface1_bank_bus_adr = csr_interconnect_adr;
assign interface2_bank_bus_adr = csr_interconnect_adr;
assign interface0_bank_bus_we = csr_interconnect_we;
assign interface1_bank_bus_we = csr_interconnect_we;
assign interface2_bank_bus_we = csr_interconnect_we;
assign interface0_bank_bus_dat_w = csr_interconnect_dat_w;
assign interface1_bank_bus_dat_w = csr_interconnect_dat_w;
assign interface2_bank_bus_dat_w = csr_interconnect_dat_w;
assign csr_interconnect_dat_r = ((interface0_bank_bus_dat_r | interface1_bank_bus_dat_r) | interface2_bank_bus_dat_r);
always @(*) begin
    rhs_array_muxed0 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[0];
        end
        1'd1: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[1];
        end
        2'd2: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[2];
        end
        2'd3: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[3];
        end
        3'd4: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[4];
        end
        3'd5: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[5];
        end
        3'd6: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[6];
        end
        default: begin
            rhs_array_muxed0 <= litedramcore_choose_cmd_valids[7];
        end
    endcase
end
always @(*) begin
    rhs_array_muxed1 <= 15'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            rhs_array_muxed1 <= litedramcore_bankmachine0_cmd_payload_a;
        end
        1'd1: begin
            rhs_array_muxed1 <= litedramcore_bankmachine1_cmd_payload_a;
        end
        2'd2: begin
            rhs_array_muxed1 <= litedramcore_bankmachine2_cmd_payload_a;
        end
        2'd3: begin
            rhs_array_muxed1 <= litedramcore_bankmachine3_cmd_payload_a;
        end
        3'd4: begin
            rhs_array_muxed1 <= litedramcore_bankmachine4_cmd_payload_a;
        end
        3'd5: begin
            rhs_array_muxed1 <= litedramcore_bankmachine5_cmd_payload_a;
        end
        3'd6: begin
            rhs_array_muxed1 <= litedramcore_bankmachine6_cmd_payload_a;
        end
        default: begin
            rhs_array_muxed1 <= litedramcore_bankmachine7_cmd_payload_a;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed2 <= 3'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            rhs_array_muxed2 <= litedramcore_bankmachine0_cmd_payload_ba;
        end
        1'd1: begin
            rhs_array_muxed2 <= litedramcore_bankmachine1_cmd_payload_ba;
        end
        2'd2: begin
            rhs_array_muxed2 <= litedramcore_bankmachine2_cmd_payload_ba;
        end
        2'd3: begin
            rhs_array_muxed2 <= litedramcore_bankmachine3_cmd_payload_ba;
        end
        3'd4: begin
            rhs_array_muxed2 <= litedramcore_bankmachine4_cmd_payload_ba;
        end
        3'd5: begin
            rhs_array_muxed2 <= litedramcore_bankmachine5_cmd_payload_ba;
        end
        3'd6: begin
            rhs_array_muxed2 <= litedramcore_bankmachine6_cmd_payload_ba;
        end
        default: begin
            rhs_array_muxed2 <= litedramcore_bankmachine7_cmd_payload_ba;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed3 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            rhs_array_muxed3 <= litedramcore_bankmachine0_cmd_payload_is_read;
        end
        1'd1: begin
            rhs_array_muxed3 <= litedramcore_bankmachine1_cmd_payload_is_read;
        end
        2'd2: begin
            rhs_array_muxed3 <= litedramcore_bankmachine2_cmd_payload_is_read;
        end
        2'd3: begin
            rhs_array_muxed3 <= litedramcore_bankmachine3_cmd_payload_is_read;
        end
        3'd4: begin
            rhs_array_muxed3 <= litedramcore_bankmachine4_cmd_payload_is_read;
        end
        3'd5: begin
            rhs_array_muxed3 <= litedramcore_bankmachine5_cmd_payload_is_read;
        end
        3'd6: begin
            rhs_array_muxed3 <= litedramcore_bankmachine6_cmd_payload_is_read;
        end
        default: begin
            rhs_array_muxed3 <= litedramcore_bankmachine7_cmd_payload_is_read;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed4 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            rhs_array_muxed4 <= litedramcore_bankmachine0_cmd_payload_is_write;
        end
        1'd1: begin
            rhs_array_muxed4 <= litedramcore_bankmachine1_cmd_payload_is_write;
        end
        2'd2: begin
            rhs_array_muxed4 <= litedramcore_bankmachine2_cmd_payload_is_write;
        end
        2'd3: begin
            rhs_array_muxed4 <= litedramcore_bankmachine3_cmd_payload_is_write;
        end
        3'd4: begin
            rhs_array_muxed4 <= litedramcore_bankmachine4_cmd_payload_is_write;
        end
        3'd5: begin
            rhs_array_muxed4 <= litedramcore_bankmachine5_cmd_payload_is_write;
        end
        3'd6: begin
            rhs_array_muxed4 <= litedramcore_bankmachine6_cmd_payload_is_write;
        end
        default: begin
            rhs_array_muxed4 <= litedramcore_bankmachine7_cmd_payload_is_write;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed5 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            rhs_array_muxed5 <= litedramcore_bankmachine0_cmd_payload_is_cmd;
        end
        1'd1: begin
            rhs_array_muxed5 <= litedramcore_bankmachine1_cmd_payload_is_cmd;
        end
        2'd2: begin
            rhs_array_muxed5 <= litedramcore_bankmachine2_cmd_payload_is_cmd;
        end
        2'd3: begin
            rhs_array_muxed5 <= litedramcore_bankmachine3_cmd_payload_is_cmd;
        end
        3'd4: begin
            rhs_array_muxed5 <= litedramcore_bankmachine4_cmd_payload_is_cmd;
        end
        3'd5: begin
            rhs_array_muxed5 <= litedramcore_bankmachine5_cmd_payload_is_cmd;
        end
        3'd6: begin
            rhs_array_muxed5 <= litedramcore_bankmachine6_cmd_payload_is_cmd;
        end
        default: begin
            rhs_array_muxed5 <= litedramcore_bankmachine7_cmd_payload_is_cmd;
        end
    endcase
end
always @(*) begin
    t_array_muxed0 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            t_array_muxed0 <= litedramcore_bankmachine0_cmd_payload_cas;
        end
        1'd1: begin
            t_array_muxed0 <= litedramcore_bankmachine1_cmd_payload_cas;
        end
        2'd2: begin
            t_array_muxed0 <= litedramcore_bankmachine2_cmd_payload_cas;
        end
        2'd3: begin
            t_array_muxed0 <= litedramcore_bankmachine3_cmd_payload_cas;
        end
        3'd4: begin
            t_array_muxed0 <= litedramcore_bankmachine4_cmd_payload_cas;
        end
        3'd5: begin
            t_array_muxed0 <= litedramcore_bankmachine5_cmd_payload_cas;
        end
        3'd6: begin
            t_array_muxed0 <= litedramcore_bankmachine6_cmd_payload_cas;
        end
        default: begin
            t_array_muxed0 <= litedramcore_bankmachine7_cmd_payload_cas;
        end
    endcase
end
always @(*) begin
    t_array_muxed1 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            t_array_muxed1 <= litedramcore_bankmachine0_cmd_payload_ras;
        end
        1'd1: begin
            t_array_muxed1 <= litedramcore_bankmachine1_cmd_payload_ras;
        end
        2'd2: begin
            t_array_muxed1 <= litedramcore_bankmachine2_cmd_payload_ras;
        end
        2'd3: begin
            t_array_muxed1 <= litedramcore_bankmachine3_cmd_payload_ras;
        end
        3'd4: begin
            t_array_muxed1 <= litedramcore_bankmachine4_cmd_payload_ras;
        end
        3'd5: begin
            t_array_muxed1 <= litedramcore_bankmachine5_cmd_payload_ras;
        end
        3'd6: begin
            t_array_muxed1 <= litedramcore_bankmachine6_cmd_payload_ras;
        end
        default: begin
            t_array_muxed1 <= litedramcore_bankmachine7_cmd_payload_ras;
        end
    endcase
end
always @(*) begin
    t_array_muxed2 <= 1'd0;
    case (litedramcore_choose_cmd_grant)
        1'd0: begin
            t_array_muxed2 <= litedramcore_bankmachine0_cmd_payload_we;
        end
        1'd1: begin
            t_array_muxed2 <= litedramcore_bankmachine1_cmd_payload_we;
        end
        2'd2: begin
            t_array_muxed2 <= litedramcore_bankmachine2_cmd_payload_we;
        end
        2'd3: begin
            t_array_muxed2 <= litedramcore_bankmachine3_cmd_payload_we;
        end
        3'd4: begin
            t_array_muxed2 <= litedramcore_bankmachine4_cmd_payload_we;
        end
        3'd5: begin
            t_array_muxed2 <= litedramcore_bankmachine5_cmd_payload_we;
        end
        3'd6: begin
            t_array_muxed2 <= litedramcore_bankmachine6_cmd_payload_we;
        end
        default: begin
            t_array_muxed2 <= litedramcore_bankmachine7_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed6 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[0];
        end
        1'd1: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[1];
        end
        2'd2: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[2];
        end
        2'd3: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[3];
        end
        3'd4: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[4];
        end
        3'd5: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[5];
        end
        3'd6: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[6];
        end
        default: begin
            rhs_array_muxed6 <= litedramcore_choose_req_valids[7];
        end
    endcase
end
always @(*) begin
    rhs_array_muxed7 <= 15'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            rhs_array_muxed7 <= litedramcore_bankmachine0_cmd_payload_a;
        end
        1'd1: begin
            rhs_array_muxed7 <= litedramcore_bankmachine1_cmd_payload_a;
        end
        2'd2: begin
            rhs_array_muxed7 <= litedramcore_bankmachine2_cmd_payload_a;
        end
        2'd3: begin
            rhs_array_muxed7 <= litedramcore_bankmachine3_cmd_payload_a;
        end
        3'd4: begin
            rhs_array_muxed7 <= litedramcore_bankmachine4_cmd_payload_a;
        end
        3'd5: begin
            rhs_array_muxed7 <= litedramcore_bankmachine5_cmd_payload_a;
        end
        3'd6: begin
            rhs_array_muxed7 <= litedramcore_bankmachine6_cmd_payload_a;
        end
        default: begin
            rhs_array_muxed7 <= litedramcore_bankmachine7_cmd_payload_a;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed8 <= 3'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            rhs_array_muxed8 <= litedramcore_bankmachine0_cmd_payload_ba;
        end
        1'd1: begin
            rhs_array_muxed8 <= litedramcore_bankmachine1_cmd_payload_ba;
        end
        2'd2: begin
            rhs_array_muxed8 <= litedramcore_bankmachine2_cmd_payload_ba;
        end
        2'd3: begin
            rhs_array_muxed8 <= litedramcore_bankmachine3_cmd_payload_ba;
        end
        3'd4: begin
            rhs_array_muxed8 <= litedramcore_bankmachine4_cmd_payload_ba;
        end
        3'd5: begin
            rhs_array_muxed8 <= litedramcore_bankmachine5_cmd_payload_ba;
        end
        3'd6: begin
            rhs_array_muxed8 <= litedramcore_bankmachine6_cmd_payload_ba;
        end
        default: begin
            rhs_array_muxed8 <= litedramcore_bankmachine7_cmd_payload_ba;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed9 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            rhs_array_muxed9 <= litedramcore_bankmachine0_cmd_payload_is_read;
        end
        1'd1: begin
            rhs_array_muxed9 <= litedramcore_bankmachine1_cmd_payload_is_read;
        end
        2'd2: begin
            rhs_array_muxed9 <= litedramcore_bankmachine2_cmd_payload_is_read;
        end
        2'd3: begin
            rhs_array_muxed9 <= litedramcore_bankmachine3_cmd_payload_is_read;
        end
        3'd4: begin
            rhs_array_muxed9 <= litedramcore_bankmachine4_cmd_payload_is_read;
        end
        3'd5: begin
            rhs_array_muxed9 <= litedramcore_bankmachine5_cmd_payload_is_read;
        end
        3'd6: begin
            rhs_array_muxed9 <= litedramcore_bankmachine6_cmd_payload_is_read;
        end
        default: begin
            rhs_array_muxed9 <= litedramcore_bankmachine7_cmd_payload_is_read;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed10 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            rhs_array_muxed10 <= litedramcore_bankmachine0_cmd_payload_is_write;
        end
        1'd1: begin
            rhs_array_muxed10 <= litedramcore_bankmachine1_cmd_payload_is_write;
        end
        2'd2: begin
            rhs_array_muxed10 <= litedramcore_bankmachine2_cmd_payload_is_write;
        end
        2'd3: begin
            rhs_array_muxed10 <= litedramcore_bankmachine3_cmd_payload_is_write;
        end
        3'd4: begin
            rhs_array_muxed10 <= litedramcore_bankmachine4_cmd_payload_is_write;
        end
        3'd5: begin
            rhs_array_muxed10 <= litedramcore_bankmachine5_cmd_payload_is_write;
        end
        3'd6: begin
            rhs_array_muxed10 <= litedramcore_bankmachine6_cmd_payload_is_write;
        end
        default: begin
            rhs_array_muxed10 <= litedramcore_bankmachine7_cmd_payload_is_write;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed11 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            rhs_array_muxed11 <= litedramcore_bankmachine0_cmd_payload_is_cmd;
        end
        1'd1: begin
            rhs_array_muxed11 <= litedramcore_bankmachine1_cmd_payload_is_cmd;
        end
        2'd2: begin
            rhs_array_muxed11 <= litedramcore_bankmachine2_cmd_payload_is_cmd;
        end
        2'd3: begin
            rhs_array_muxed11 <= litedramcore_bankmachine3_cmd_payload_is_cmd;
        end
        3'd4: begin
            rhs_array_muxed11 <= litedramcore_bankmachine4_cmd_payload_is_cmd;
        end
        3'd5: begin
            rhs_array_muxed11 <= litedramcore_bankmachine5_cmd_payload_is_cmd;
        end
        3'd6: begin
            rhs_array_muxed11 <= litedramcore_bankmachine6_cmd_payload_is_cmd;
        end
        default: begin
            rhs_array_muxed11 <= litedramcore_bankmachine7_cmd_payload_is_cmd;
        end
    endcase
end
always @(*) begin
    t_array_muxed3 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            t_array_muxed3 <= litedramcore_bankmachine0_cmd_payload_cas;
        end
        1'd1: begin
            t_array_muxed3 <= litedramcore_bankmachine1_cmd_payload_cas;
        end
        2'd2: begin
            t_array_muxed3 <= litedramcore_bankmachine2_cmd_payload_cas;
        end
        2'd3: begin
            t_array_muxed3 <= litedramcore_bankmachine3_cmd_payload_cas;
        end
        3'd4: begin
            t_array_muxed3 <= litedramcore_bankmachine4_cmd_payload_cas;
        end
        3'd5: begin
            t_array_muxed3 <= litedramcore_bankmachine5_cmd_payload_cas;
        end
        3'd6: begin
            t_array_muxed3 <= litedramcore_bankmachine6_cmd_payload_cas;
        end
        default: begin
            t_array_muxed3 <= litedramcore_bankmachine7_cmd_payload_cas;
        end
    endcase
end
always @(*) begin
    t_array_muxed4 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            t_array_muxed4 <= litedramcore_bankmachine0_cmd_payload_ras;
        end
        1'd1: begin
            t_array_muxed4 <= litedramcore_bankmachine1_cmd_payload_ras;
        end
        2'd2: begin
            t_array_muxed4 <= litedramcore_bankmachine2_cmd_payload_ras;
        end
        2'd3: begin
            t_array_muxed4 <= litedramcore_bankmachine3_cmd_payload_ras;
        end
        3'd4: begin
            t_array_muxed4 <= litedramcore_bankmachine4_cmd_payload_ras;
        end
        3'd5: begin
            t_array_muxed4 <= litedramcore_bankmachine5_cmd_payload_ras;
        end
        3'd6: begin
            t_array_muxed4 <= litedramcore_bankmachine6_cmd_payload_ras;
        end
        default: begin
            t_array_muxed4 <= litedramcore_bankmachine7_cmd_payload_ras;
        end
    endcase
end
always @(*) begin
    t_array_muxed5 <= 1'd0;
    case (litedramcore_choose_req_grant)
        1'd0: begin
            t_array_muxed5 <= litedramcore_bankmachine0_cmd_payload_we;
        end
        1'd1: begin
            t_array_muxed5 <= litedramcore_bankmachine1_cmd_payload_we;
        end
        2'd2: begin
            t_array_muxed5 <= litedramcore_bankmachine2_cmd_payload_we;
        end
        2'd3: begin
            t_array_muxed5 <= litedramcore_bankmachine3_cmd_payload_we;
        end
        3'd4: begin
            t_array_muxed5 <= litedramcore_bankmachine4_cmd_payload_we;
        end
        3'd5: begin
            t_array_muxed5 <= litedramcore_bankmachine5_cmd_payload_we;
        end
        3'd6: begin
            t_array_muxed5 <= litedramcore_bankmachine6_cmd_payload_we;
        end
        default: begin
            t_array_muxed5 <= litedramcore_bankmachine7_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed12 <= 22'd0;
    case (litedramcore_roundrobin0_grant)
        default: begin
            rhs_array_muxed12 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed13 <= 1'd0;
    case (litedramcore_roundrobin0_grant)
        default: begin
            rhs_array_muxed13 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed14 <= 1'd0;
    case (litedramcore_roundrobin0_grant)
        default: begin
            rhs_array_muxed14 <= (((user_port_cmd_payload_addr[9:7] == 1'd0) & (~(((((((litedramcore_locked0 | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed15 <= 22'd0;
    case (litedramcore_roundrobin1_grant)
        default: begin
            rhs_array_muxed15 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed16 <= 1'd0;
    case (litedramcore_roundrobin1_grant)
        default: begin
            rhs_array_muxed16 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed17 <= 1'd0;
    case (litedramcore_roundrobin1_grant)
        default: begin
            rhs_array_muxed17 <= (((user_port_cmd_payload_addr[9:7] == 1'd1) & (~(((((((litedramcore_locked1 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed18 <= 22'd0;
    case (litedramcore_roundrobin2_grant)
        default: begin
            rhs_array_muxed18 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed19 <= 1'd0;
    case (litedramcore_roundrobin2_grant)
        default: begin
            rhs_array_muxed19 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed20 <= 1'd0;
    case (litedramcore_roundrobin2_grant)
        default: begin
            rhs_array_muxed20 <= (((user_port_cmd_payload_addr[9:7] == 2'd2) & (~(((((((litedramcore_locked2 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed21 <= 22'd0;
    case (litedramcore_roundrobin3_grant)
        default: begin
            rhs_array_muxed21 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed22 <= 1'd0;
    case (litedramcore_roundrobin3_grant)
        default: begin
            rhs_array_muxed22 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed23 <= 1'd0;
    case (litedramcore_roundrobin3_grant)
        default: begin
            rhs_array_muxed23 <= (((user_port_cmd_payload_addr[9:7] == 2'd3) & (~(((((((litedramcore_locked3 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed24 <= 22'd0;
    case (litedramcore_roundrobin4_grant)
        default: begin
            rhs_array_muxed24 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed25 <= 1'd0;
    case (litedramcore_roundrobin4_grant)
        default: begin
            rhs_array_muxed25 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed26 <= 1'd0;
    case (litedramcore_roundrobin4_grant)
        default: begin
            rhs_array_muxed26 <= (((user_port_cmd_payload_addr[9:7] == 3'd4) & (~(((((((litedramcore_locked4 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed27 <= 22'd0;
    case (litedramcore_roundrobin5_grant)
        default: begin
            rhs_array_muxed27 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed28 <= 1'd0;
    case (litedramcore_roundrobin5_grant)
        default: begin
            rhs_array_muxed28 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed29 <= 1'd0;
    case (litedramcore_roundrobin5_grant)
        default: begin
            rhs_array_muxed29 <= (((user_port_cmd_payload_addr[9:7] == 3'd5) & (~(((((((litedramcore_locked5 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed30 <= 22'd0;
    case (litedramcore_roundrobin6_grant)
        default: begin
            rhs_array_muxed30 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed31 <= 1'd0;
    case (litedramcore_roundrobin6_grant)
        default: begin
            rhs_array_muxed31 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed32 <= 1'd0;
    case (litedramcore_roundrobin6_grant)
        default: begin
            rhs_array_muxed32 <= (((user_port_cmd_payload_addr[9:7] == 3'd6) & (~(((((((litedramcore_locked6 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank7_lock & (litedramcore_roundrobin7_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    rhs_array_muxed33 <= 22'd0;
    case (litedramcore_roundrobin7_grant)
        default: begin
            rhs_array_muxed33 <= {user_port_cmd_payload_addr[24:10], user_port_cmd_payload_addr[6:0]};
        end
    endcase
end
always @(*) begin
    rhs_array_muxed34 <= 1'd0;
    case (litedramcore_roundrobin7_grant)
        default: begin
            rhs_array_muxed34 <= user_port_cmd_payload_we;
        end
    endcase
end
always @(*) begin
    rhs_array_muxed35 <= 1'd0;
    case (litedramcore_roundrobin7_grant)
        default: begin
            rhs_array_muxed35 <= (((user_port_cmd_payload_addr[9:7] == 3'd7) & (~(((((((litedramcore_locked7 | (litedramcore_interface_bank0_lock & (litedramcore_roundrobin0_grant == 1'd0))) | (litedramcore_interface_bank1_lock & (litedramcore_roundrobin1_grant == 1'd0))) | (litedramcore_interface_bank2_lock & (litedramcore_roundrobin2_grant == 1'd0))) | (litedramcore_interface_bank3_lock & (litedramcore_roundrobin3_grant == 1'd0))) | (litedramcore_interface_bank4_lock & (litedramcore_roundrobin4_grant == 1'd0))) | (litedramcore_interface_bank5_lock & (litedramcore_roundrobin5_grant == 1'd0))) | (litedramcore_interface_bank6_lock & (litedramcore_roundrobin6_grant == 1'd0))))) & user_port_cmd_valid);
        end
    endcase
end
always @(*) begin
    array_muxed0 <= 3'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed0 <= litedramcore_nop_ba[2:0];
        end
        1'd1: begin
            array_muxed0 <= litedramcore_choose_cmd_cmd_payload_ba[2:0];
        end
        2'd2: begin
            array_muxed0 <= litedramcore_choose_req_cmd_payload_ba[2:0];
        end
        default: begin
            array_muxed0 <= litedramcore_cmd_payload_ba[2:0];
        end
    endcase
end
always @(*) begin
    array_muxed1 <= 15'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed1 <= litedramcore_nop_a;
        end
        1'd1: begin
            array_muxed1 <= litedramcore_choose_cmd_cmd_payload_a;
        end
        2'd2: begin
            array_muxed1 <= litedramcore_choose_req_cmd_payload_a;
        end
        default: begin
            array_muxed1 <= litedramcore_cmd_payload_a;
        end
    endcase
end
always @(*) begin
    array_muxed2 <= 1'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed2 <= 1'd0;
        end
        1'd1: begin
            array_muxed2 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_cas);
        end
        2'd2: begin
            array_muxed2 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_cas);
        end
        default: begin
            array_muxed2 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_cas);
        end
    endcase
end
always @(*) begin
    array_muxed3 <= 1'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed3 <= 1'd0;
        end
        1'd1: begin
            array_muxed3 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_ras);
        end
        2'd2: begin
            array_muxed3 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_ras);
        end
        default: begin
            array_muxed3 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_ras);
        end
    endcase
end
always @(*) begin
    array_muxed4 <= 1'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed4 <= 1'd0;
        end
        1'd1: begin
            array_muxed4 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_we);
        end
        2'd2: begin
            array_muxed4 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_we);
        end
        default: begin
            array_muxed4 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_we);
        end
    endcase
end
always @(*) begin
    array_muxed5 <= 1'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed5 <= 1'd0;
        end
        1'd1: begin
            array_muxed5 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_read);
        end
        2'd2: begin
            array_muxed5 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_read);
        end
        default: begin
            array_muxed5 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_read);
        end
    endcase
end
always @(*) begin
    array_muxed6 <= 1'd0;
    case (litedramcore_steerer_sel0)
        1'd0: begin
            array_muxed6 <= 1'd0;
        end
        1'd1: begin
            array_muxed6 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_write);
        end
        2'd2: begin
            array_muxed6 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_write);
        end
        default: begin
            array_muxed6 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_write);
        end
    endcase
end
always @(*) begin
    array_muxed7 <= 3'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed7 <= litedramcore_nop_ba[2:0];
        end
        1'd1: begin
            array_muxed7 <= litedramcore_choose_cmd_cmd_payload_ba[2:0];
        end
        2'd2: begin
            array_muxed7 <= litedramcore_choose_req_cmd_payload_ba[2:0];
        end
        default: begin
            array_muxed7 <= litedramcore_cmd_payload_ba[2:0];
        end
    endcase
end
always @(*) begin
    array_muxed8 <= 15'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed8 <= litedramcore_nop_a;
        end
        1'd1: begin
            array_muxed8 <= litedramcore_choose_cmd_cmd_payload_a;
        end
        2'd2: begin
            array_muxed8 <= litedramcore_choose_req_cmd_payload_a;
        end
        default: begin
            array_muxed8 <= litedramcore_cmd_payload_a;
        end
    endcase
end
always @(*) begin
    array_muxed9 <= 1'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed9 <= 1'd0;
        end
        1'd1: begin
            array_muxed9 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_cas);
        end
        2'd2: begin
            array_muxed9 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_cas);
        end
        default: begin
            array_muxed9 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_cas);
        end
    endcase
end
always @(*) begin
    array_muxed10 <= 1'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed10 <= 1'd0;
        end
        1'd1: begin
            array_muxed10 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_ras);
        end
        2'd2: begin
            array_muxed10 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_ras);
        end
        default: begin
            array_muxed10 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_ras);
        end
    endcase
end
always @(*) begin
    array_muxed11 <= 1'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed11 <= 1'd0;
        end
        1'd1: begin
            array_muxed11 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_we);
        end
        2'd2: begin
            array_muxed11 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_we);
        end
        default: begin
            array_muxed11 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_we);
        end
    endcase
end
always @(*) begin
    array_muxed12 <= 1'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed12 <= 1'd0;
        end
        1'd1: begin
            array_muxed12 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_read);
        end
        2'd2: begin
            array_muxed12 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_read);
        end
        default: begin
            array_muxed12 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_read);
        end
    endcase
end
always @(*) begin
    array_muxed13 <= 1'd0;
    case (litedramcore_steerer_sel1)
        1'd0: begin
            array_muxed13 <= 1'd0;
        end
        1'd1: begin
            array_muxed13 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_write);
        end
        2'd2: begin
            array_muxed13 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_write);
        end
        default: begin
            array_muxed13 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_write);
        end
    endcase
end
always @(*) begin
    array_muxed14 <= 3'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed14 <= litedramcore_nop_ba[2:0];
        end
        1'd1: begin
            array_muxed14 <= litedramcore_choose_cmd_cmd_payload_ba[2:0];
        end
        2'd2: begin
            array_muxed14 <= litedramcore_choose_req_cmd_payload_ba[2:0];
        end
        default: begin
            array_muxed14 <= litedramcore_cmd_payload_ba[2:0];
        end
    endcase
end
always @(*) begin
    array_muxed15 <= 15'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed15 <= litedramcore_nop_a;
        end
        1'd1: begin
            array_muxed15 <= litedramcore_choose_cmd_cmd_payload_a;
        end
        2'd2: begin
            array_muxed15 <= litedramcore_choose_req_cmd_payload_a;
        end
        default: begin
            array_muxed15 <= litedramcore_cmd_payload_a;
        end
    endcase
end
always @(*) begin
    array_muxed16 <= 1'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed16 <= 1'd0;
        end
        1'd1: begin
            array_muxed16 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_cas);
        end
        2'd2: begin
            array_muxed16 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_cas);
        end
        default: begin
            array_muxed16 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_cas);
        end
    endcase
end
always @(*) begin
    array_muxed17 <= 1'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed17 <= 1'd0;
        end
        1'd1: begin
            array_muxed17 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_ras);
        end
        2'd2: begin
            array_muxed17 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_ras);
        end
        default: begin
            array_muxed17 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_ras);
        end
    endcase
end
always @(*) begin
    array_muxed18 <= 1'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed18 <= 1'd0;
        end
        1'd1: begin
            array_muxed18 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_we);
        end
        2'd2: begin
            array_muxed18 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_we);
        end
        default: begin
            array_muxed18 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_we);
        end
    endcase
end
always @(*) begin
    array_muxed19 <= 1'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed19 <= 1'd0;
        end
        1'd1: begin
            array_muxed19 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_read);
        end
        2'd2: begin
            array_muxed19 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_read);
        end
        default: begin
            array_muxed19 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_read);
        end
    endcase
end
always @(*) begin
    array_muxed20 <= 1'd0;
    case (litedramcore_steerer_sel2)
        1'd0: begin
            array_muxed20 <= 1'd0;
        end
        1'd1: begin
            array_muxed20 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_write);
        end
        2'd2: begin
            array_muxed20 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_write);
        end
        default: begin
            array_muxed20 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_write);
        end
    endcase
end
always @(*) begin
    array_muxed21 <= 3'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed21 <= litedramcore_nop_ba[2:0];
        end
        1'd1: begin
            array_muxed21 <= litedramcore_choose_cmd_cmd_payload_ba[2:0];
        end
        2'd2: begin
            array_muxed21 <= litedramcore_choose_req_cmd_payload_ba[2:0];
        end
        default: begin
            array_muxed21 <= litedramcore_cmd_payload_ba[2:0];
        end
    endcase
end
always @(*) begin
    array_muxed22 <= 15'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed22 <= litedramcore_nop_a;
        end
        1'd1: begin
            array_muxed22 <= litedramcore_choose_cmd_cmd_payload_a;
        end
        2'd2: begin
            array_muxed22 <= litedramcore_choose_req_cmd_payload_a;
        end
        default: begin
            array_muxed22 <= litedramcore_cmd_payload_a;
        end
    endcase
end
always @(*) begin
    array_muxed23 <= 1'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed23 <= 1'd0;
        end
        1'd1: begin
            array_muxed23 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_cas);
        end
        2'd2: begin
            array_muxed23 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_cas);
        end
        default: begin
            array_muxed23 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_cas);
        end
    endcase
end
always @(*) begin
    array_muxed24 <= 1'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed24 <= 1'd0;
        end
        1'd1: begin
            array_muxed24 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_ras);
        end
        2'd2: begin
            array_muxed24 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_ras);
        end
        default: begin
            array_muxed24 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_ras);
        end
    endcase
end
always @(*) begin
    array_muxed25 <= 1'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed25 <= 1'd0;
        end
        1'd1: begin
            array_muxed25 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_we);
        end
        2'd2: begin
            array_muxed25 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_we);
        end
        default: begin
            array_muxed25 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_we);
        end
    endcase
end
always @(*) begin
    array_muxed26 <= 1'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed26 <= 1'd0;
        end
        1'd1: begin
            array_muxed26 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_read);
        end
        2'd2: begin
            array_muxed26 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_read);
        end
        default: begin
            array_muxed26 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_read);
        end
    endcase
end
always @(*) begin
    array_muxed27 <= 1'd0;
    case (litedramcore_steerer_sel3)
        1'd0: begin
            array_muxed27 <= 1'd0;
        end
        1'd1: begin
            array_muxed27 <= ((litedramcore_choose_cmd_cmd_valid & litedramcore_choose_cmd_cmd_ready) & litedramcore_choose_cmd_cmd_payload_is_write);
        end
        2'd2: begin
            array_muxed27 <= ((litedramcore_choose_req_cmd_valid & litedramcore_choose_req_cmd_ready) & litedramcore_choose_req_cmd_payload_is_write);
        end
        default: begin
            array_muxed27 <= ((litedramcore_cmd_valid & litedramcore_cmd_ready) & litedramcore_cmd_payload_is_write);
        end
    endcase
end
assign xilinxasyncresetsynchronizerimpl0 = (~locked);
assign xilinxasyncresetsynchronizerimpl1 = (~locked);
assign xilinxasyncresetsynchronizerimpl2 = (~locked);
assign xilinxasyncresetsynchronizerimpl3 = (~locked);


//------------------------------------------------------------------------------
// Synchronous Logic
//------------------------------------------------------------------------------

always @(posedge iodelay_clk) begin
    if ((reset_counter != 1'd0)) begin
        reset_counter <= (reset_counter - 1'd1);
    end else begin
        ic_reset <= 1'd0;
    end
    if (iodelay_rst) begin
        reset_counter <= 4'd15;
        ic_reset <= 1'd1;
    end
end

always @(posedge sys_clk) begin
    k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline0 <= k7ddrphy_dqs_oe_delay_tappeddelayline;
    k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1 <= k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline0;
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip0_value0 <= (k7ddrphy_bitslip0_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip0_value0 <= 3'd7;
    end
    k7ddrphy_bitslip0_r0 <= {k7ddrphy_dqspattern_o, k7ddrphy_bitslip0_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip1_value0 <= (k7ddrphy_bitslip1_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip1_value0 <= 3'd7;
    end
    k7ddrphy_bitslip1_r0 <= {k7ddrphy_dqspattern_o, k7ddrphy_bitslip1_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip2_value0 <= (k7ddrphy_bitslip2_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip2_value0 <= 3'd7;
    end
    k7ddrphy_bitslip2_r0 <= {k7ddrphy_dqspattern_o, k7ddrphy_bitslip2_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip3_value0 <= (k7ddrphy_bitslip3_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip3_value0 <= 3'd7;
    end
    k7ddrphy_bitslip3_r0 <= {k7ddrphy_dqspattern_o, k7ddrphy_bitslip3_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip0_value1 <= (k7ddrphy_bitslip0_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip0_value1 <= 3'd7;
    end
    k7ddrphy_bitslip0_r1 <= {{k7ddrphy_dfi_p3_wrdata_mask[4], k7ddrphy_dfi_p3_wrdata_mask[0], k7ddrphy_dfi_p2_wrdata_mask[4], k7ddrphy_dfi_p2_wrdata_mask[0], k7ddrphy_dfi_p1_wrdata_mask[4], k7ddrphy_dfi_p1_wrdata_mask[0], k7ddrphy_dfi_p0_wrdata_mask[4], k7ddrphy_dfi_p0_wrdata_mask[0]}, k7ddrphy_bitslip0_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip1_value1 <= (k7ddrphy_bitslip1_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip1_value1 <= 3'd7;
    end
    k7ddrphy_bitslip1_r1 <= {{k7ddrphy_dfi_p3_wrdata_mask[5], k7ddrphy_dfi_p3_wrdata_mask[1], k7ddrphy_dfi_p2_wrdata_mask[5], k7ddrphy_dfi_p2_wrdata_mask[1], k7ddrphy_dfi_p1_wrdata_mask[5], k7ddrphy_dfi_p1_wrdata_mask[1], k7ddrphy_dfi_p0_wrdata_mask[5], k7ddrphy_dfi_p0_wrdata_mask[1]}, k7ddrphy_bitslip1_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip2_value1 <= (k7ddrphy_bitslip2_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip2_value1 <= 3'd7;
    end
    k7ddrphy_bitslip2_r1 <= {{k7ddrphy_dfi_p3_wrdata_mask[6], k7ddrphy_dfi_p3_wrdata_mask[2], k7ddrphy_dfi_p2_wrdata_mask[6], k7ddrphy_dfi_p2_wrdata_mask[2], k7ddrphy_dfi_p1_wrdata_mask[6], k7ddrphy_dfi_p1_wrdata_mask[2], k7ddrphy_dfi_p0_wrdata_mask[6], k7ddrphy_dfi_p0_wrdata_mask[2]}, k7ddrphy_bitslip2_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip3_value1 <= (k7ddrphy_bitslip3_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip3_value1 <= 3'd7;
    end
    k7ddrphy_bitslip3_r1 <= {{k7ddrphy_dfi_p3_wrdata_mask[7], k7ddrphy_dfi_p3_wrdata_mask[3], k7ddrphy_dfi_p2_wrdata_mask[7], k7ddrphy_dfi_p2_wrdata_mask[3], k7ddrphy_dfi_p1_wrdata_mask[7], k7ddrphy_dfi_p1_wrdata_mask[3], k7ddrphy_dfi_p0_wrdata_mask[7], k7ddrphy_dfi_p0_wrdata_mask[3]}, k7ddrphy_bitslip3_r1[15:8]};
    k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline0 <= k7ddrphy_dq_oe_delay_tappeddelayline;
    k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1 <= k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline0;
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip0_value2 <= (k7ddrphy_bitslip0_value2 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip0_value2 <= 3'd7;
    end
    k7ddrphy_bitslip0_r2 <= {{k7ddrphy_dfi_p3_wrdata[32], k7ddrphy_dfi_p3_wrdata[0], k7ddrphy_dfi_p2_wrdata[32], k7ddrphy_dfi_p2_wrdata[0], k7ddrphy_dfi_p1_wrdata[32], k7ddrphy_dfi_p1_wrdata[0], k7ddrphy_dfi_p0_wrdata[32], k7ddrphy_dfi_p0_wrdata[0]}, k7ddrphy_bitslip0_r2[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip0_value3 <= (k7ddrphy_bitslip0_value3 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip0_value3 <= 3'd7;
    end
    k7ddrphy_bitslip0_r3 <= {k7ddrphy_bitslip03, k7ddrphy_bitslip0_r3[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip1_value2 <= (k7ddrphy_bitslip1_value2 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip1_value2 <= 3'd7;
    end
    k7ddrphy_bitslip1_r2 <= {{k7ddrphy_dfi_p3_wrdata[33], k7ddrphy_dfi_p3_wrdata[1], k7ddrphy_dfi_p2_wrdata[33], k7ddrphy_dfi_p2_wrdata[1], k7ddrphy_dfi_p1_wrdata[33], k7ddrphy_dfi_p1_wrdata[1], k7ddrphy_dfi_p0_wrdata[33], k7ddrphy_dfi_p0_wrdata[1]}, k7ddrphy_bitslip1_r2[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip1_value3 <= (k7ddrphy_bitslip1_value3 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip1_value3 <= 3'd7;
    end
    k7ddrphy_bitslip1_r3 <= {k7ddrphy_bitslip13, k7ddrphy_bitslip1_r3[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip2_value2 <= (k7ddrphy_bitslip2_value2 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip2_value2 <= 3'd7;
    end
    k7ddrphy_bitslip2_r2 <= {{k7ddrphy_dfi_p3_wrdata[34], k7ddrphy_dfi_p3_wrdata[2], k7ddrphy_dfi_p2_wrdata[34], k7ddrphy_dfi_p2_wrdata[2], k7ddrphy_dfi_p1_wrdata[34], k7ddrphy_dfi_p1_wrdata[2], k7ddrphy_dfi_p0_wrdata[34], k7ddrphy_dfi_p0_wrdata[2]}, k7ddrphy_bitslip2_r2[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip2_value3 <= (k7ddrphy_bitslip2_value3 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip2_value3 <= 3'd7;
    end
    k7ddrphy_bitslip2_r3 <= {k7ddrphy_bitslip23, k7ddrphy_bitslip2_r3[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip3_value2 <= (k7ddrphy_bitslip3_value2 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip3_value2 <= 3'd7;
    end
    k7ddrphy_bitslip3_r2 <= {{k7ddrphy_dfi_p3_wrdata[35], k7ddrphy_dfi_p3_wrdata[3], k7ddrphy_dfi_p2_wrdata[35], k7ddrphy_dfi_p2_wrdata[3], k7ddrphy_dfi_p1_wrdata[35], k7ddrphy_dfi_p1_wrdata[3], k7ddrphy_dfi_p0_wrdata[35], k7ddrphy_dfi_p0_wrdata[3]}, k7ddrphy_bitslip3_r2[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip3_value3 <= (k7ddrphy_bitslip3_value3 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip3_value3 <= 3'd7;
    end
    k7ddrphy_bitslip3_r3 <= {k7ddrphy_bitslip33, k7ddrphy_bitslip3_r3[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip4_value0 <= (k7ddrphy_bitslip4_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip4_value0 <= 3'd7;
    end
    k7ddrphy_bitslip4_r0 <= {{k7ddrphy_dfi_p3_wrdata[36], k7ddrphy_dfi_p3_wrdata[4], k7ddrphy_dfi_p2_wrdata[36], k7ddrphy_dfi_p2_wrdata[4], k7ddrphy_dfi_p1_wrdata[36], k7ddrphy_dfi_p1_wrdata[4], k7ddrphy_dfi_p0_wrdata[36], k7ddrphy_dfi_p0_wrdata[4]}, k7ddrphy_bitslip4_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip4_value1 <= (k7ddrphy_bitslip4_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip4_value1 <= 3'd7;
    end
    k7ddrphy_bitslip4_r1 <= {k7ddrphy_bitslip41, k7ddrphy_bitslip4_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip5_value0 <= (k7ddrphy_bitslip5_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip5_value0 <= 3'd7;
    end
    k7ddrphy_bitslip5_r0 <= {{k7ddrphy_dfi_p3_wrdata[37], k7ddrphy_dfi_p3_wrdata[5], k7ddrphy_dfi_p2_wrdata[37], k7ddrphy_dfi_p2_wrdata[5], k7ddrphy_dfi_p1_wrdata[37], k7ddrphy_dfi_p1_wrdata[5], k7ddrphy_dfi_p0_wrdata[37], k7ddrphy_dfi_p0_wrdata[5]}, k7ddrphy_bitslip5_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip5_value1 <= (k7ddrphy_bitslip5_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip5_value1 <= 3'd7;
    end
    k7ddrphy_bitslip5_r1 <= {k7ddrphy_bitslip51, k7ddrphy_bitslip5_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip6_value0 <= (k7ddrphy_bitslip6_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip6_value0 <= 3'd7;
    end
    k7ddrphy_bitslip6_r0 <= {{k7ddrphy_dfi_p3_wrdata[38], k7ddrphy_dfi_p3_wrdata[6], k7ddrphy_dfi_p2_wrdata[38], k7ddrphy_dfi_p2_wrdata[6], k7ddrphy_dfi_p1_wrdata[38], k7ddrphy_dfi_p1_wrdata[6], k7ddrphy_dfi_p0_wrdata[38], k7ddrphy_dfi_p0_wrdata[6]}, k7ddrphy_bitslip6_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip6_value1 <= (k7ddrphy_bitslip6_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip6_value1 <= 3'd7;
    end
    k7ddrphy_bitslip6_r1 <= {k7ddrphy_bitslip61, k7ddrphy_bitslip6_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip7_value0 <= (k7ddrphy_bitslip7_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip7_value0 <= 3'd7;
    end
    k7ddrphy_bitslip7_r0 <= {{k7ddrphy_dfi_p3_wrdata[39], k7ddrphy_dfi_p3_wrdata[7], k7ddrphy_dfi_p2_wrdata[39], k7ddrphy_dfi_p2_wrdata[7], k7ddrphy_dfi_p1_wrdata[39], k7ddrphy_dfi_p1_wrdata[7], k7ddrphy_dfi_p0_wrdata[39], k7ddrphy_dfi_p0_wrdata[7]}, k7ddrphy_bitslip7_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip7_value1 <= (k7ddrphy_bitslip7_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip7_value1 <= 3'd7;
    end
    k7ddrphy_bitslip7_r1 <= {k7ddrphy_bitslip71, k7ddrphy_bitslip7_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip8_value0 <= (k7ddrphy_bitslip8_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip8_value0 <= 3'd7;
    end
    k7ddrphy_bitslip8_r0 <= {{k7ddrphy_dfi_p3_wrdata[40], k7ddrphy_dfi_p3_wrdata[8], k7ddrphy_dfi_p2_wrdata[40], k7ddrphy_dfi_p2_wrdata[8], k7ddrphy_dfi_p1_wrdata[40], k7ddrphy_dfi_p1_wrdata[8], k7ddrphy_dfi_p0_wrdata[40], k7ddrphy_dfi_p0_wrdata[8]}, k7ddrphy_bitslip8_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip8_value1 <= (k7ddrphy_bitslip8_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip8_value1 <= 3'd7;
    end
    k7ddrphy_bitslip8_r1 <= {k7ddrphy_bitslip81, k7ddrphy_bitslip8_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip9_value0 <= (k7ddrphy_bitslip9_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip9_value0 <= 3'd7;
    end
    k7ddrphy_bitslip9_r0 <= {{k7ddrphy_dfi_p3_wrdata[41], k7ddrphy_dfi_p3_wrdata[9], k7ddrphy_dfi_p2_wrdata[41], k7ddrphy_dfi_p2_wrdata[9], k7ddrphy_dfi_p1_wrdata[41], k7ddrphy_dfi_p1_wrdata[9], k7ddrphy_dfi_p0_wrdata[41], k7ddrphy_dfi_p0_wrdata[9]}, k7ddrphy_bitslip9_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip9_value1 <= (k7ddrphy_bitslip9_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip9_value1 <= 3'd7;
    end
    k7ddrphy_bitslip9_r1 <= {k7ddrphy_bitslip91, k7ddrphy_bitslip9_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip10_value0 <= (k7ddrphy_bitslip10_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip10_value0 <= 3'd7;
    end
    k7ddrphy_bitslip10_r0 <= {{k7ddrphy_dfi_p3_wrdata[42], k7ddrphy_dfi_p3_wrdata[10], k7ddrphy_dfi_p2_wrdata[42], k7ddrphy_dfi_p2_wrdata[10], k7ddrphy_dfi_p1_wrdata[42], k7ddrphy_dfi_p1_wrdata[10], k7ddrphy_dfi_p0_wrdata[42], k7ddrphy_dfi_p0_wrdata[10]}, k7ddrphy_bitslip10_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip10_value1 <= (k7ddrphy_bitslip10_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip10_value1 <= 3'd7;
    end
    k7ddrphy_bitslip10_r1 <= {k7ddrphy_bitslip101, k7ddrphy_bitslip10_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip11_value0 <= (k7ddrphy_bitslip11_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip11_value0 <= 3'd7;
    end
    k7ddrphy_bitslip11_r0 <= {{k7ddrphy_dfi_p3_wrdata[43], k7ddrphy_dfi_p3_wrdata[11], k7ddrphy_dfi_p2_wrdata[43], k7ddrphy_dfi_p2_wrdata[11], k7ddrphy_dfi_p1_wrdata[43], k7ddrphy_dfi_p1_wrdata[11], k7ddrphy_dfi_p0_wrdata[43], k7ddrphy_dfi_p0_wrdata[11]}, k7ddrphy_bitslip11_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip11_value1 <= (k7ddrphy_bitslip11_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip11_value1 <= 3'd7;
    end
    k7ddrphy_bitslip11_r1 <= {k7ddrphy_bitslip111, k7ddrphy_bitslip11_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip12_value0 <= (k7ddrphy_bitslip12_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip12_value0 <= 3'd7;
    end
    k7ddrphy_bitslip12_r0 <= {{k7ddrphy_dfi_p3_wrdata[44], k7ddrphy_dfi_p3_wrdata[12], k7ddrphy_dfi_p2_wrdata[44], k7ddrphy_dfi_p2_wrdata[12], k7ddrphy_dfi_p1_wrdata[44], k7ddrphy_dfi_p1_wrdata[12], k7ddrphy_dfi_p0_wrdata[44], k7ddrphy_dfi_p0_wrdata[12]}, k7ddrphy_bitslip12_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip12_value1 <= (k7ddrphy_bitslip12_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip12_value1 <= 3'd7;
    end
    k7ddrphy_bitslip12_r1 <= {k7ddrphy_bitslip121, k7ddrphy_bitslip12_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip13_value0 <= (k7ddrphy_bitslip13_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip13_value0 <= 3'd7;
    end
    k7ddrphy_bitslip13_r0 <= {{k7ddrphy_dfi_p3_wrdata[45], k7ddrphy_dfi_p3_wrdata[13], k7ddrphy_dfi_p2_wrdata[45], k7ddrphy_dfi_p2_wrdata[13], k7ddrphy_dfi_p1_wrdata[45], k7ddrphy_dfi_p1_wrdata[13], k7ddrphy_dfi_p0_wrdata[45], k7ddrphy_dfi_p0_wrdata[13]}, k7ddrphy_bitslip13_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip13_value1 <= (k7ddrphy_bitslip13_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip13_value1 <= 3'd7;
    end
    k7ddrphy_bitslip13_r1 <= {k7ddrphy_bitslip131, k7ddrphy_bitslip13_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip14_value0 <= (k7ddrphy_bitslip14_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip14_value0 <= 3'd7;
    end
    k7ddrphy_bitslip14_r0 <= {{k7ddrphy_dfi_p3_wrdata[46], k7ddrphy_dfi_p3_wrdata[14], k7ddrphy_dfi_p2_wrdata[46], k7ddrphy_dfi_p2_wrdata[14], k7ddrphy_dfi_p1_wrdata[46], k7ddrphy_dfi_p1_wrdata[14], k7ddrphy_dfi_p0_wrdata[46], k7ddrphy_dfi_p0_wrdata[14]}, k7ddrphy_bitslip14_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip14_value1 <= (k7ddrphy_bitslip14_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip14_value1 <= 3'd7;
    end
    k7ddrphy_bitslip14_r1 <= {k7ddrphy_bitslip141, k7ddrphy_bitslip14_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip15_value0 <= (k7ddrphy_bitslip15_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip15_value0 <= 3'd7;
    end
    k7ddrphy_bitslip15_r0 <= {{k7ddrphy_dfi_p3_wrdata[47], k7ddrphy_dfi_p3_wrdata[15], k7ddrphy_dfi_p2_wrdata[47], k7ddrphy_dfi_p2_wrdata[15], k7ddrphy_dfi_p1_wrdata[47], k7ddrphy_dfi_p1_wrdata[15], k7ddrphy_dfi_p0_wrdata[47], k7ddrphy_dfi_p0_wrdata[15]}, k7ddrphy_bitslip15_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip15_value1 <= (k7ddrphy_bitslip15_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip15_value1 <= 3'd7;
    end
    k7ddrphy_bitslip15_r1 <= {k7ddrphy_bitslip151, k7ddrphy_bitslip15_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip16_value0 <= (k7ddrphy_bitslip16_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip16_value0 <= 3'd7;
    end
    k7ddrphy_bitslip16_r0 <= {{k7ddrphy_dfi_p3_wrdata[48], k7ddrphy_dfi_p3_wrdata[16], k7ddrphy_dfi_p2_wrdata[48], k7ddrphy_dfi_p2_wrdata[16], k7ddrphy_dfi_p1_wrdata[48], k7ddrphy_dfi_p1_wrdata[16], k7ddrphy_dfi_p0_wrdata[48], k7ddrphy_dfi_p0_wrdata[16]}, k7ddrphy_bitslip16_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip16_value1 <= (k7ddrphy_bitslip16_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip16_value1 <= 3'd7;
    end
    k7ddrphy_bitslip16_r1 <= {k7ddrphy_bitslip161, k7ddrphy_bitslip16_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip17_value0 <= (k7ddrphy_bitslip17_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip17_value0 <= 3'd7;
    end
    k7ddrphy_bitslip17_r0 <= {{k7ddrphy_dfi_p3_wrdata[49], k7ddrphy_dfi_p3_wrdata[17], k7ddrphy_dfi_p2_wrdata[49], k7ddrphy_dfi_p2_wrdata[17], k7ddrphy_dfi_p1_wrdata[49], k7ddrphy_dfi_p1_wrdata[17], k7ddrphy_dfi_p0_wrdata[49], k7ddrphy_dfi_p0_wrdata[17]}, k7ddrphy_bitslip17_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip17_value1 <= (k7ddrphy_bitslip17_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip17_value1 <= 3'd7;
    end
    k7ddrphy_bitslip17_r1 <= {k7ddrphy_bitslip171, k7ddrphy_bitslip17_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip18_value0 <= (k7ddrphy_bitslip18_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip18_value0 <= 3'd7;
    end
    k7ddrphy_bitslip18_r0 <= {{k7ddrphy_dfi_p3_wrdata[50], k7ddrphy_dfi_p3_wrdata[18], k7ddrphy_dfi_p2_wrdata[50], k7ddrphy_dfi_p2_wrdata[18], k7ddrphy_dfi_p1_wrdata[50], k7ddrphy_dfi_p1_wrdata[18], k7ddrphy_dfi_p0_wrdata[50], k7ddrphy_dfi_p0_wrdata[18]}, k7ddrphy_bitslip18_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip18_value1 <= (k7ddrphy_bitslip18_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip18_value1 <= 3'd7;
    end
    k7ddrphy_bitslip18_r1 <= {k7ddrphy_bitslip181, k7ddrphy_bitslip18_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip19_value0 <= (k7ddrphy_bitslip19_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip19_value0 <= 3'd7;
    end
    k7ddrphy_bitslip19_r0 <= {{k7ddrphy_dfi_p3_wrdata[51], k7ddrphy_dfi_p3_wrdata[19], k7ddrphy_dfi_p2_wrdata[51], k7ddrphy_dfi_p2_wrdata[19], k7ddrphy_dfi_p1_wrdata[51], k7ddrphy_dfi_p1_wrdata[19], k7ddrphy_dfi_p0_wrdata[51], k7ddrphy_dfi_p0_wrdata[19]}, k7ddrphy_bitslip19_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip19_value1 <= (k7ddrphy_bitslip19_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip19_value1 <= 3'd7;
    end
    k7ddrphy_bitslip19_r1 <= {k7ddrphy_bitslip191, k7ddrphy_bitslip19_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip20_value0 <= (k7ddrphy_bitslip20_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip20_value0 <= 3'd7;
    end
    k7ddrphy_bitslip20_r0 <= {{k7ddrphy_dfi_p3_wrdata[52], k7ddrphy_dfi_p3_wrdata[20], k7ddrphy_dfi_p2_wrdata[52], k7ddrphy_dfi_p2_wrdata[20], k7ddrphy_dfi_p1_wrdata[52], k7ddrphy_dfi_p1_wrdata[20], k7ddrphy_dfi_p0_wrdata[52], k7ddrphy_dfi_p0_wrdata[20]}, k7ddrphy_bitslip20_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip20_value1 <= (k7ddrphy_bitslip20_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip20_value1 <= 3'd7;
    end
    k7ddrphy_bitslip20_r1 <= {k7ddrphy_bitslip201, k7ddrphy_bitslip20_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip21_value0 <= (k7ddrphy_bitslip21_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip21_value0 <= 3'd7;
    end
    k7ddrphy_bitslip21_r0 <= {{k7ddrphy_dfi_p3_wrdata[53], k7ddrphy_dfi_p3_wrdata[21], k7ddrphy_dfi_p2_wrdata[53], k7ddrphy_dfi_p2_wrdata[21], k7ddrphy_dfi_p1_wrdata[53], k7ddrphy_dfi_p1_wrdata[21], k7ddrphy_dfi_p0_wrdata[53], k7ddrphy_dfi_p0_wrdata[21]}, k7ddrphy_bitslip21_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip21_value1 <= (k7ddrphy_bitslip21_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip21_value1 <= 3'd7;
    end
    k7ddrphy_bitslip21_r1 <= {k7ddrphy_bitslip211, k7ddrphy_bitslip21_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip22_value0 <= (k7ddrphy_bitslip22_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip22_value0 <= 3'd7;
    end
    k7ddrphy_bitslip22_r0 <= {{k7ddrphy_dfi_p3_wrdata[54], k7ddrphy_dfi_p3_wrdata[22], k7ddrphy_dfi_p2_wrdata[54], k7ddrphy_dfi_p2_wrdata[22], k7ddrphy_dfi_p1_wrdata[54], k7ddrphy_dfi_p1_wrdata[22], k7ddrphy_dfi_p0_wrdata[54], k7ddrphy_dfi_p0_wrdata[22]}, k7ddrphy_bitslip22_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip22_value1 <= (k7ddrphy_bitslip22_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip22_value1 <= 3'd7;
    end
    k7ddrphy_bitslip22_r1 <= {k7ddrphy_bitslip221, k7ddrphy_bitslip22_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip23_value0 <= (k7ddrphy_bitslip23_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip23_value0 <= 3'd7;
    end
    k7ddrphy_bitslip23_r0 <= {{k7ddrphy_dfi_p3_wrdata[55], k7ddrphy_dfi_p3_wrdata[23], k7ddrphy_dfi_p2_wrdata[55], k7ddrphy_dfi_p2_wrdata[23], k7ddrphy_dfi_p1_wrdata[55], k7ddrphy_dfi_p1_wrdata[23], k7ddrphy_dfi_p0_wrdata[55], k7ddrphy_dfi_p0_wrdata[23]}, k7ddrphy_bitslip23_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip23_value1 <= (k7ddrphy_bitslip23_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip23_value1 <= 3'd7;
    end
    k7ddrphy_bitslip23_r1 <= {k7ddrphy_bitslip231, k7ddrphy_bitslip23_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip24_value0 <= (k7ddrphy_bitslip24_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip24_value0 <= 3'd7;
    end
    k7ddrphy_bitslip24_r0 <= {{k7ddrphy_dfi_p3_wrdata[56], k7ddrphy_dfi_p3_wrdata[24], k7ddrphy_dfi_p2_wrdata[56], k7ddrphy_dfi_p2_wrdata[24], k7ddrphy_dfi_p1_wrdata[56], k7ddrphy_dfi_p1_wrdata[24], k7ddrphy_dfi_p0_wrdata[56], k7ddrphy_dfi_p0_wrdata[24]}, k7ddrphy_bitslip24_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip24_value1 <= (k7ddrphy_bitslip24_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip24_value1 <= 3'd7;
    end
    k7ddrphy_bitslip24_r1 <= {k7ddrphy_bitslip241, k7ddrphy_bitslip24_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip25_value0 <= (k7ddrphy_bitslip25_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip25_value0 <= 3'd7;
    end
    k7ddrphy_bitslip25_r0 <= {{k7ddrphy_dfi_p3_wrdata[57], k7ddrphy_dfi_p3_wrdata[25], k7ddrphy_dfi_p2_wrdata[57], k7ddrphy_dfi_p2_wrdata[25], k7ddrphy_dfi_p1_wrdata[57], k7ddrphy_dfi_p1_wrdata[25], k7ddrphy_dfi_p0_wrdata[57], k7ddrphy_dfi_p0_wrdata[25]}, k7ddrphy_bitslip25_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip25_value1 <= (k7ddrphy_bitslip25_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip25_value1 <= 3'd7;
    end
    k7ddrphy_bitslip25_r1 <= {k7ddrphy_bitslip251, k7ddrphy_bitslip25_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip26_value0 <= (k7ddrphy_bitslip26_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip26_value0 <= 3'd7;
    end
    k7ddrphy_bitslip26_r0 <= {{k7ddrphy_dfi_p3_wrdata[58], k7ddrphy_dfi_p3_wrdata[26], k7ddrphy_dfi_p2_wrdata[58], k7ddrphy_dfi_p2_wrdata[26], k7ddrphy_dfi_p1_wrdata[58], k7ddrphy_dfi_p1_wrdata[26], k7ddrphy_dfi_p0_wrdata[58], k7ddrphy_dfi_p0_wrdata[26]}, k7ddrphy_bitslip26_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip26_value1 <= (k7ddrphy_bitslip26_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip26_value1 <= 3'd7;
    end
    k7ddrphy_bitslip26_r1 <= {k7ddrphy_bitslip261, k7ddrphy_bitslip26_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip27_value0 <= (k7ddrphy_bitslip27_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip27_value0 <= 3'd7;
    end
    k7ddrphy_bitslip27_r0 <= {{k7ddrphy_dfi_p3_wrdata[59], k7ddrphy_dfi_p3_wrdata[27], k7ddrphy_dfi_p2_wrdata[59], k7ddrphy_dfi_p2_wrdata[27], k7ddrphy_dfi_p1_wrdata[59], k7ddrphy_dfi_p1_wrdata[27], k7ddrphy_dfi_p0_wrdata[59], k7ddrphy_dfi_p0_wrdata[27]}, k7ddrphy_bitslip27_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip27_value1 <= (k7ddrphy_bitslip27_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip27_value1 <= 3'd7;
    end
    k7ddrphy_bitslip27_r1 <= {k7ddrphy_bitslip271, k7ddrphy_bitslip27_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip28_value0 <= (k7ddrphy_bitslip28_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip28_value0 <= 3'd7;
    end
    k7ddrphy_bitslip28_r0 <= {{k7ddrphy_dfi_p3_wrdata[60], k7ddrphy_dfi_p3_wrdata[28], k7ddrphy_dfi_p2_wrdata[60], k7ddrphy_dfi_p2_wrdata[28], k7ddrphy_dfi_p1_wrdata[60], k7ddrphy_dfi_p1_wrdata[28], k7ddrphy_dfi_p0_wrdata[60], k7ddrphy_dfi_p0_wrdata[28]}, k7ddrphy_bitslip28_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip28_value1 <= (k7ddrphy_bitslip28_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip28_value1 <= 3'd7;
    end
    k7ddrphy_bitslip28_r1 <= {k7ddrphy_bitslip281, k7ddrphy_bitslip28_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip29_value0 <= (k7ddrphy_bitslip29_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip29_value0 <= 3'd7;
    end
    k7ddrphy_bitslip29_r0 <= {{k7ddrphy_dfi_p3_wrdata[61], k7ddrphy_dfi_p3_wrdata[29], k7ddrphy_dfi_p2_wrdata[61], k7ddrphy_dfi_p2_wrdata[29], k7ddrphy_dfi_p1_wrdata[61], k7ddrphy_dfi_p1_wrdata[29], k7ddrphy_dfi_p0_wrdata[61], k7ddrphy_dfi_p0_wrdata[29]}, k7ddrphy_bitslip29_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip29_value1 <= (k7ddrphy_bitslip29_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip29_value1 <= 3'd7;
    end
    k7ddrphy_bitslip29_r1 <= {k7ddrphy_bitslip291, k7ddrphy_bitslip29_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip30_value0 <= (k7ddrphy_bitslip30_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip30_value0 <= 3'd7;
    end
    k7ddrphy_bitslip30_r0 <= {{k7ddrphy_dfi_p3_wrdata[62], k7ddrphy_dfi_p3_wrdata[30], k7ddrphy_dfi_p2_wrdata[62], k7ddrphy_dfi_p2_wrdata[30], k7ddrphy_dfi_p1_wrdata[62], k7ddrphy_dfi_p1_wrdata[30], k7ddrphy_dfi_p0_wrdata[62], k7ddrphy_dfi_p0_wrdata[30]}, k7ddrphy_bitslip30_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip30_value1 <= (k7ddrphy_bitslip30_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip30_value1 <= 3'd7;
    end
    k7ddrphy_bitslip30_r1 <= {k7ddrphy_bitslip301, k7ddrphy_bitslip30_r1[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip31_value0 <= (k7ddrphy_bitslip31_value0 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip31_value0 <= 3'd7;
    end
    k7ddrphy_bitslip31_r0 <= {{k7ddrphy_dfi_p3_wrdata[63], k7ddrphy_dfi_p3_wrdata[31], k7ddrphy_dfi_p2_wrdata[63], k7ddrphy_dfi_p2_wrdata[31], k7ddrphy_dfi_p1_wrdata[63], k7ddrphy_dfi_p1_wrdata[31], k7ddrphy_dfi_p0_wrdata[63], k7ddrphy_dfi_p0_wrdata[31]}, k7ddrphy_bitslip31_r0[15:8]};
    if ((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_re)) begin
        k7ddrphy_bitslip31_value1 <= (k7ddrphy_bitslip31_value1 + 1'd1);
    end
    if (((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_bitslip_rst_re) | k7ddrphy_rst_storage)) begin
        k7ddrphy_bitslip31_value1 <= 3'd7;
    end
    k7ddrphy_bitslip31_r1 <= {k7ddrphy_bitslip311, k7ddrphy_bitslip31_r1[15:8]};
    k7ddrphy_rddata_en_tappeddelayline0 <= (((k7ddrphy_dfi_p0_rddata_en | k7ddrphy_dfi_p1_rddata_en) | k7ddrphy_dfi_p2_rddata_en) | k7ddrphy_dfi_p3_rddata_en);
    k7ddrphy_rddata_en_tappeddelayline1 <= k7ddrphy_rddata_en_tappeddelayline0;
    k7ddrphy_rddata_en_tappeddelayline2 <= k7ddrphy_rddata_en_tappeddelayline1;
    k7ddrphy_rddata_en_tappeddelayline3 <= k7ddrphy_rddata_en_tappeddelayline2;
    k7ddrphy_rddata_en_tappeddelayline4 <= k7ddrphy_rddata_en_tappeddelayline3;
    k7ddrphy_rddata_en_tappeddelayline5 <= k7ddrphy_rddata_en_tappeddelayline4;
    k7ddrphy_rddata_en_tappeddelayline6 <= k7ddrphy_rddata_en_tappeddelayline5;
    k7ddrphy_rddata_en_tappeddelayline7 <= k7ddrphy_rddata_en_tappeddelayline6;
    k7ddrphy_wrdata_en_tappeddelayline0 <= (((k7ddrphy_dfi_p0_wrdata_en | k7ddrphy_dfi_p1_wrdata_en) | k7ddrphy_dfi_p2_wrdata_en) | k7ddrphy_dfi_p3_wrdata_en);
    k7ddrphy_wrdata_en_tappeddelayline1 <= k7ddrphy_wrdata_en_tappeddelayline0;
    k7ddrphy_wrdata_en_tappeddelayline2 <= k7ddrphy_wrdata_en_tappeddelayline1;
    if (litedramcore_csr_dfi_p0_rddata_valid) begin
        litedramcore_phaseinjector0_rddata_status <= litedramcore_csr_dfi_p0_rddata;
    end
    if (litedramcore_csr_dfi_p1_rddata_valid) begin
        litedramcore_phaseinjector1_rddata_status <= litedramcore_csr_dfi_p1_rddata;
    end
    if (litedramcore_csr_dfi_p2_rddata_valid) begin
        litedramcore_phaseinjector2_rddata_status <= litedramcore_csr_dfi_p2_rddata;
    end
    if (litedramcore_csr_dfi_p3_rddata_valid) begin
        litedramcore_phaseinjector3_rddata_status <= litedramcore_csr_dfi_p3_rddata;
    end
    if ((litedramcore_timer_wait & (~litedramcore_timer_done0))) begin
        litedramcore_timer_count1 <= (litedramcore_timer_count1 - 1'd1);
    end else begin
        litedramcore_timer_count1 <= 10'd781;
    end
    litedramcore_postponer_req_o <= 1'd0;
    if (litedramcore_postponer_req_i) begin
        litedramcore_postponer_count <= (litedramcore_postponer_count - 1'd1);
        if ((litedramcore_postponer_count == 1'd0)) begin
            litedramcore_postponer_count <= 1'd0;
            litedramcore_postponer_req_o <= 1'd1;
        end
    end
    if (litedramcore_sequencer_start0) begin
        litedramcore_sequencer_count <= 1'd0;
    end else begin
        if (litedramcore_sequencer_done1) begin
            if ((litedramcore_sequencer_count != 1'd0)) begin
                litedramcore_sequencer_count <= (litedramcore_sequencer_count - 1'd1);
            end
        end
    end
    litedramcore_cmd_payload_a <= 1'd0;
    litedramcore_cmd_payload_ba <= 1'd0;
    litedramcore_cmd_payload_cas <= 1'd0;
    litedramcore_cmd_payload_ras <= 1'd0;
    litedramcore_cmd_payload_we <= 1'd0;
    litedramcore_sequencer_done1 <= 1'd0;
    if ((litedramcore_sequencer_start1 & (litedramcore_sequencer_counter == 1'd0))) begin
        litedramcore_cmd_payload_a <= 11'd1024;
        litedramcore_cmd_payload_ba <= 1'd0;
        litedramcore_cmd_payload_cas <= 1'd0;
        litedramcore_cmd_payload_ras <= 1'd1;
        litedramcore_cmd_payload_we <= 1'd1;
    end
    if ((litedramcore_sequencer_counter == 2'd3)) begin
        litedramcore_cmd_payload_a <= 11'd1024;
        litedramcore_cmd_payload_ba <= 1'd0;
        litedramcore_cmd_payload_cas <= 1'd1;
        litedramcore_cmd_payload_ras <= 1'd1;
        litedramcore_cmd_payload_we <= 1'd0;
    end
    if ((litedramcore_sequencer_counter == 6'd55)) begin
        litedramcore_cmd_payload_a <= 1'd0;
        litedramcore_cmd_payload_ba <= 1'd0;
        litedramcore_cmd_payload_cas <= 1'd0;
        litedramcore_cmd_payload_ras <= 1'd0;
        litedramcore_cmd_payload_we <= 1'd0;
        litedramcore_sequencer_done1 <= 1'd1;
    end
    if ((litedramcore_sequencer_counter == 6'd55)) begin
        litedramcore_sequencer_counter <= 1'd0;
    end else begin
        if ((litedramcore_sequencer_counter != 1'd0)) begin
            litedramcore_sequencer_counter <= (litedramcore_sequencer_counter + 1'd1);
        end else begin
            if (litedramcore_sequencer_start1) begin
                litedramcore_sequencer_counter <= 1'd1;
            end
        end
    end
    if ((litedramcore_zqcs_timer_wait & (~litedramcore_zqcs_timer_done0))) begin
        litedramcore_zqcs_timer_count1 <= (litedramcore_zqcs_timer_count1 - 1'd1);
    end else begin
        litedramcore_zqcs_timer_count1 <= 27'd99999999;
    end
    litedramcore_zqcs_executer_done <= 1'd0;
    if ((litedramcore_zqcs_executer_start & (litedramcore_zqcs_executer_counter == 1'd0))) begin
        litedramcore_cmd_payload_a <= 11'd1024;
        litedramcore_cmd_payload_ba <= 1'd0;
        litedramcore_cmd_payload_cas <= 1'd0;
        litedramcore_cmd_payload_ras <= 1'd1;
        litedramcore_cmd_payload_we <= 1'd1;
    end
    if ((litedramcore_zqcs_executer_counter == 2'd3)) begin
        litedramcore_cmd_payload_a <= 1'd0;
        litedramcore_cmd_payload_ba <= 1'd0;
        litedramcore_cmd_payload_cas <= 1'd0;
        litedramcore_cmd_payload_ras <= 1'd0;
        litedramcore_cmd_payload_we <= 1'd1;
    end
    if ((litedramcore_zqcs_executer_counter == 5'd19)) begin
        litedramcore_cmd_payload_a <= 1'd0;
        litedramcore_cmd_payload_ba <= 1'd0;
        litedramcore_cmd_payload_cas <= 1'd0;
        litedramcore_cmd_payload_ras <= 1'd0;
        litedramcore_cmd_payload_we <= 1'd0;
        litedramcore_zqcs_executer_done <= 1'd1;
    end
    if ((litedramcore_zqcs_executer_counter == 5'd19)) begin
        litedramcore_zqcs_executer_counter <= 1'd0;
    end else begin
        if ((litedramcore_zqcs_executer_counter != 1'd0)) begin
            litedramcore_zqcs_executer_counter <= (litedramcore_zqcs_executer_counter + 1'd1);
        end else begin
            if (litedramcore_zqcs_executer_start) begin
                litedramcore_zqcs_executer_counter <= 1'd1;
            end
        end
    end
    litedramcore_refresher_state <= litedramcore_refresher_next_state;
    if (litedramcore_bankmachine0_row_close) begin
        litedramcore_bankmachine0_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine0_row_open) begin
            litedramcore_bankmachine0_row_opened <= 1'd1;
            litedramcore_bankmachine0_row <= litedramcore_bankmachine0_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine0_syncfifo0_we & litedramcore_bankmachine0_syncfifo0_writable) & (~litedramcore_bankmachine0_replace))) begin
        litedramcore_bankmachine0_produce <= (litedramcore_bankmachine0_produce + 1'd1);
    end
    if (litedramcore_bankmachine0_do_read) begin
        litedramcore_bankmachine0_consume <= (litedramcore_bankmachine0_consume + 1'd1);
    end
    if (((litedramcore_bankmachine0_syncfifo0_we & litedramcore_bankmachine0_syncfifo0_writable) & (~litedramcore_bankmachine0_replace))) begin
        if ((~litedramcore_bankmachine0_do_read)) begin
            litedramcore_bankmachine0_level <= (litedramcore_bankmachine0_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine0_do_read) begin
            litedramcore_bankmachine0_level <= (litedramcore_bankmachine0_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine0_pipe_valid_source_valid) | litedramcore_bankmachine0_pipe_valid_source_ready)) begin
        litedramcore_bankmachine0_pipe_valid_source_valid <= litedramcore_bankmachine0_pipe_valid_sink_valid;
        litedramcore_bankmachine0_pipe_valid_source_first <= litedramcore_bankmachine0_pipe_valid_sink_first;
        litedramcore_bankmachine0_pipe_valid_source_last <= litedramcore_bankmachine0_pipe_valid_sink_last;
        litedramcore_bankmachine0_pipe_valid_source_payload_we <= litedramcore_bankmachine0_pipe_valid_sink_payload_we;
        litedramcore_bankmachine0_pipe_valid_source_payload_addr <= litedramcore_bankmachine0_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine0_twtpcon_valid) begin
        litedramcore_bankmachine0_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine0_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine0_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine0_twtpcon_ready)) begin
            litedramcore_bankmachine0_twtpcon_count <= (litedramcore_bankmachine0_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine0_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine0_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine0_trccon_valid) begin
        litedramcore_bankmachine0_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine0_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine0_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine0_trccon_ready)) begin
            litedramcore_bankmachine0_trccon_count <= (litedramcore_bankmachine0_trccon_count - 1'd1);
            if ((litedramcore_bankmachine0_trccon_count == 1'd1)) begin
                litedramcore_bankmachine0_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine0_trascon_valid) begin
        litedramcore_bankmachine0_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine0_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine0_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine0_trascon_ready)) begin
            litedramcore_bankmachine0_trascon_count <= (litedramcore_bankmachine0_trascon_count - 1'd1);
            if ((litedramcore_bankmachine0_trascon_count == 1'd1)) begin
                litedramcore_bankmachine0_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine0_state <= litedramcore_bankmachine0_next_state;
    if (litedramcore_bankmachine1_row_close) begin
        litedramcore_bankmachine1_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine1_row_open) begin
            litedramcore_bankmachine1_row_opened <= 1'd1;
            litedramcore_bankmachine1_row <= litedramcore_bankmachine1_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine1_syncfifo1_we & litedramcore_bankmachine1_syncfifo1_writable) & (~litedramcore_bankmachine1_replace))) begin
        litedramcore_bankmachine1_produce <= (litedramcore_bankmachine1_produce + 1'd1);
    end
    if (litedramcore_bankmachine1_do_read) begin
        litedramcore_bankmachine1_consume <= (litedramcore_bankmachine1_consume + 1'd1);
    end
    if (((litedramcore_bankmachine1_syncfifo1_we & litedramcore_bankmachine1_syncfifo1_writable) & (~litedramcore_bankmachine1_replace))) begin
        if ((~litedramcore_bankmachine1_do_read)) begin
            litedramcore_bankmachine1_level <= (litedramcore_bankmachine1_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine1_do_read) begin
            litedramcore_bankmachine1_level <= (litedramcore_bankmachine1_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine1_pipe_valid_source_valid) | litedramcore_bankmachine1_pipe_valid_source_ready)) begin
        litedramcore_bankmachine1_pipe_valid_source_valid <= litedramcore_bankmachine1_pipe_valid_sink_valid;
        litedramcore_bankmachine1_pipe_valid_source_first <= litedramcore_bankmachine1_pipe_valid_sink_first;
        litedramcore_bankmachine1_pipe_valid_source_last <= litedramcore_bankmachine1_pipe_valid_sink_last;
        litedramcore_bankmachine1_pipe_valid_source_payload_we <= litedramcore_bankmachine1_pipe_valid_sink_payload_we;
        litedramcore_bankmachine1_pipe_valid_source_payload_addr <= litedramcore_bankmachine1_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine1_twtpcon_valid) begin
        litedramcore_bankmachine1_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine1_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine1_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine1_twtpcon_ready)) begin
            litedramcore_bankmachine1_twtpcon_count <= (litedramcore_bankmachine1_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine1_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine1_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine1_trccon_valid) begin
        litedramcore_bankmachine1_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine1_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine1_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine1_trccon_ready)) begin
            litedramcore_bankmachine1_trccon_count <= (litedramcore_bankmachine1_trccon_count - 1'd1);
            if ((litedramcore_bankmachine1_trccon_count == 1'd1)) begin
                litedramcore_bankmachine1_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine1_trascon_valid) begin
        litedramcore_bankmachine1_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine1_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine1_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine1_trascon_ready)) begin
            litedramcore_bankmachine1_trascon_count <= (litedramcore_bankmachine1_trascon_count - 1'd1);
            if ((litedramcore_bankmachine1_trascon_count == 1'd1)) begin
                litedramcore_bankmachine1_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine1_state <= litedramcore_bankmachine1_next_state;
    if (litedramcore_bankmachine2_row_close) begin
        litedramcore_bankmachine2_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine2_row_open) begin
            litedramcore_bankmachine2_row_opened <= 1'd1;
            litedramcore_bankmachine2_row <= litedramcore_bankmachine2_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine2_syncfifo2_we & litedramcore_bankmachine2_syncfifo2_writable) & (~litedramcore_bankmachine2_replace))) begin
        litedramcore_bankmachine2_produce <= (litedramcore_bankmachine2_produce + 1'd1);
    end
    if (litedramcore_bankmachine2_do_read) begin
        litedramcore_bankmachine2_consume <= (litedramcore_bankmachine2_consume + 1'd1);
    end
    if (((litedramcore_bankmachine2_syncfifo2_we & litedramcore_bankmachine2_syncfifo2_writable) & (~litedramcore_bankmachine2_replace))) begin
        if ((~litedramcore_bankmachine2_do_read)) begin
            litedramcore_bankmachine2_level <= (litedramcore_bankmachine2_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine2_do_read) begin
            litedramcore_bankmachine2_level <= (litedramcore_bankmachine2_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine2_pipe_valid_source_valid) | litedramcore_bankmachine2_pipe_valid_source_ready)) begin
        litedramcore_bankmachine2_pipe_valid_source_valid <= litedramcore_bankmachine2_pipe_valid_sink_valid;
        litedramcore_bankmachine2_pipe_valid_source_first <= litedramcore_bankmachine2_pipe_valid_sink_first;
        litedramcore_bankmachine2_pipe_valid_source_last <= litedramcore_bankmachine2_pipe_valid_sink_last;
        litedramcore_bankmachine2_pipe_valid_source_payload_we <= litedramcore_bankmachine2_pipe_valid_sink_payload_we;
        litedramcore_bankmachine2_pipe_valid_source_payload_addr <= litedramcore_bankmachine2_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine2_twtpcon_valid) begin
        litedramcore_bankmachine2_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine2_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine2_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine2_twtpcon_ready)) begin
            litedramcore_bankmachine2_twtpcon_count <= (litedramcore_bankmachine2_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine2_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine2_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine2_trccon_valid) begin
        litedramcore_bankmachine2_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine2_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine2_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine2_trccon_ready)) begin
            litedramcore_bankmachine2_trccon_count <= (litedramcore_bankmachine2_trccon_count - 1'd1);
            if ((litedramcore_bankmachine2_trccon_count == 1'd1)) begin
                litedramcore_bankmachine2_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine2_trascon_valid) begin
        litedramcore_bankmachine2_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine2_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine2_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine2_trascon_ready)) begin
            litedramcore_bankmachine2_trascon_count <= (litedramcore_bankmachine2_trascon_count - 1'd1);
            if ((litedramcore_bankmachine2_trascon_count == 1'd1)) begin
                litedramcore_bankmachine2_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine2_state <= litedramcore_bankmachine2_next_state;
    if (litedramcore_bankmachine3_row_close) begin
        litedramcore_bankmachine3_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine3_row_open) begin
            litedramcore_bankmachine3_row_opened <= 1'd1;
            litedramcore_bankmachine3_row <= litedramcore_bankmachine3_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine3_syncfifo3_we & litedramcore_bankmachine3_syncfifo3_writable) & (~litedramcore_bankmachine3_replace))) begin
        litedramcore_bankmachine3_produce <= (litedramcore_bankmachine3_produce + 1'd1);
    end
    if (litedramcore_bankmachine3_do_read) begin
        litedramcore_bankmachine3_consume <= (litedramcore_bankmachine3_consume + 1'd1);
    end
    if (((litedramcore_bankmachine3_syncfifo3_we & litedramcore_bankmachine3_syncfifo3_writable) & (~litedramcore_bankmachine3_replace))) begin
        if ((~litedramcore_bankmachine3_do_read)) begin
            litedramcore_bankmachine3_level <= (litedramcore_bankmachine3_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine3_do_read) begin
            litedramcore_bankmachine3_level <= (litedramcore_bankmachine3_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine3_pipe_valid_source_valid) | litedramcore_bankmachine3_pipe_valid_source_ready)) begin
        litedramcore_bankmachine3_pipe_valid_source_valid <= litedramcore_bankmachine3_pipe_valid_sink_valid;
        litedramcore_bankmachine3_pipe_valid_source_first <= litedramcore_bankmachine3_pipe_valid_sink_first;
        litedramcore_bankmachine3_pipe_valid_source_last <= litedramcore_bankmachine3_pipe_valid_sink_last;
        litedramcore_bankmachine3_pipe_valid_source_payload_we <= litedramcore_bankmachine3_pipe_valid_sink_payload_we;
        litedramcore_bankmachine3_pipe_valid_source_payload_addr <= litedramcore_bankmachine3_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine3_twtpcon_valid) begin
        litedramcore_bankmachine3_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine3_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine3_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine3_twtpcon_ready)) begin
            litedramcore_bankmachine3_twtpcon_count <= (litedramcore_bankmachine3_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine3_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine3_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine3_trccon_valid) begin
        litedramcore_bankmachine3_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine3_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine3_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine3_trccon_ready)) begin
            litedramcore_bankmachine3_trccon_count <= (litedramcore_bankmachine3_trccon_count - 1'd1);
            if ((litedramcore_bankmachine3_trccon_count == 1'd1)) begin
                litedramcore_bankmachine3_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine3_trascon_valid) begin
        litedramcore_bankmachine3_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine3_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine3_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine3_trascon_ready)) begin
            litedramcore_bankmachine3_trascon_count <= (litedramcore_bankmachine3_trascon_count - 1'd1);
            if ((litedramcore_bankmachine3_trascon_count == 1'd1)) begin
                litedramcore_bankmachine3_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine3_state <= litedramcore_bankmachine3_next_state;
    if (litedramcore_bankmachine4_row_close) begin
        litedramcore_bankmachine4_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine4_row_open) begin
            litedramcore_bankmachine4_row_opened <= 1'd1;
            litedramcore_bankmachine4_row <= litedramcore_bankmachine4_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine4_syncfifo4_we & litedramcore_bankmachine4_syncfifo4_writable) & (~litedramcore_bankmachine4_replace))) begin
        litedramcore_bankmachine4_produce <= (litedramcore_bankmachine4_produce + 1'd1);
    end
    if (litedramcore_bankmachine4_do_read) begin
        litedramcore_bankmachine4_consume <= (litedramcore_bankmachine4_consume + 1'd1);
    end
    if (((litedramcore_bankmachine4_syncfifo4_we & litedramcore_bankmachine4_syncfifo4_writable) & (~litedramcore_bankmachine4_replace))) begin
        if ((~litedramcore_bankmachine4_do_read)) begin
            litedramcore_bankmachine4_level <= (litedramcore_bankmachine4_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine4_do_read) begin
            litedramcore_bankmachine4_level <= (litedramcore_bankmachine4_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine4_pipe_valid_source_valid) | litedramcore_bankmachine4_pipe_valid_source_ready)) begin
        litedramcore_bankmachine4_pipe_valid_source_valid <= litedramcore_bankmachine4_pipe_valid_sink_valid;
        litedramcore_bankmachine4_pipe_valid_source_first <= litedramcore_bankmachine4_pipe_valid_sink_first;
        litedramcore_bankmachine4_pipe_valid_source_last <= litedramcore_bankmachine4_pipe_valid_sink_last;
        litedramcore_bankmachine4_pipe_valid_source_payload_we <= litedramcore_bankmachine4_pipe_valid_sink_payload_we;
        litedramcore_bankmachine4_pipe_valid_source_payload_addr <= litedramcore_bankmachine4_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine4_twtpcon_valid) begin
        litedramcore_bankmachine4_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine4_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine4_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine4_twtpcon_ready)) begin
            litedramcore_bankmachine4_twtpcon_count <= (litedramcore_bankmachine4_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine4_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine4_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine4_trccon_valid) begin
        litedramcore_bankmachine4_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine4_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine4_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine4_trccon_ready)) begin
            litedramcore_bankmachine4_trccon_count <= (litedramcore_bankmachine4_trccon_count - 1'd1);
            if ((litedramcore_bankmachine4_trccon_count == 1'd1)) begin
                litedramcore_bankmachine4_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine4_trascon_valid) begin
        litedramcore_bankmachine4_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine4_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine4_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine4_trascon_ready)) begin
            litedramcore_bankmachine4_trascon_count <= (litedramcore_bankmachine4_trascon_count - 1'd1);
            if ((litedramcore_bankmachine4_trascon_count == 1'd1)) begin
                litedramcore_bankmachine4_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine4_state <= litedramcore_bankmachine4_next_state;
    if (litedramcore_bankmachine5_row_close) begin
        litedramcore_bankmachine5_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine5_row_open) begin
            litedramcore_bankmachine5_row_opened <= 1'd1;
            litedramcore_bankmachine5_row <= litedramcore_bankmachine5_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine5_syncfifo5_we & litedramcore_bankmachine5_syncfifo5_writable) & (~litedramcore_bankmachine5_replace))) begin
        litedramcore_bankmachine5_produce <= (litedramcore_bankmachine5_produce + 1'd1);
    end
    if (litedramcore_bankmachine5_do_read) begin
        litedramcore_bankmachine5_consume <= (litedramcore_bankmachine5_consume + 1'd1);
    end
    if (((litedramcore_bankmachine5_syncfifo5_we & litedramcore_bankmachine5_syncfifo5_writable) & (~litedramcore_bankmachine5_replace))) begin
        if ((~litedramcore_bankmachine5_do_read)) begin
            litedramcore_bankmachine5_level <= (litedramcore_bankmachine5_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine5_do_read) begin
            litedramcore_bankmachine5_level <= (litedramcore_bankmachine5_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine5_pipe_valid_source_valid) | litedramcore_bankmachine5_pipe_valid_source_ready)) begin
        litedramcore_bankmachine5_pipe_valid_source_valid <= litedramcore_bankmachine5_pipe_valid_sink_valid;
        litedramcore_bankmachine5_pipe_valid_source_first <= litedramcore_bankmachine5_pipe_valid_sink_first;
        litedramcore_bankmachine5_pipe_valid_source_last <= litedramcore_bankmachine5_pipe_valid_sink_last;
        litedramcore_bankmachine5_pipe_valid_source_payload_we <= litedramcore_bankmachine5_pipe_valid_sink_payload_we;
        litedramcore_bankmachine5_pipe_valid_source_payload_addr <= litedramcore_bankmachine5_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine5_twtpcon_valid) begin
        litedramcore_bankmachine5_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine5_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine5_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine5_twtpcon_ready)) begin
            litedramcore_bankmachine5_twtpcon_count <= (litedramcore_bankmachine5_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine5_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine5_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine5_trccon_valid) begin
        litedramcore_bankmachine5_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine5_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine5_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine5_trccon_ready)) begin
            litedramcore_bankmachine5_trccon_count <= (litedramcore_bankmachine5_trccon_count - 1'd1);
            if ((litedramcore_bankmachine5_trccon_count == 1'd1)) begin
                litedramcore_bankmachine5_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine5_trascon_valid) begin
        litedramcore_bankmachine5_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine5_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine5_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine5_trascon_ready)) begin
            litedramcore_bankmachine5_trascon_count <= (litedramcore_bankmachine5_trascon_count - 1'd1);
            if ((litedramcore_bankmachine5_trascon_count == 1'd1)) begin
                litedramcore_bankmachine5_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine5_state <= litedramcore_bankmachine5_next_state;
    if (litedramcore_bankmachine6_row_close) begin
        litedramcore_bankmachine6_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine6_row_open) begin
            litedramcore_bankmachine6_row_opened <= 1'd1;
            litedramcore_bankmachine6_row <= litedramcore_bankmachine6_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine6_syncfifo6_we & litedramcore_bankmachine6_syncfifo6_writable) & (~litedramcore_bankmachine6_replace))) begin
        litedramcore_bankmachine6_produce <= (litedramcore_bankmachine6_produce + 1'd1);
    end
    if (litedramcore_bankmachine6_do_read) begin
        litedramcore_bankmachine6_consume <= (litedramcore_bankmachine6_consume + 1'd1);
    end
    if (((litedramcore_bankmachine6_syncfifo6_we & litedramcore_bankmachine6_syncfifo6_writable) & (~litedramcore_bankmachine6_replace))) begin
        if ((~litedramcore_bankmachine6_do_read)) begin
            litedramcore_bankmachine6_level <= (litedramcore_bankmachine6_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine6_do_read) begin
            litedramcore_bankmachine6_level <= (litedramcore_bankmachine6_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine6_pipe_valid_source_valid) | litedramcore_bankmachine6_pipe_valid_source_ready)) begin
        litedramcore_bankmachine6_pipe_valid_source_valid <= litedramcore_bankmachine6_pipe_valid_sink_valid;
        litedramcore_bankmachine6_pipe_valid_source_first <= litedramcore_bankmachine6_pipe_valid_sink_first;
        litedramcore_bankmachine6_pipe_valid_source_last <= litedramcore_bankmachine6_pipe_valid_sink_last;
        litedramcore_bankmachine6_pipe_valid_source_payload_we <= litedramcore_bankmachine6_pipe_valid_sink_payload_we;
        litedramcore_bankmachine6_pipe_valid_source_payload_addr <= litedramcore_bankmachine6_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine6_twtpcon_valid) begin
        litedramcore_bankmachine6_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine6_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine6_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine6_twtpcon_ready)) begin
            litedramcore_bankmachine6_twtpcon_count <= (litedramcore_bankmachine6_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine6_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine6_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine6_trccon_valid) begin
        litedramcore_bankmachine6_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine6_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine6_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine6_trccon_ready)) begin
            litedramcore_bankmachine6_trccon_count <= (litedramcore_bankmachine6_trccon_count - 1'd1);
            if ((litedramcore_bankmachine6_trccon_count == 1'd1)) begin
                litedramcore_bankmachine6_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine6_trascon_valid) begin
        litedramcore_bankmachine6_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine6_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine6_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine6_trascon_ready)) begin
            litedramcore_bankmachine6_trascon_count <= (litedramcore_bankmachine6_trascon_count - 1'd1);
            if ((litedramcore_bankmachine6_trascon_count == 1'd1)) begin
                litedramcore_bankmachine6_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine6_state <= litedramcore_bankmachine6_next_state;
    if (litedramcore_bankmachine7_row_close) begin
        litedramcore_bankmachine7_row_opened <= 1'd0;
    end else begin
        if (litedramcore_bankmachine7_row_open) begin
            litedramcore_bankmachine7_row_opened <= 1'd1;
            litedramcore_bankmachine7_row <= litedramcore_bankmachine7_source_source_payload_addr[21:7];
        end
    end
    if (((litedramcore_bankmachine7_syncfifo7_we & litedramcore_bankmachine7_syncfifo7_writable) & (~litedramcore_bankmachine7_replace))) begin
        litedramcore_bankmachine7_produce <= (litedramcore_bankmachine7_produce + 1'd1);
    end
    if (litedramcore_bankmachine7_do_read) begin
        litedramcore_bankmachine7_consume <= (litedramcore_bankmachine7_consume + 1'd1);
    end
    if (((litedramcore_bankmachine7_syncfifo7_we & litedramcore_bankmachine7_syncfifo7_writable) & (~litedramcore_bankmachine7_replace))) begin
        if ((~litedramcore_bankmachine7_do_read)) begin
            litedramcore_bankmachine7_level <= (litedramcore_bankmachine7_level + 1'd1);
        end
    end else begin
        if (litedramcore_bankmachine7_do_read) begin
            litedramcore_bankmachine7_level <= (litedramcore_bankmachine7_level - 1'd1);
        end
    end
    if (((~litedramcore_bankmachine7_pipe_valid_source_valid) | litedramcore_bankmachine7_pipe_valid_source_ready)) begin
        litedramcore_bankmachine7_pipe_valid_source_valid <= litedramcore_bankmachine7_pipe_valid_sink_valid;
        litedramcore_bankmachine7_pipe_valid_source_first <= litedramcore_bankmachine7_pipe_valid_sink_first;
        litedramcore_bankmachine7_pipe_valid_source_last <= litedramcore_bankmachine7_pipe_valid_sink_last;
        litedramcore_bankmachine7_pipe_valid_source_payload_we <= litedramcore_bankmachine7_pipe_valid_sink_payload_we;
        litedramcore_bankmachine7_pipe_valid_source_payload_addr <= litedramcore_bankmachine7_pipe_valid_sink_payload_addr;
    end
    if (litedramcore_bankmachine7_twtpcon_valid) begin
        litedramcore_bankmachine7_twtpcon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine7_twtpcon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine7_twtpcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine7_twtpcon_ready)) begin
            litedramcore_bankmachine7_twtpcon_count <= (litedramcore_bankmachine7_twtpcon_count - 1'd1);
            if ((litedramcore_bankmachine7_twtpcon_count == 1'd1)) begin
                litedramcore_bankmachine7_twtpcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine7_trccon_valid) begin
        litedramcore_bankmachine7_trccon_count <= 3'd5;
        if (1'd0) begin
            litedramcore_bankmachine7_trccon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine7_trccon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine7_trccon_ready)) begin
            litedramcore_bankmachine7_trccon_count <= (litedramcore_bankmachine7_trccon_count - 1'd1);
            if ((litedramcore_bankmachine7_trccon_count == 1'd1)) begin
                litedramcore_bankmachine7_trccon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_bankmachine7_trascon_valid) begin
        litedramcore_bankmachine7_trascon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_bankmachine7_trascon_ready <= 1'd1;
        end else begin
            litedramcore_bankmachine7_trascon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_bankmachine7_trascon_ready)) begin
            litedramcore_bankmachine7_trascon_count <= (litedramcore_bankmachine7_trascon_count - 1'd1);
            if ((litedramcore_bankmachine7_trascon_count == 1'd1)) begin
                litedramcore_bankmachine7_trascon_ready <= 1'd1;
            end
        end
    end
    litedramcore_bankmachine7_state <= litedramcore_bankmachine7_next_state;
    if ((~litedramcore_en0)) begin
        litedramcore_time0 <= 5'd31;
    end else begin
        if ((~litedramcore_max_time0)) begin
            litedramcore_time0 <= (litedramcore_time0 - 1'd1);
        end
    end
    if ((~litedramcore_en1)) begin
        litedramcore_time1 <= 4'd15;
    end else begin
        if ((~litedramcore_max_time1)) begin
            litedramcore_time1 <= (litedramcore_time1 - 1'd1);
        end
    end
    if (litedramcore_choose_cmd_ce) begin
        case (litedramcore_choose_cmd_grant)
            1'd0: begin
                if (litedramcore_choose_cmd_request[1]) begin
                    litedramcore_choose_cmd_grant <= 1'd1;
                end else begin
                    if (litedramcore_choose_cmd_request[2]) begin
                        litedramcore_choose_cmd_grant <= 2'd2;
                    end else begin
                        if (litedramcore_choose_cmd_request[3]) begin
                            litedramcore_choose_cmd_grant <= 2'd3;
                        end else begin
                            if (litedramcore_choose_cmd_request[4]) begin
                                litedramcore_choose_cmd_grant <= 3'd4;
                            end else begin
                                if (litedramcore_choose_cmd_request[5]) begin
                                    litedramcore_choose_cmd_grant <= 3'd5;
                                end else begin
                                    if (litedramcore_choose_cmd_request[6]) begin
                                        litedramcore_choose_cmd_grant <= 3'd6;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[7]) begin
                                            litedramcore_choose_cmd_grant <= 3'd7;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            1'd1: begin
                if (litedramcore_choose_cmd_request[2]) begin
                    litedramcore_choose_cmd_grant <= 2'd2;
                end else begin
                    if (litedramcore_choose_cmd_request[3]) begin
                        litedramcore_choose_cmd_grant <= 2'd3;
                    end else begin
                        if (litedramcore_choose_cmd_request[4]) begin
                            litedramcore_choose_cmd_grant <= 3'd4;
                        end else begin
                            if (litedramcore_choose_cmd_request[5]) begin
                                litedramcore_choose_cmd_grant <= 3'd5;
                            end else begin
                                if (litedramcore_choose_cmd_request[6]) begin
                                    litedramcore_choose_cmd_grant <= 3'd6;
                                end else begin
                                    if (litedramcore_choose_cmd_request[7]) begin
                                        litedramcore_choose_cmd_grant <= 3'd7;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[0]) begin
                                            litedramcore_choose_cmd_grant <= 1'd0;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            2'd2: begin
                if (litedramcore_choose_cmd_request[3]) begin
                    litedramcore_choose_cmd_grant <= 2'd3;
                end else begin
                    if (litedramcore_choose_cmd_request[4]) begin
                        litedramcore_choose_cmd_grant <= 3'd4;
                    end else begin
                        if (litedramcore_choose_cmd_request[5]) begin
                            litedramcore_choose_cmd_grant <= 3'd5;
                        end else begin
                            if (litedramcore_choose_cmd_request[6]) begin
                                litedramcore_choose_cmd_grant <= 3'd6;
                            end else begin
                                if (litedramcore_choose_cmd_request[7]) begin
                                    litedramcore_choose_cmd_grant <= 3'd7;
                                end else begin
                                    if (litedramcore_choose_cmd_request[0]) begin
                                        litedramcore_choose_cmd_grant <= 1'd0;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[1]) begin
                                            litedramcore_choose_cmd_grant <= 1'd1;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            2'd3: begin
                if (litedramcore_choose_cmd_request[4]) begin
                    litedramcore_choose_cmd_grant <= 3'd4;
                end else begin
                    if (litedramcore_choose_cmd_request[5]) begin
                        litedramcore_choose_cmd_grant <= 3'd5;
                    end else begin
                        if (litedramcore_choose_cmd_request[6]) begin
                            litedramcore_choose_cmd_grant <= 3'd6;
                        end else begin
                            if (litedramcore_choose_cmd_request[7]) begin
                                litedramcore_choose_cmd_grant <= 3'd7;
                            end else begin
                                if (litedramcore_choose_cmd_request[0]) begin
                                    litedramcore_choose_cmd_grant <= 1'd0;
                                end else begin
                                    if (litedramcore_choose_cmd_request[1]) begin
                                        litedramcore_choose_cmd_grant <= 1'd1;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[2]) begin
                                            litedramcore_choose_cmd_grant <= 2'd2;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd4: begin
                if (litedramcore_choose_cmd_request[5]) begin
                    litedramcore_choose_cmd_grant <= 3'd5;
                end else begin
                    if (litedramcore_choose_cmd_request[6]) begin
                        litedramcore_choose_cmd_grant <= 3'd6;
                    end else begin
                        if (litedramcore_choose_cmd_request[7]) begin
                            litedramcore_choose_cmd_grant <= 3'd7;
                        end else begin
                            if (litedramcore_choose_cmd_request[0]) begin
                                litedramcore_choose_cmd_grant <= 1'd0;
                            end else begin
                                if (litedramcore_choose_cmd_request[1]) begin
                                    litedramcore_choose_cmd_grant <= 1'd1;
                                end else begin
                                    if (litedramcore_choose_cmd_request[2]) begin
                                        litedramcore_choose_cmd_grant <= 2'd2;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[3]) begin
                                            litedramcore_choose_cmd_grant <= 2'd3;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd5: begin
                if (litedramcore_choose_cmd_request[6]) begin
                    litedramcore_choose_cmd_grant <= 3'd6;
                end else begin
                    if (litedramcore_choose_cmd_request[7]) begin
                        litedramcore_choose_cmd_grant <= 3'd7;
                    end else begin
                        if (litedramcore_choose_cmd_request[0]) begin
                            litedramcore_choose_cmd_grant <= 1'd0;
                        end else begin
                            if (litedramcore_choose_cmd_request[1]) begin
                                litedramcore_choose_cmd_grant <= 1'd1;
                            end else begin
                                if (litedramcore_choose_cmd_request[2]) begin
                                    litedramcore_choose_cmd_grant <= 2'd2;
                                end else begin
                                    if (litedramcore_choose_cmd_request[3]) begin
                                        litedramcore_choose_cmd_grant <= 2'd3;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[4]) begin
                                            litedramcore_choose_cmd_grant <= 3'd4;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd6: begin
                if (litedramcore_choose_cmd_request[7]) begin
                    litedramcore_choose_cmd_grant <= 3'd7;
                end else begin
                    if (litedramcore_choose_cmd_request[0]) begin
                        litedramcore_choose_cmd_grant <= 1'd0;
                    end else begin
                        if (litedramcore_choose_cmd_request[1]) begin
                            litedramcore_choose_cmd_grant <= 1'd1;
                        end else begin
                            if (litedramcore_choose_cmd_request[2]) begin
                                litedramcore_choose_cmd_grant <= 2'd2;
                            end else begin
                                if (litedramcore_choose_cmd_request[3]) begin
                                    litedramcore_choose_cmd_grant <= 2'd3;
                                end else begin
                                    if (litedramcore_choose_cmd_request[4]) begin
                                        litedramcore_choose_cmd_grant <= 3'd4;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[5]) begin
                                            litedramcore_choose_cmd_grant <= 3'd5;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd7: begin
                if (litedramcore_choose_cmd_request[0]) begin
                    litedramcore_choose_cmd_grant <= 1'd0;
                end else begin
                    if (litedramcore_choose_cmd_request[1]) begin
                        litedramcore_choose_cmd_grant <= 1'd1;
                    end else begin
                        if (litedramcore_choose_cmd_request[2]) begin
                            litedramcore_choose_cmd_grant <= 2'd2;
                        end else begin
                            if (litedramcore_choose_cmd_request[3]) begin
                                litedramcore_choose_cmd_grant <= 2'd3;
                            end else begin
                                if (litedramcore_choose_cmd_request[4]) begin
                                    litedramcore_choose_cmd_grant <= 3'd4;
                                end else begin
                                    if (litedramcore_choose_cmd_request[5]) begin
                                        litedramcore_choose_cmd_grant <= 3'd5;
                                    end else begin
                                        if (litedramcore_choose_cmd_request[6]) begin
                                            litedramcore_choose_cmd_grant <= 3'd6;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
        endcase
    end
    if (litedramcore_choose_req_ce) begin
        case (litedramcore_choose_req_grant)
            1'd0: begin
                if (litedramcore_choose_req_request[1]) begin
                    litedramcore_choose_req_grant <= 1'd1;
                end else begin
                    if (litedramcore_choose_req_request[2]) begin
                        litedramcore_choose_req_grant <= 2'd2;
                    end else begin
                        if (litedramcore_choose_req_request[3]) begin
                            litedramcore_choose_req_grant <= 2'd3;
                        end else begin
                            if (litedramcore_choose_req_request[4]) begin
                                litedramcore_choose_req_grant <= 3'd4;
                            end else begin
                                if (litedramcore_choose_req_request[5]) begin
                                    litedramcore_choose_req_grant <= 3'd5;
                                end else begin
                                    if (litedramcore_choose_req_request[6]) begin
                                        litedramcore_choose_req_grant <= 3'd6;
                                    end else begin
                                        if (litedramcore_choose_req_request[7]) begin
                                            litedramcore_choose_req_grant <= 3'd7;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            1'd1: begin
                if (litedramcore_choose_req_request[2]) begin
                    litedramcore_choose_req_grant <= 2'd2;
                end else begin
                    if (litedramcore_choose_req_request[3]) begin
                        litedramcore_choose_req_grant <= 2'd3;
                    end else begin
                        if (litedramcore_choose_req_request[4]) begin
                            litedramcore_choose_req_grant <= 3'd4;
                        end else begin
                            if (litedramcore_choose_req_request[5]) begin
                                litedramcore_choose_req_grant <= 3'd5;
                            end else begin
                                if (litedramcore_choose_req_request[6]) begin
                                    litedramcore_choose_req_grant <= 3'd6;
                                end else begin
                                    if (litedramcore_choose_req_request[7]) begin
                                        litedramcore_choose_req_grant <= 3'd7;
                                    end else begin
                                        if (litedramcore_choose_req_request[0]) begin
                                            litedramcore_choose_req_grant <= 1'd0;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            2'd2: begin
                if (litedramcore_choose_req_request[3]) begin
                    litedramcore_choose_req_grant <= 2'd3;
                end else begin
                    if (litedramcore_choose_req_request[4]) begin
                        litedramcore_choose_req_grant <= 3'd4;
                    end else begin
                        if (litedramcore_choose_req_request[5]) begin
                            litedramcore_choose_req_grant <= 3'd5;
                        end else begin
                            if (litedramcore_choose_req_request[6]) begin
                                litedramcore_choose_req_grant <= 3'd6;
                            end else begin
                                if (litedramcore_choose_req_request[7]) begin
                                    litedramcore_choose_req_grant <= 3'd7;
                                end else begin
                                    if (litedramcore_choose_req_request[0]) begin
                                        litedramcore_choose_req_grant <= 1'd0;
                                    end else begin
                                        if (litedramcore_choose_req_request[1]) begin
                                            litedramcore_choose_req_grant <= 1'd1;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            2'd3: begin
                if (litedramcore_choose_req_request[4]) begin
                    litedramcore_choose_req_grant <= 3'd4;
                end else begin
                    if (litedramcore_choose_req_request[5]) begin
                        litedramcore_choose_req_grant <= 3'd5;
                    end else begin
                        if (litedramcore_choose_req_request[6]) begin
                            litedramcore_choose_req_grant <= 3'd6;
                        end else begin
                            if (litedramcore_choose_req_request[7]) begin
                                litedramcore_choose_req_grant <= 3'd7;
                            end else begin
                                if (litedramcore_choose_req_request[0]) begin
                                    litedramcore_choose_req_grant <= 1'd0;
                                end else begin
                                    if (litedramcore_choose_req_request[1]) begin
                                        litedramcore_choose_req_grant <= 1'd1;
                                    end else begin
                                        if (litedramcore_choose_req_request[2]) begin
                                            litedramcore_choose_req_grant <= 2'd2;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd4: begin
                if (litedramcore_choose_req_request[5]) begin
                    litedramcore_choose_req_grant <= 3'd5;
                end else begin
                    if (litedramcore_choose_req_request[6]) begin
                        litedramcore_choose_req_grant <= 3'd6;
                    end else begin
                        if (litedramcore_choose_req_request[7]) begin
                            litedramcore_choose_req_grant <= 3'd7;
                        end else begin
                            if (litedramcore_choose_req_request[0]) begin
                                litedramcore_choose_req_grant <= 1'd0;
                            end else begin
                                if (litedramcore_choose_req_request[1]) begin
                                    litedramcore_choose_req_grant <= 1'd1;
                                end else begin
                                    if (litedramcore_choose_req_request[2]) begin
                                        litedramcore_choose_req_grant <= 2'd2;
                                    end else begin
                                        if (litedramcore_choose_req_request[3]) begin
                                            litedramcore_choose_req_grant <= 2'd3;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd5: begin
                if (litedramcore_choose_req_request[6]) begin
                    litedramcore_choose_req_grant <= 3'd6;
                end else begin
                    if (litedramcore_choose_req_request[7]) begin
                        litedramcore_choose_req_grant <= 3'd7;
                    end else begin
                        if (litedramcore_choose_req_request[0]) begin
                            litedramcore_choose_req_grant <= 1'd0;
                        end else begin
                            if (litedramcore_choose_req_request[1]) begin
                                litedramcore_choose_req_grant <= 1'd1;
                            end else begin
                                if (litedramcore_choose_req_request[2]) begin
                                    litedramcore_choose_req_grant <= 2'd2;
                                end else begin
                                    if (litedramcore_choose_req_request[3]) begin
                                        litedramcore_choose_req_grant <= 2'd3;
                                    end else begin
                                        if (litedramcore_choose_req_request[4]) begin
                                            litedramcore_choose_req_grant <= 3'd4;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd6: begin
                if (litedramcore_choose_req_request[7]) begin
                    litedramcore_choose_req_grant <= 3'd7;
                end else begin
                    if (litedramcore_choose_req_request[0]) begin
                        litedramcore_choose_req_grant <= 1'd0;
                    end else begin
                        if (litedramcore_choose_req_request[1]) begin
                            litedramcore_choose_req_grant <= 1'd1;
                        end else begin
                            if (litedramcore_choose_req_request[2]) begin
                                litedramcore_choose_req_grant <= 2'd2;
                            end else begin
                                if (litedramcore_choose_req_request[3]) begin
                                    litedramcore_choose_req_grant <= 2'd3;
                                end else begin
                                    if (litedramcore_choose_req_request[4]) begin
                                        litedramcore_choose_req_grant <= 3'd4;
                                    end else begin
                                        if (litedramcore_choose_req_request[5]) begin
                                            litedramcore_choose_req_grant <= 3'd5;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
            3'd7: begin
                if (litedramcore_choose_req_request[0]) begin
                    litedramcore_choose_req_grant <= 1'd0;
                end else begin
                    if (litedramcore_choose_req_request[1]) begin
                        litedramcore_choose_req_grant <= 1'd1;
                    end else begin
                        if (litedramcore_choose_req_request[2]) begin
                            litedramcore_choose_req_grant <= 2'd2;
                        end else begin
                            if (litedramcore_choose_req_request[3]) begin
                                litedramcore_choose_req_grant <= 2'd3;
                            end else begin
                                if (litedramcore_choose_req_request[4]) begin
                                    litedramcore_choose_req_grant <= 3'd4;
                                end else begin
                                    if (litedramcore_choose_req_request[5]) begin
                                        litedramcore_choose_req_grant <= 3'd5;
                                    end else begin
                                        if (litedramcore_choose_req_request[6]) begin
                                            litedramcore_choose_req_grant <= 3'd6;
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
        endcase
    end
    litedramcore_dfi_p0_cs_n <= 1'd0;
    litedramcore_dfi_p0_bank <= array_muxed0;
    litedramcore_dfi_p0_address <= array_muxed1;
    litedramcore_dfi_p0_cas_n <= (~array_muxed2);
    litedramcore_dfi_p0_ras_n <= (~array_muxed3);
    litedramcore_dfi_p0_we_n <= (~array_muxed4);
    litedramcore_dfi_p0_rddata_en <= array_muxed5;
    litedramcore_dfi_p0_wrdata_en <= array_muxed6;
    litedramcore_dfi_p1_cs_n <= 1'd0;
    litedramcore_dfi_p1_bank <= array_muxed7;
    litedramcore_dfi_p1_address <= array_muxed8;
    litedramcore_dfi_p1_cas_n <= (~array_muxed9);
    litedramcore_dfi_p1_ras_n <= (~array_muxed10);
    litedramcore_dfi_p1_we_n <= (~array_muxed11);
    litedramcore_dfi_p1_rddata_en <= array_muxed12;
    litedramcore_dfi_p1_wrdata_en <= array_muxed13;
    litedramcore_dfi_p2_cs_n <= 1'd0;
    litedramcore_dfi_p2_bank <= array_muxed14;
    litedramcore_dfi_p2_address <= array_muxed15;
    litedramcore_dfi_p2_cas_n <= (~array_muxed16);
    litedramcore_dfi_p2_ras_n <= (~array_muxed17);
    litedramcore_dfi_p2_we_n <= (~array_muxed18);
    litedramcore_dfi_p2_rddata_en <= array_muxed19;
    litedramcore_dfi_p2_wrdata_en <= array_muxed20;
    litedramcore_dfi_p3_cs_n <= 1'd0;
    litedramcore_dfi_p3_bank <= array_muxed21;
    litedramcore_dfi_p3_address <= array_muxed22;
    litedramcore_dfi_p3_cas_n <= (~array_muxed23);
    litedramcore_dfi_p3_ras_n <= (~array_muxed24);
    litedramcore_dfi_p3_we_n <= (~array_muxed25);
    litedramcore_dfi_p3_rddata_en <= array_muxed26;
    litedramcore_dfi_p3_wrdata_en <= array_muxed27;
    if (litedramcore_trrdcon_valid) begin
        litedramcore_trrdcon_count <= 1'd1;
        if (1'd0) begin
            litedramcore_trrdcon_ready <= 1'd1;
        end else begin
            litedramcore_trrdcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_trrdcon_ready)) begin
            litedramcore_trrdcon_count <= (litedramcore_trrdcon_count - 1'd1);
            if ((litedramcore_trrdcon_count == 1'd1)) begin
                litedramcore_trrdcon_ready <= 1'd1;
            end
        end
    end
    litedramcore_tfawcon_window <= {litedramcore_tfawcon_window, litedramcore_tfawcon_valid};
    if ((litedramcore_tfawcon_count < 3'd4)) begin
        if ((litedramcore_tfawcon_count == 2'd3)) begin
            litedramcore_tfawcon_ready <= (~litedramcore_tfawcon_valid);
        end else begin
            litedramcore_tfawcon_ready <= 1'd1;
        end
    end
    if (litedramcore_tccdcon_valid) begin
        litedramcore_tccdcon_count <= 1'd0;
        if (1'd1) begin
            litedramcore_tccdcon_ready <= 1'd1;
        end else begin
            litedramcore_tccdcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_tccdcon_ready)) begin
            litedramcore_tccdcon_count <= (litedramcore_tccdcon_count - 1'd1);
            if ((litedramcore_tccdcon_count == 1'd1)) begin
                litedramcore_tccdcon_ready <= 1'd1;
            end
        end
    end
    if (litedramcore_twtrcon_valid) begin
        litedramcore_twtrcon_count <= 3'd4;
        if (1'd0) begin
            litedramcore_twtrcon_ready <= 1'd1;
        end else begin
            litedramcore_twtrcon_ready <= 1'd0;
        end
    end else begin
        if ((~litedramcore_twtrcon_ready)) begin
            litedramcore_twtrcon_count <= (litedramcore_twtrcon_count - 1'd1);
            if ((litedramcore_twtrcon_count == 1'd1)) begin
                litedramcore_twtrcon_ready <= 1'd1;
            end
        end
    end
    litedramcore_multiplexer_state <= litedramcore_multiplexer_next_state;
    litedramcore_new_master_wdata_ready0 <= ((((((((1'd0 | ((litedramcore_roundrobin0_grant == 1'd0) & litedramcore_interface_bank0_wdata_ready)) | ((litedramcore_roundrobin1_grant == 1'd0) & litedramcore_interface_bank1_wdata_ready)) | ((litedramcore_roundrobin2_grant == 1'd0) & litedramcore_interface_bank2_wdata_ready)) | ((litedramcore_roundrobin3_grant == 1'd0) & litedramcore_interface_bank3_wdata_ready)) | ((litedramcore_roundrobin4_grant == 1'd0) & litedramcore_interface_bank4_wdata_ready)) | ((litedramcore_roundrobin5_grant == 1'd0) & litedramcore_interface_bank5_wdata_ready)) | ((litedramcore_roundrobin6_grant == 1'd0) & litedramcore_interface_bank6_wdata_ready)) | ((litedramcore_roundrobin7_grant == 1'd0) & litedramcore_interface_bank7_wdata_ready));
    litedramcore_new_master_wdata_ready1 <= litedramcore_new_master_wdata_ready0;
    litedramcore_new_master_rdata_valid0 <= ((((((((1'd0 | ((litedramcore_roundrobin0_grant == 1'd0) & litedramcore_interface_bank0_rdata_valid)) | ((litedramcore_roundrobin1_grant == 1'd0) & litedramcore_interface_bank1_rdata_valid)) | ((litedramcore_roundrobin2_grant == 1'd0) & litedramcore_interface_bank2_rdata_valid)) | ((litedramcore_roundrobin3_grant == 1'd0) & litedramcore_interface_bank3_rdata_valid)) | ((litedramcore_roundrobin4_grant == 1'd0) & litedramcore_interface_bank4_rdata_valid)) | ((litedramcore_roundrobin5_grant == 1'd0) & litedramcore_interface_bank5_rdata_valid)) | ((litedramcore_roundrobin6_grant == 1'd0) & litedramcore_interface_bank6_rdata_valid)) | ((litedramcore_roundrobin7_grant == 1'd0) & litedramcore_interface_bank7_rdata_valid));
    litedramcore_new_master_rdata_valid1 <= litedramcore_new_master_rdata_valid0;
    litedramcore_new_master_rdata_valid2 <= litedramcore_new_master_rdata_valid1;
    litedramcore_new_master_rdata_valid3 <= litedramcore_new_master_rdata_valid2;
    litedramcore_new_master_rdata_valid4 <= litedramcore_new_master_rdata_valid3;
    litedramcore_new_master_rdata_valid5 <= litedramcore_new_master_rdata_valid4;
    litedramcore_new_master_rdata_valid6 <= litedramcore_new_master_rdata_valid5;
    litedramcore_new_master_rdata_valid7 <= litedramcore_new_master_rdata_valid6;
    litedramcore_new_master_rdata_valid8 <= litedramcore_new_master_rdata_valid7;
    litedramcore_state <= litedramcore_next_state;
    if (litedramcore_dat_w_next_value_ce0) begin
        litedramcore_dat_w <= litedramcore_dat_w_next_value0;
    end
    if (litedramcore_adr_next_value_ce1) begin
        litedramcore_adr <= litedramcore_adr_next_value1;
    end
    if (litedramcore_we_next_value_ce2) begin
        litedramcore_we <= litedramcore_we_next_value2;
    end
    interface0_bank_bus_dat_r <= 1'd0;
    if (csrbank0_sel) begin
        case (interface0_bank_bus_adr[8:0])
            1'd0: begin
                interface0_bank_bus_dat_r <= csrbank0_init_done0_w;
            end
            1'd1: begin
                interface0_bank_bus_dat_r <= csrbank0_init_error0_w;
            end
        endcase
    end
    if (csrbank0_init_done0_re) begin
        init_done_storage <= csrbank0_init_done0_r;
    end
    init_done_re <= csrbank0_init_done0_re;
    if (csrbank0_init_error0_re) begin
        init_error_storage <= csrbank0_init_error0_r;
    end
    init_error_re <= csrbank0_init_error0_re;
    interface1_bank_bus_dat_r <= 1'd0;
    if (csrbank1_sel) begin
        case (interface1_bank_bus_adr[8:0])
            1'd0: begin
                interface1_bank_bus_dat_r <= csrbank1_rst0_w;
            end
            1'd1: begin
                interface1_bank_bus_dat_r <= csrbank1_dly_sel0_w;
            end
            2'd2: begin
                interface1_bank_bus_dat_r <= csrbank1_half_sys8x_taps0_w;
            end
            2'd3: begin
                interface1_bank_bus_dat_r <= csrbank1_wlevel_en0_w;
            end
            3'd4: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wlevel_strobe_w;
            end
            3'd5: begin
                interface1_bank_bus_dat_r <= k7ddrphy_cdly_rst_w;
            end
            3'd6: begin
                interface1_bank_bus_dat_r <= k7ddrphy_cdly_inc_w;
            end
            3'd7: begin
                interface1_bank_bus_dat_r <= k7ddrphy_rdly_dq_rst_w;
            end
            4'd8: begin
                interface1_bank_bus_dat_r <= k7ddrphy_rdly_dq_inc_w;
            end
            4'd9: begin
                interface1_bank_bus_dat_r <= k7ddrphy_rdly_dq_bitslip_rst_w;
            end
            4'd10: begin
                interface1_bank_bus_dat_r <= k7ddrphy_rdly_dq_bitslip_w;
            end
            4'd11: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wdly_dq_rst_w;
            end
            4'd12: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wdly_dq_inc_w;
            end
            4'd13: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wdly_dqs_rst_w;
            end
            4'd14: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wdly_dqs_inc_w;
            end
            4'd15: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wdly_dq_bitslip_rst_w;
            end
            5'd16: begin
                interface1_bank_bus_dat_r <= k7ddrphy_wdly_dq_bitslip_w;
            end
            5'd17: begin
                interface1_bank_bus_dat_r <= csrbank1_rdphase0_w;
            end
            5'd18: begin
                interface1_bank_bus_dat_r <= csrbank1_wrphase0_w;
            end
        endcase
    end
    if (csrbank1_rst0_re) begin
        k7ddrphy_rst_storage <= csrbank1_rst0_r;
    end
    k7ddrphy_rst_re <= csrbank1_rst0_re;
    if (csrbank1_dly_sel0_re) begin
        k7ddrphy_dly_sel_storage[3:0] <= csrbank1_dly_sel0_r;
    end
    k7ddrphy_dly_sel_re <= csrbank1_dly_sel0_re;
    if (csrbank1_half_sys8x_taps0_re) begin
        k7ddrphy_half_sys8x_taps_storage[4:0] <= csrbank1_half_sys8x_taps0_r;
    end
    k7ddrphy_half_sys8x_taps_re <= csrbank1_half_sys8x_taps0_re;
    if (csrbank1_wlevel_en0_re) begin
        k7ddrphy_wlevel_en_storage <= csrbank1_wlevel_en0_r;
    end
    k7ddrphy_wlevel_en_re <= csrbank1_wlevel_en0_re;
    if (csrbank1_rdphase0_re) begin
        k7ddrphy_rdphase_storage[1:0] <= csrbank1_rdphase0_r;
    end
    k7ddrphy_rdphase_re <= csrbank1_rdphase0_re;
    if (csrbank1_wrphase0_re) begin
        k7ddrphy_wrphase_storage[1:0] <= csrbank1_wrphase0_r;
    end
    k7ddrphy_wrphase_re <= csrbank1_wrphase0_re;
    interface2_bank_bus_dat_r <= 1'd0;
    if (csrbank2_sel) begin
        case (interface2_bank_bus_adr[8:0])
            1'd0: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_control0_w;
            end
            1'd1: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_command0_w;
            end
            2'd2: begin
                interface2_bank_bus_dat_r <= litedramcore_phaseinjector0_command_issue_w;
            end
            2'd3: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_address0_w;
            end
            3'd4: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_baddress0_w;
            end
            3'd5: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_wrdata1_w;
            end
            3'd6: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_wrdata0_w;
            end
            3'd7: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_rddata1_w;
            end
            4'd8: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi0_rddata0_w;
            end
            4'd9: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_command0_w;
            end
            4'd10: begin
                interface2_bank_bus_dat_r <= litedramcore_phaseinjector1_command_issue_w;
            end
            4'd11: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_address0_w;
            end
            4'd12: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_baddress0_w;
            end
            4'd13: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_wrdata1_w;
            end
            4'd14: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_wrdata0_w;
            end
            4'd15: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_rddata1_w;
            end
            5'd16: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi1_rddata0_w;
            end
            5'd17: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_command0_w;
            end
            5'd18: begin
                interface2_bank_bus_dat_r <= litedramcore_phaseinjector2_command_issue_w;
            end
            5'd19: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_address0_w;
            end
            5'd20: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_baddress0_w;
            end
            5'd21: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_wrdata1_w;
            end
            5'd22: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_wrdata0_w;
            end
            5'd23: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_rddata1_w;
            end
            5'd24: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi2_rddata0_w;
            end
            5'd25: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_command0_w;
            end
            5'd26: begin
                interface2_bank_bus_dat_r <= litedramcore_phaseinjector3_command_issue_w;
            end
            5'd27: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_address0_w;
            end
            5'd28: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_baddress0_w;
            end
            5'd29: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_wrdata1_w;
            end
            5'd30: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_wrdata0_w;
            end
            5'd31: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_rddata1_w;
            end
            6'd32: begin
                interface2_bank_bus_dat_r <= csrbank2_dfii_pi3_rddata0_w;
            end
        endcase
    end
    if (csrbank2_dfii_control0_re) begin
        litedramcore_storage[3:0] <= csrbank2_dfii_control0_r;
    end
    litedramcore_re <= csrbank2_dfii_control0_re;
    if (csrbank2_dfii_pi0_command0_re) begin
        litedramcore_phaseinjector0_command_storage[5:0] <= csrbank2_dfii_pi0_command0_r;
    end
    litedramcore_phaseinjector0_command_re <= csrbank2_dfii_pi0_command0_re;
    if (csrbank2_dfii_pi0_address0_re) begin
        litedramcore_phaseinjector0_address_storage[14:0] <= csrbank2_dfii_pi0_address0_r;
    end
    litedramcore_phaseinjector0_address_re <= csrbank2_dfii_pi0_address0_re;
    if (csrbank2_dfii_pi0_baddress0_re) begin
        litedramcore_phaseinjector0_baddress_storage[2:0] <= csrbank2_dfii_pi0_baddress0_r;
    end
    litedramcore_phaseinjector0_baddress_re <= csrbank2_dfii_pi0_baddress0_re;
    if (csrbank2_dfii_pi0_wrdata1_re) begin
        litedramcore_phaseinjector0_wrdata_storage[63:32] <= csrbank2_dfii_pi0_wrdata1_r;
    end
    if (csrbank2_dfii_pi0_wrdata0_re) begin
        litedramcore_phaseinjector0_wrdata_storage[31:0] <= csrbank2_dfii_pi0_wrdata0_r;
    end
    litedramcore_phaseinjector0_wrdata_re <= csrbank2_dfii_pi0_wrdata0_re;
    litedramcore_phaseinjector0_rddata_re <= csrbank2_dfii_pi0_rddata0_re;
    if (csrbank2_dfii_pi1_command0_re) begin
        litedramcore_phaseinjector1_command_storage[5:0] <= csrbank2_dfii_pi1_command0_r;
    end
    litedramcore_phaseinjector1_command_re <= csrbank2_dfii_pi1_command0_re;
    if (csrbank2_dfii_pi1_address0_re) begin
        litedramcore_phaseinjector1_address_storage[14:0] <= csrbank2_dfii_pi1_address0_r;
    end
    litedramcore_phaseinjector1_address_re <= csrbank2_dfii_pi1_address0_re;
    if (csrbank2_dfii_pi1_baddress0_re) begin
        litedramcore_phaseinjector1_baddress_storage[2:0] <= csrbank2_dfii_pi1_baddress0_r;
    end
    litedramcore_phaseinjector1_baddress_re <= csrbank2_dfii_pi1_baddress0_re;
    if (csrbank2_dfii_pi1_wrdata1_re) begin
        litedramcore_phaseinjector1_wrdata_storage[63:32] <= csrbank2_dfii_pi1_wrdata1_r;
    end
    if (csrbank2_dfii_pi1_wrdata0_re) begin
        litedramcore_phaseinjector1_wrdata_storage[31:0] <= csrbank2_dfii_pi1_wrdata0_r;
    end
    litedramcore_phaseinjector1_wrdata_re <= csrbank2_dfii_pi1_wrdata0_re;
    litedramcore_phaseinjector1_rddata_re <= csrbank2_dfii_pi1_rddata0_re;
    if (csrbank2_dfii_pi2_command0_re) begin
        litedramcore_phaseinjector2_command_storage[5:0] <= csrbank2_dfii_pi2_command0_r;
    end
    litedramcore_phaseinjector2_command_re <= csrbank2_dfii_pi2_command0_re;
    if (csrbank2_dfii_pi2_address0_re) begin
        litedramcore_phaseinjector2_address_storage[14:0] <= csrbank2_dfii_pi2_address0_r;
    end
    litedramcore_phaseinjector2_address_re <= csrbank2_dfii_pi2_address0_re;
    if (csrbank2_dfii_pi2_baddress0_re) begin
        litedramcore_phaseinjector2_baddress_storage[2:0] <= csrbank2_dfii_pi2_baddress0_r;
    end
    litedramcore_phaseinjector2_baddress_re <= csrbank2_dfii_pi2_baddress0_re;
    if (csrbank2_dfii_pi2_wrdata1_re) begin
        litedramcore_phaseinjector2_wrdata_storage[63:32] <= csrbank2_dfii_pi2_wrdata1_r;
    end
    if (csrbank2_dfii_pi2_wrdata0_re) begin
        litedramcore_phaseinjector2_wrdata_storage[31:0] <= csrbank2_dfii_pi2_wrdata0_r;
    end
    litedramcore_phaseinjector2_wrdata_re <= csrbank2_dfii_pi2_wrdata0_re;
    litedramcore_phaseinjector2_rddata_re <= csrbank2_dfii_pi2_rddata0_re;
    if (csrbank2_dfii_pi3_command0_re) begin
        litedramcore_phaseinjector3_command_storage[5:0] <= csrbank2_dfii_pi3_command0_r;
    end
    litedramcore_phaseinjector3_command_re <= csrbank2_dfii_pi3_command0_re;
    if (csrbank2_dfii_pi3_address0_re) begin
        litedramcore_phaseinjector3_address_storage[14:0] <= csrbank2_dfii_pi3_address0_r;
    end
    litedramcore_phaseinjector3_address_re <= csrbank2_dfii_pi3_address0_re;
    if (csrbank2_dfii_pi3_baddress0_re) begin
        litedramcore_phaseinjector3_baddress_storage[2:0] <= csrbank2_dfii_pi3_baddress0_r;
    end
    litedramcore_phaseinjector3_baddress_re <= csrbank2_dfii_pi3_baddress0_re;
    if (csrbank2_dfii_pi3_wrdata1_re) begin
        litedramcore_phaseinjector3_wrdata_storage[63:32] <= csrbank2_dfii_pi3_wrdata1_r;
    end
    if (csrbank2_dfii_pi3_wrdata0_re) begin
        litedramcore_phaseinjector3_wrdata_storage[31:0] <= csrbank2_dfii_pi3_wrdata0_r;
    end
    litedramcore_phaseinjector3_wrdata_re <= csrbank2_dfii_pi3_wrdata0_re;
    litedramcore_phaseinjector3_rddata_re <= csrbank2_dfii_pi3_rddata0_re;
    if (sys_rst) begin
        k7ddrphy_rst_storage <= 1'd0;
        k7ddrphy_rst_re <= 1'd0;
        k7ddrphy_dly_sel_storage <= 4'd0;
        k7ddrphy_dly_sel_re <= 1'd0;
        k7ddrphy_half_sys8x_taps_storage <= 5'd8;
        k7ddrphy_half_sys8x_taps_re <= 1'd0;
        k7ddrphy_wlevel_en_storage <= 1'd0;
        k7ddrphy_wlevel_en_re <= 1'd0;
        k7ddrphy_rdphase_storage <= 2'd1;
        k7ddrphy_rdphase_re <= 1'd0;
        k7ddrphy_wrphase_storage <= 2'd2;
        k7ddrphy_wrphase_re <= 1'd0;
        k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline0 <= 1'd0;
        k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1 <= 1'd0;
        k7ddrphy_bitslip0_value0 <= 3'd7;
        k7ddrphy_bitslip1_value0 <= 3'd7;
        k7ddrphy_bitslip2_value0 <= 3'd7;
        k7ddrphy_bitslip3_value0 <= 3'd7;
        k7ddrphy_bitslip0_value1 <= 3'd7;
        k7ddrphy_bitslip1_value1 <= 3'd7;
        k7ddrphy_bitslip2_value1 <= 3'd7;
        k7ddrphy_bitslip3_value1 <= 3'd7;
        k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline0 <= 1'd0;
        k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1 <= 1'd0;
        k7ddrphy_bitslip0_value2 <= 3'd7;
        k7ddrphy_bitslip0_value3 <= 3'd7;
        k7ddrphy_bitslip1_value2 <= 3'd7;
        k7ddrphy_bitslip1_value3 <= 3'd7;
        k7ddrphy_bitslip2_value2 <= 3'd7;
        k7ddrphy_bitslip2_value3 <= 3'd7;
        k7ddrphy_bitslip3_value2 <= 3'd7;
        k7ddrphy_bitslip3_value3 <= 3'd7;
        k7ddrphy_bitslip4_value0 <= 3'd7;
        k7ddrphy_bitslip4_value1 <= 3'd7;
        k7ddrphy_bitslip5_value0 <= 3'd7;
        k7ddrphy_bitslip5_value1 <= 3'd7;
        k7ddrphy_bitslip6_value0 <= 3'd7;
        k7ddrphy_bitslip6_value1 <= 3'd7;
        k7ddrphy_bitslip7_value0 <= 3'd7;
        k7ddrphy_bitslip7_value1 <= 3'd7;
        k7ddrphy_bitslip8_value0 <= 3'd7;
        k7ddrphy_bitslip8_value1 <= 3'd7;
        k7ddrphy_bitslip9_value0 <= 3'd7;
        k7ddrphy_bitslip9_value1 <= 3'd7;
        k7ddrphy_bitslip10_value0 <= 3'd7;
        k7ddrphy_bitslip10_value1 <= 3'd7;
        k7ddrphy_bitslip11_value0 <= 3'd7;
        k7ddrphy_bitslip11_value1 <= 3'd7;
        k7ddrphy_bitslip12_value0 <= 3'd7;
        k7ddrphy_bitslip12_value1 <= 3'd7;
        k7ddrphy_bitslip13_value0 <= 3'd7;
        k7ddrphy_bitslip13_value1 <= 3'd7;
        k7ddrphy_bitslip14_value0 <= 3'd7;
        k7ddrphy_bitslip14_value1 <= 3'd7;
        k7ddrphy_bitslip15_value0 <= 3'd7;
        k7ddrphy_bitslip15_value1 <= 3'd7;
        k7ddrphy_bitslip16_value0 <= 3'd7;
        k7ddrphy_bitslip16_value1 <= 3'd7;
        k7ddrphy_bitslip17_value0 <= 3'd7;
        k7ddrphy_bitslip17_value1 <= 3'd7;
        k7ddrphy_bitslip18_value0 <= 3'd7;
        k7ddrphy_bitslip18_value1 <= 3'd7;
        k7ddrphy_bitslip19_value0 <= 3'd7;
        k7ddrphy_bitslip19_value1 <= 3'd7;
        k7ddrphy_bitslip20_value0 <= 3'd7;
        k7ddrphy_bitslip20_value1 <= 3'd7;
        k7ddrphy_bitslip21_value0 <= 3'd7;
        k7ddrphy_bitslip21_value1 <= 3'd7;
        k7ddrphy_bitslip22_value0 <= 3'd7;
        k7ddrphy_bitslip22_value1 <= 3'd7;
        k7ddrphy_bitslip23_value0 <= 3'd7;
        k7ddrphy_bitslip23_value1 <= 3'd7;
        k7ddrphy_bitslip24_value0 <= 3'd7;
        k7ddrphy_bitslip24_value1 <= 3'd7;
        k7ddrphy_bitslip25_value0 <= 3'd7;
        k7ddrphy_bitslip25_value1 <= 3'd7;
        k7ddrphy_bitslip26_value0 <= 3'd7;
        k7ddrphy_bitslip26_value1 <= 3'd7;
        k7ddrphy_bitslip27_value0 <= 3'd7;
        k7ddrphy_bitslip27_value1 <= 3'd7;
        k7ddrphy_bitslip28_value0 <= 3'd7;
        k7ddrphy_bitslip28_value1 <= 3'd7;
        k7ddrphy_bitslip29_value0 <= 3'd7;
        k7ddrphy_bitslip29_value1 <= 3'd7;
        k7ddrphy_bitslip30_value0 <= 3'd7;
        k7ddrphy_bitslip30_value1 <= 3'd7;
        k7ddrphy_bitslip31_value0 <= 3'd7;
        k7ddrphy_bitslip31_value1 <= 3'd7;
        k7ddrphy_rddata_en_tappeddelayline0 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline1 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline2 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline3 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline4 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline5 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline6 <= 1'd0;
        k7ddrphy_rddata_en_tappeddelayline7 <= 1'd0;
        k7ddrphy_wrdata_en_tappeddelayline0 <= 1'd0;
        k7ddrphy_wrdata_en_tappeddelayline1 <= 1'd0;
        k7ddrphy_wrdata_en_tappeddelayline2 <= 1'd0;
        litedramcore_storage <= 4'd1;
        litedramcore_re <= 1'd0;
        litedramcore_phaseinjector0_command_storage <= 6'd0;
        litedramcore_phaseinjector0_command_re <= 1'd0;
        litedramcore_phaseinjector0_address_re <= 1'd0;
        litedramcore_phaseinjector0_baddress_re <= 1'd0;
        litedramcore_phaseinjector0_wrdata_re <= 1'd0;
        litedramcore_phaseinjector0_rddata_status <= 64'd0;
        litedramcore_phaseinjector0_rddata_re <= 1'd0;
        litedramcore_phaseinjector1_command_storage <= 6'd0;
        litedramcore_phaseinjector1_command_re <= 1'd0;
        litedramcore_phaseinjector1_address_re <= 1'd0;
        litedramcore_phaseinjector1_baddress_re <= 1'd0;
        litedramcore_phaseinjector1_wrdata_re <= 1'd0;
        litedramcore_phaseinjector1_rddata_status <= 64'd0;
        litedramcore_phaseinjector1_rddata_re <= 1'd0;
        litedramcore_phaseinjector2_command_storage <= 6'd0;
        litedramcore_phaseinjector2_command_re <= 1'd0;
        litedramcore_phaseinjector2_address_re <= 1'd0;
        litedramcore_phaseinjector2_baddress_re <= 1'd0;
        litedramcore_phaseinjector2_wrdata_re <= 1'd0;
        litedramcore_phaseinjector2_rddata_status <= 64'd0;
        litedramcore_phaseinjector2_rddata_re <= 1'd0;
        litedramcore_phaseinjector3_command_storage <= 6'd0;
        litedramcore_phaseinjector3_command_re <= 1'd0;
        litedramcore_phaseinjector3_address_re <= 1'd0;
        litedramcore_phaseinjector3_baddress_re <= 1'd0;
        litedramcore_phaseinjector3_wrdata_re <= 1'd0;
        litedramcore_phaseinjector3_rddata_status <= 64'd0;
        litedramcore_phaseinjector3_rddata_re <= 1'd0;
        litedramcore_dfi_p0_address <= 15'd0;
        litedramcore_dfi_p0_bank <= 3'd0;
        litedramcore_dfi_p0_cas_n <= 1'd1;
        litedramcore_dfi_p0_cs_n <= 1'd1;
        litedramcore_dfi_p0_ras_n <= 1'd1;
        litedramcore_dfi_p0_we_n <= 1'd1;
        litedramcore_dfi_p0_wrdata_en <= 1'd0;
        litedramcore_dfi_p0_rddata_en <= 1'd0;
        litedramcore_dfi_p1_address <= 15'd0;
        litedramcore_dfi_p1_bank <= 3'd0;
        litedramcore_dfi_p1_cas_n <= 1'd1;
        litedramcore_dfi_p1_cs_n <= 1'd1;
        litedramcore_dfi_p1_ras_n <= 1'd1;
        litedramcore_dfi_p1_we_n <= 1'd1;
        litedramcore_dfi_p1_wrdata_en <= 1'd0;
        litedramcore_dfi_p1_rddata_en <= 1'd0;
        litedramcore_dfi_p2_address <= 15'd0;
        litedramcore_dfi_p2_bank <= 3'd0;
        litedramcore_dfi_p2_cas_n <= 1'd1;
        litedramcore_dfi_p2_cs_n <= 1'd1;
        litedramcore_dfi_p2_ras_n <= 1'd1;
        litedramcore_dfi_p2_we_n <= 1'd1;
        litedramcore_dfi_p2_wrdata_en <= 1'd0;
        litedramcore_dfi_p2_rddata_en <= 1'd0;
        litedramcore_dfi_p3_address <= 15'd0;
        litedramcore_dfi_p3_bank <= 3'd0;
        litedramcore_dfi_p3_cas_n <= 1'd1;
        litedramcore_dfi_p3_cs_n <= 1'd1;
        litedramcore_dfi_p3_ras_n <= 1'd1;
        litedramcore_dfi_p3_we_n <= 1'd1;
        litedramcore_dfi_p3_wrdata_en <= 1'd0;
        litedramcore_dfi_p3_rddata_en <= 1'd0;
        litedramcore_cmd_payload_a <= 15'd0;
        litedramcore_cmd_payload_ba <= 3'd0;
        litedramcore_cmd_payload_cas <= 1'd0;
        litedramcore_cmd_payload_ras <= 1'd0;
        litedramcore_cmd_payload_we <= 1'd0;
        litedramcore_timer_count1 <= 10'd781;
        litedramcore_postponer_req_o <= 1'd0;
        litedramcore_postponer_count <= 1'd0;
        litedramcore_sequencer_done1 <= 1'd0;
        litedramcore_sequencer_counter <= 6'd0;
        litedramcore_sequencer_count <= 1'd0;
        litedramcore_zqcs_timer_count1 <= 27'd99999999;
        litedramcore_zqcs_executer_done <= 1'd0;
        litedramcore_zqcs_executer_counter <= 5'd0;
        litedramcore_bankmachine0_level <= 5'd0;
        litedramcore_bankmachine0_produce <= 4'd0;
        litedramcore_bankmachine0_consume <= 4'd0;
        litedramcore_bankmachine0_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine0_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine0_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine0_row <= 15'd0;
        litedramcore_bankmachine0_row_opened <= 1'd0;
        litedramcore_bankmachine0_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine0_twtpcon_count <= 3'd0;
        litedramcore_bankmachine0_trccon_ready <= 1'd0;
        litedramcore_bankmachine0_trccon_count <= 3'd0;
        litedramcore_bankmachine0_trascon_ready <= 1'd0;
        litedramcore_bankmachine0_trascon_count <= 3'd0;
        litedramcore_bankmachine1_level <= 5'd0;
        litedramcore_bankmachine1_produce <= 4'd0;
        litedramcore_bankmachine1_consume <= 4'd0;
        litedramcore_bankmachine1_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine1_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine1_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine1_row <= 15'd0;
        litedramcore_bankmachine1_row_opened <= 1'd0;
        litedramcore_bankmachine1_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine1_twtpcon_count <= 3'd0;
        litedramcore_bankmachine1_trccon_ready <= 1'd0;
        litedramcore_bankmachine1_trccon_count <= 3'd0;
        litedramcore_bankmachine1_trascon_ready <= 1'd0;
        litedramcore_bankmachine1_trascon_count <= 3'd0;
        litedramcore_bankmachine2_level <= 5'd0;
        litedramcore_bankmachine2_produce <= 4'd0;
        litedramcore_bankmachine2_consume <= 4'd0;
        litedramcore_bankmachine2_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine2_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine2_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine2_row <= 15'd0;
        litedramcore_bankmachine2_row_opened <= 1'd0;
        litedramcore_bankmachine2_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine2_twtpcon_count <= 3'd0;
        litedramcore_bankmachine2_trccon_ready <= 1'd0;
        litedramcore_bankmachine2_trccon_count <= 3'd0;
        litedramcore_bankmachine2_trascon_ready <= 1'd0;
        litedramcore_bankmachine2_trascon_count <= 3'd0;
        litedramcore_bankmachine3_level <= 5'd0;
        litedramcore_bankmachine3_produce <= 4'd0;
        litedramcore_bankmachine3_consume <= 4'd0;
        litedramcore_bankmachine3_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine3_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine3_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine3_row <= 15'd0;
        litedramcore_bankmachine3_row_opened <= 1'd0;
        litedramcore_bankmachine3_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine3_twtpcon_count <= 3'd0;
        litedramcore_bankmachine3_trccon_ready <= 1'd0;
        litedramcore_bankmachine3_trccon_count <= 3'd0;
        litedramcore_bankmachine3_trascon_ready <= 1'd0;
        litedramcore_bankmachine3_trascon_count <= 3'd0;
        litedramcore_bankmachine4_level <= 5'd0;
        litedramcore_bankmachine4_produce <= 4'd0;
        litedramcore_bankmachine4_consume <= 4'd0;
        litedramcore_bankmachine4_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine4_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine4_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine4_row <= 15'd0;
        litedramcore_bankmachine4_row_opened <= 1'd0;
        litedramcore_bankmachine4_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine4_twtpcon_count <= 3'd0;
        litedramcore_bankmachine4_trccon_ready <= 1'd0;
        litedramcore_bankmachine4_trccon_count <= 3'd0;
        litedramcore_bankmachine4_trascon_ready <= 1'd0;
        litedramcore_bankmachine4_trascon_count <= 3'd0;
        litedramcore_bankmachine5_level <= 5'd0;
        litedramcore_bankmachine5_produce <= 4'd0;
        litedramcore_bankmachine5_consume <= 4'd0;
        litedramcore_bankmachine5_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine5_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine5_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine5_row <= 15'd0;
        litedramcore_bankmachine5_row_opened <= 1'd0;
        litedramcore_bankmachine5_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine5_twtpcon_count <= 3'd0;
        litedramcore_bankmachine5_trccon_ready <= 1'd0;
        litedramcore_bankmachine5_trccon_count <= 3'd0;
        litedramcore_bankmachine5_trascon_ready <= 1'd0;
        litedramcore_bankmachine5_trascon_count <= 3'd0;
        litedramcore_bankmachine6_level <= 5'd0;
        litedramcore_bankmachine6_produce <= 4'd0;
        litedramcore_bankmachine6_consume <= 4'd0;
        litedramcore_bankmachine6_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine6_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine6_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine6_row <= 15'd0;
        litedramcore_bankmachine6_row_opened <= 1'd0;
        litedramcore_bankmachine6_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine6_twtpcon_count <= 3'd0;
        litedramcore_bankmachine6_trccon_ready <= 1'd0;
        litedramcore_bankmachine6_trccon_count <= 3'd0;
        litedramcore_bankmachine6_trascon_ready <= 1'd0;
        litedramcore_bankmachine6_trascon_count <= 3'd0;
        litedramcore_bankmachine7_level <= 5'd0;
        litedramcore_bankmachine7_produce <= 4'd0;
        litedramcore_bankmachine7_consume <= 4'd0;
        litedramcore_bankmachine7_pipe_valid_source_valid <= 1'd0;
        litedramcore_bankmachine7_pipe_valid_source_payload_we <= 1'd0;
        litedramcore_bankmachine7_pipe_valid_source_payload_addr <= 22'd0;
        litedramcore_bankmachine7_row <= 15'd0;
        litedramcore_bankmachine7_row_opened <= 1'd0;
        litedramcore_bankmachine7_twtpcon_ready <= 1'd0;
        litedramcore_bankmachine7_twtpcon_count <= 3'd0;
        litedramcore_bankmachine7_trccon_ready <= 1'd0;
        litedramcore_bankmachine7_trccon_count <= 3'd0;
        litedramcore_bankmachine7_trascon_ready <= 1'd0;
        litedramcore_bankmachine7_trascon_count <= 3'd0;
        litedramcore_choose_cmd_grant <= 3'd0;
        litedramcore_choose_req_grant <= 3'd0;
        litedramcore_trrdcon_ready <= 1'd0;
        litedramcore_trrdcon_count <= 1'd0;
        litedramcore_tfawcon_ready <= 1'd1;
        litedramcore_tfawcon_window <= 5'd0;
        litedramcore_tccdcon_ready <= 1'd0;
        litedramcore_tccdcon_count <= 1'd0;
        litedramcore_twtrcon_ready <= 1'd0;
        litedramcore_twtrcon_count <= 3'd0;
        litedramcore_time0 <= 5'd0;
        litedramcore_time1 <= 4'd0;
        init_done_storage <= 1'd0;
        init_done_re <= 1'd0;
        init_error_storage <= 1'd0;
        init_error_re <= 1'd0;
        litedramcore_we <= 1'd0;
        litedramcore_refresher_state <= 2'd0;
        litedramcore_bankmachine0_state <= 4'd0;
        litedramcore_bankmachine1_state <= 4'd0;
        litedramcore_bankmachine2_state <= 4'd0;
        litedramcore_bankmachine3_state <= 4'd0;
        litedramcore_bankmachine4_state <= 4'd0;
        litedramcore_bankmachine5_state <= 4'd0;
        litedramcore_bankmachine6_state <= 4'd0;
        litedramcore_bankmachine7_state <= 4'd0;
        litedramcore_multiplexer_state <= 4'd0;
        litedramcore_new_master_wdata_ready0 <= 1'd0;
        litedramcore_new_master_wdata_ready1 <= 1'd0;
        litedramcore_new_master_rdata_valid0 <= 1'd0;
        litedramcore_new_master_rdata_valid1 <= 1'd0;
        litedramcore_new_master_rdata_valid2 <= 1'd0;
        litedramcore_new_master_rdata_valid3 <= 1'd0;
        litedramcore_new_master_rdata_valid4 <= 1'd0;
        litedramcore_new_master_rdata_valid5 <= 1'd0;
        litedramcore_new_master_rdata_valid6 <= 1'd0;
        litedramcore_new_master_rdata_valid7 <= 1'd0;
        litedramcore_new_master_rdata_valid8 <= 1'd0;
        litedramcore_state <= 2'd0;
    end
end


//------------------------------------------------------------------------------
// Specialized Logic
//------------------------------------------------------------------------------

BUFG BUFG(
	.I(clkout0),
	.O(clkout_buf0)
);

BUFG BUFG_1(
	.I(clkout1),
	.O(clkout_buf1)
);

BUFG BUFG_2(
	.I(clkout2),
	.O(clkout_buf2)
);

BUFG BUFG_3(
	.I(clkout3),
	.O(clkout_buf3)
);

IDELAYCTRL IDELAYCTRL(
	.REFCLK(iodelay_clk),
	.RST(ic_reset)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(1'd0),
	.D2(1'd1),
	.D3(1'd0),
	.D4(1'd1),
	.D5(1'd0),
	.D6(1'd1),
	.D7(1'd0),
	.D8(1'd1),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_sd_clk_se_nodelay)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_sd_clk_se_delayed),
	.ODATAIN(k7ddrphy_sd_clk_se_nodelay)
);

OBUFDS OBUFDS(
	.I(k7ddrphy_sd_clk_se_delayed),
	.O(ddram_clk_p),
	.OB(ddram_clk_n)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_1 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_reset_n),
	.D2(k7ddrphy_dfi_p0_reset_n),
	.D3(k7ddrphy_dfi_p1_reset_n),
	.D4(k7ddrphy_dfi_p1_reset_n),
	.D5(k7ddrphy_dfi_p2_reset_n),
	.D6(k7ddrphy_dfi_p2_reset_n),
	.D7(k7ddrphy_dfi_p3_reset_n),
	.D8(k7ddrphy_dfi_p3_reset_n),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq0)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_1 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_reset_n),
	.ODATAIN(k7ddrphy_oq0)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_2 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_cs_n),
	.D2(k7ddrphy_dfi_p0_cs_n),
	.D3(k7ddrphy_dfi_p1_cs_n),
	.D4(k7ddrphy_dfi_p1_cs_n),
	.D5(k7ddrphy_dfi_p2_cs_n),
	.D6(k7ddrphy_dfi_p2_cs_n),
	.D7(k7ddrphy_dfi_p3_cs_n),
	.D8(k7ddrphy_dfi_p3_cs_n),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq1)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_2 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_cs_n),
	.ODATAIN(k7ddrphy_oq1)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_3 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[0]),
	.D2(k7ddrphy_dfi_p0_address[0]),
	.D3(k7ddrphy_dfi_p1_address[0]),
	.D4(k7ddrphy_dfi_p1_address[0]),
	.D5(k7ddrphy_dfi_p2_address[0]),
	.D6(k7ddrphy_dfi_p2_address[0]),
	.D7(k7ddrphy_dfi_p3_address[0]),
	.D8(k7ddrphy_dfi_p3_address[0]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq2)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_3 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[0]),
	.ODATAIN(k7ddrphy_oq2)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_4 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[1]),
	.D2(k7ddrphy_dfi_p0_address[1]),
	.D3(k7ddrphy_dfi_p1_address[1]),
	.D4(k7ddrphy_dfi_p1_address[1]),
	.D5(k7ddrphy_dfi_p2_address[1]),
	.D6(k7ddrphy_dfi_p2_address[1]),
	.D7(k7ddrphy_dfi_p3_address[1]),
	.D8(k7ddrphy_dfi_p3_address[1]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq3)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_4 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[1]),
	.ODATAIN(k7ddrphy_oq3)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_5 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[2]),
	.D2(k7ddrphy_dfi_p0_address[2]),
	.D3(k7ddrphy_dfi_p1_address[2]),
	.D4(k7ddrphy_dfi_p1_address[2]),
	.D5(k7ddrphy_dfi_p2_address[2]),
	.D6(k7ddrphy_dfi_p2_address[2]),
	.D7(k7ddrphy_dfi_p3_address[2]),
	.D8(k7ddrphy_dfi_p3_address[2]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq4)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_5 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[2]),
	.ODATAIN(k7ddrphy_oq4)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_6 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[3]),
	.D2(k7ddrphy_dfi_p0_address[3]),
	.D3(k7ddrphy_dfi_p1_address[3]),
	.D4(k7ddrphy_dfi_p1_address[3]),
	.D5(k7ddrphy_dfi_p2_address[3]),
	.D6(k7ddrphy_dfi_p2_address[3]),
	.D7(k7ddrphy_dfi_p3_address[3]),
	.D8(k7ddrphy_dfi_p3_address[3]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq5)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_6 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[3]),
	.ODATAIN(k7ddrphy_oq5)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_7 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[4]),
	.D2(k7ddrphy_dfi_p0_address[4]),
	.D3(k7ddrphy_dfi_p1_address[4]),
	.D4(k7ddrphy_dfi_p1_address[4]),
	.D5(k7ddrphy_dfi_p2_address[4]),
	.D6(k7ddrphy_dfi_p2_address[4]),
	.D7(k7ddrphy_dfi_p3_address[4]),
	.D8(k7ddrphy_dfi_p3_address[4]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq6)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_7 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[4]),
	.ODATAIN(k7ddrphy_oq6)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_8 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[5]),
	.D2(k7ddrphy_dfi_p0_address[5]),
	.D3(k7ddrphy_dfi_p1_address[5]),
	.D4(k7ddrphy_dfi_p1_address[5]),
	.D5(k7ddrphy_dfi_p2_address[5]),
	.D6(k7ddrphy_dfi_p2_address[5]),
	.D7(k7ddrphy_dfi_p3_address[5]),
	.D8(k7ddrphy_dfi_p3_address[5]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq7)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_8 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[5]),
	.ODATAIN(k7ddrphy_oq7)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_9 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[6]),
	.D2(k7ddrphy_dfi_p0_address[6]),
	.D3(k7ddrphy_dfi_p1_address[6]),
	.D4(k7ddrphy_dfi_p1_address[6]),
	.D5(k7ddrphy_dfi_p2_address[6]),
	.D6(k7ddrphy_dfi_p2_address[6]),
	.D7(k7ddrphy_dfi_p3_address[6]),
	.D8(k7ddrphy_dfi_p3_address[6]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq8)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_9 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[6]),
	.ODATAIN(k7ddrphy_oq8)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_10 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[7]),
	.D2(k7ddrphy_dfi_p0_address[7]),
	.D3(k7ddrphy_dfi_p1_address[7]),
	.D4(k7ddrphy_dfi_p1_address[7]),
	.D5(k7ddrphy_dfi_p2_address[7]),
	.D6(k7ddrphy_dfi_p2_address[7]),
	.D7(k7ddrphy_dfi_p3_address[7]),
	.D8(k7ddrphy_dfi_p3_address[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq9)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_10 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[7]),
	.ODATAIN(k7ddrphy_oq9)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_11 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[8]),
	.D2(k7ddrphy_dfi_p0_address[8]),
	.D3(k7ddrphy_dfi_p1_address[8]),
	.D4(k7ddrphy_dfi_p1_address[8]),
	.D5(k7ddrphy_dfi_p2_address[8]),
	.D6(k7ddrphy_dfi_p2_address[8]),
	.D7(k7ddrphy_dfi_p3_address[8]),
	.D8(k7ddrphy_dfi_p3_address[8]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq10)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_11 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[8]),
	.ODATAIN(k7ddrphy_oq10)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_12 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[9]),
	.D2(k7ddrphy_dfi_p0_address[9]),
	.D3(k7ddrphy_dfi_p1_address[9]),
	.D4(k7ddrphy_dfi_p1_address[9]),
	.D5(k7ddrphy_dfi_p2_address[9]),
	.D6(k7ddrphy_dfi_p2_address[9]),
	.D7(k7ddrphy_dfi_p3_address[9]),
	.D8(k7ddrphy_dfi_p3_address[9]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq11)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_12 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[9]),
	.ODATAIN(k7ddrphy_oq11)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_13 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[10]),
	.D2(k7ddrphy_dfi_p0_address[10]),
	.D3(k7ddrphy_dfi_p1_address[10]),
	.D4(k7ddrphy_dfi_p1_address[10]),
	.D5(k7ddrphy_dfi_p2_address[10]),
	.D6(k7ddrphy_dfi_p2_address[10]),
	.D7(k7ddrphy_dfi_p3_address[10]),
	.D8(k7ddrphy_dfi_p3_address[10]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq12)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_13 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[10]),
	.ODATAIN(k7ddrphy_oq12)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_14 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[11]),
	.D2(k7ddrphy_dfi_p0_address[11]),
	.D3(k7ddrphy_dfi_p1_address[11]),
	.D4(k7ddrphy_dfi_p1_address[11]),
	.D5(k7ddrphy_dfi_p2_address[11]),
	.D6(k7ddrphy_dfi_p2_address[11]),
	.D7(k7ddrphy_dfi_p3_address[11]),
	.D8(k7ddrphy_dfi_p3_address[11]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq13)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_14 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[11]),
	.ODATAIN(k7ddrphy_oq13)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_15 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[12]),
	.D2(k7ddrphy_dfi_p0_address[12]),
	.D3(k7ddrphy_dfi_p1_address[12]),
	.D4(k7ddrphy_dfi_p1_address[12]),
	.D5(k7ddrphy_dfi_p2_address[12]),
	.D6(k7ddrphy_dfi_p2_address[12]),
	.D7(k7ddrphy_dfi_p3_address[12]),
	.D8(k7ddrphy_dfi_p3_address[12]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq14)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_15 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[12]),
	.ODATAIN(k7ddrphy_oq14)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_16 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[13]),
	.D2(k7ddrphy_dfi_p0_address[13]),
	.D3(k7ddrphy_dfi_p1_address[13]),
	.D4(k7ddrphy_dfi_p1_address[13]),
	.D5(k7ddrphy_dfi_p2_address[13]),
	.D6(k7ddrphy_dfi_p2_address[13]),
	.D7(k7ddrphy_dfi_p3_address[13]),
	.D8(k7ddrphy_dfi_p3_address[13]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq15)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_16 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[13]),
	.ODATAIN(k7ddrphy_oq15)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_17 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_address[14]),
	.D2(k7ddrphy_dfi_p0_address[14]),
	.D3(k7ddrphy_dfi_p1_address[14]),
	.D4(k7ddrphy_dfi_p1_address[14]),
	.D5(k7ddrphy_dfi_p2_address[14]),
	.D6(k7ddrphy_dfi_p2_address[14]),
	.D7(k7ddrphy_dfi_p3_address[14]),
	.D8(k7ddrphy_dfi_p3_address[14]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq16)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_17 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_a[14]),
	.ODATAIN(k7ddrphy_oq16)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_18 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_bank[0]),
	.D2(k7ddrphy_dfi_p0_bank[0]),
	.D3(k7ddrphy_dfi_p1_bank[0]),
	.D4(k7ddrphy_dfi_p1_bank[0]),
	.D5(k7ddrphy_dfi_p2_bank[0]),
	.D6(k7ddrphy_dfi_p2_bank[0]),
	.D7(k7ddrphy_dfi_p3_bank[0]),
	.D8(k7ddrphy_dfi_p3_bank[0]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq17)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_18 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_pads_ba[0]),
	.ODATAIN(k7ddrphy_oq17)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_19 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_bank[1]),
	.D2(k7ddrphy_dfi_p0_bank[1]),
	.D3(k7ddrphy_dfi_p1_bank[1]),
	.D4(k7ddrphy_dfi_p1_bank[1]),
	.D5(k7ddrphy_dfi_p2_bank[1]),
	.D6(k7ddrphy_dfi_p2_bank[1]),
	.D7(k7ddrphy_dfi_p3_bank[1]),
	.D8(k7ddrphy_dfi_p3_bank[1]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq18)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_19 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_pads_ba[1]),
	.ODATAIN(k7ddrphy_oq18)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_20 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_bank[2]),
	.D2(k7ddrphy_dfi_p0_bank[2]),
	.D3(k7ddrphy_dfi_p1_bank[2]),
	.D4(k7ddrphy_dfi_p1_bank[2]),
	.D5(k7ddrphy_dfi_p2_bank[2]),
	.D6(k7ddrphy_dfi_p2_bank[2]),
	.D7(k7ddrphy_dfi_p3_bank[2]),
	.D8(k7ddrphy_dfi_p3_bank[2]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq19)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_20 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_pads_ba[2]),
	.ODATAIN(k7ddrphy_oq19)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_21 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_ras_n),
	.D2(k7ddrphy_dfi_p0_ras_n),
	.D3(k7ddrphy_dfi_p1_ras_n),
	.D4(k7ddrphy_dfi_p1_ras_n),
	.D5(k7ddrphy_dfi_p2_ras_n),
	.D6(k7ddrphy_dfi_p2_ras_n),
	.D7(k7ddrphy_dfi_p3_ras_n),
	.D8(k7ddrphy_dfi_p3_ras_n),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq20)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_21 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_ras_n),
	.ODATAIN(k7ddrphy_oq20)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_22 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_cas_n),
	.D2(k7ddrphy_dfi_p0_cas_n),
	.D3(k7ddrphy_dfi_p1_cas_n),
	.D4(k7ddrphy_dfi_p1_cas_n),
	.D5(k7ddrphy_dfi_p2_cas_n),
	.D6(k7ddrphy_dfi_p2_cas_n),
	.D7(k7ddrphy_dfi_p3_cas_n),
	.D8(k7ddrphy_dfi_p3_cas_n),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq21)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_22 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_cas_n),
	.ODATAIN(k7ddrphy_oq21)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_23 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_we_n),
	.D2(k7ddrphy_dfi_p0_we_n),
	.D3(k7ddrphy_dfi_p1_we_n),
	.D4(k7ddrphy_dfi_p1_we_n),
	.D5(k7ddrphy_dfi_p2_we_n),
	.D6(k7ddrphy_dfi_p2_we_n),
	.D7(k7ddrphy_dfi_p3_we_n),
	.D8(k7ddrphy_dfi_p3_we_n),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq22)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_23 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_we_n),
	.ODATAIN(k7ddrphy_oq22)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_24 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_cke),
	.D2(k7ddrphy_dfi_p0_cke),
	.D3(k7ddrphy_dfi_p1_cke),
	.D4(k7ddrphy_dfi_p1_cke),
	.D5(k7ddrphy_dfi_p2_cke),
	.D6(k7ddrphy_dfi_p2_cke),
	.D7(k7ddrphy_dfi_p3_cke),
	.D8(k7ddrphy_dfi_p3_cke),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq23)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_24 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_cke),
	.ODATAIN(k7ddrphy_oq23)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_25 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_dfi_p0_odt),
	.D2(k7ddrphy_dfi_p0_odt),
	.D3(k7ddrphy_dfi_p1_odt),
	.D4(k7ddrphy_dfi_p1_odt),
	.D5(k7ddrphy_dfi_p2_odt),
	.D6(k7ddrphy_dfi_p2_odt),
	.D7(k7ddrphy_dfi_p3_odt),
	.D8(k7ddrphy_dfi_p3_odt),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_oq24)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_25 (
	.C(sys_clk),
	.CE(k7ddrphy_cdly_inc_re),
	.INC(1'd1),
	.LD(((k7ddrphy_cdly_rst_re | k7ddrphy_rst_storage) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_odt),
	.ODATAIN(k7ddrphy_oq24)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_26 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip00[0]),
	.D2(k7ddrphy_bitslip00[1]),
	.D3(k7ddrphy_bitslip00[2]),
	.D4(k7ddrphy_bitslip00[3]),
	.D5(k7ddrphy_bitslip00[4]),
	.D6(k7ddrphy_bitslip00[5]),
	.D7(k7ddrphy_bitslip00[6]),
	.D8(k7ddrphy_bitslip00[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OFB(k7ddrphy_dqs_o_no_delay0),
	.OQ(k7ddrphy0),
	.TQ(k7ddrphy_dqs_t0)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(4'd8),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_26 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dqs_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dqs_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dqs_o_delayed0),
	.ODATAIN(k7ddrphy_dqs_o_no_delay0)
);

IOBUFDS IOBUFDS(
	.I(k7ddrphy_dqs_o_delayed0),
	.T(k7ddrphy_dqs_t0),
	.IO(ddram_dqs_p[0]),
	.IOB(ddram_dqs_n[0])
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_27 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip10[0]),
	.D2(k7ddrphy_bitslip10[1]),
	.D3(k7ddrphy_bitslip10[2]),
	.D4(k7ddrphy_bitslip10[3]),
	.D5(k7ddrphy_bitslip10[4]),
	.D6(k7ddrphy_bitslip10[5]),
	.D7(k7ddrphy_bitslip10[6]),
	.D8(k7ddrphy_bitslip10[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OFB(k7ddrphy_dqs_o_no_delay1),
	.OQ(k7ddrphy1),
	.TQ(k7ddrphy_dqs_t1)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(4'd8),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_27 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dqs_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dqs_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dqs_o_delayed1),
	.ODATAIN(k7ddrphy_dqs_o_no_delay1)
);

IOBUFDS IOBUFDS_1(
	.I(k7ddrphy_dqs_o_delayed1),
	.T(k7ddrphy_dqs_t1),
	.IO(ddram_dqs_p[1]),
	.IOB(ddram_dqs_n[1])
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_28 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip20[0]),
	.D2(k7ddrphy_bitslip20[1]),
	.D3(k7ddrphy_bitslip20[2]),
	.D4(k7ddrphy_bitslip20[3]),
	.D5(k7ddrphy_bitslip20[4]),
	.D6(k7ddrphy_bitslip20[5]),
	.D7(k7ddrphy_bitslip20[6]),
	.D8(k7ddrphy_bitslip20[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OFB(k7ddrphy_dqs_o_no_delay2),
	.OQ(k7ddrphy2),
	.TQ(k7ddrphy_dqs_t2)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(4'd8),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_28 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dqs_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dqs_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dqs_o_delayed2),
	.ODATAIN(k7ddrphy_dqs_o_no_delay2)
);

IOBUFDS IOBUFDS_2(
	.I(k7ddrphy_dqs_o_delayed2),
	.T(k7ddrphy_dqs_t2),
	.IO(ddram_dqs_p[2]),
	.IOB(ddram_dqs_n[2])
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_29 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip30[0]),
	.D2(k7ddrphy_bitslip30[1]),
	.D3(k7ddrphy_bitslip30[2]),
	.D4(k7ddrphy_bitslip30[3]),
	.D5(k7ddrphy_bitslip30[4]),
	.D6(k7ddrphy_bitslip30[5]),
	.D7(k7ddrphy_bitslip30[6]),
	.D8(k7ddrphy_bitslip30[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dqs_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OFB(k7ddrphy_dqs_o_no_delay3),
	.OQ(k7ddrphy3),
	.TQ(k7ddrphy_dqs_t3)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(4'd8),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_29 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dqs_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dqs_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dqs_o_delayed3),
	.ODATAIN(k7ddrphy_dqs_o_no_delay3)
);

IOBUFDS IOBUFDS_3(
	.I(k7ddrphy_dqs_o_delayed3),
	.T(k7ddrphy_dqs_t3),
	.IO(ddram_dqs_p[3]),
	.IOB(ddram_dqs_n[3])
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_30 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip01[0]),
	.D2(k7ddrphy_bitslip01[1]),
	.D3(k7ddrphy_bitslip01[2]),
	.D4(k7ddrphy_bitslip01[3]),
	.D5(k7ddrphy_bitslip01[4]),
	.D6(k7ddrphy_bitslip01[5]),
	.D7(k7ddrphy_bitslip01[6]),
	.D8(k7ddrphy_bitslip01[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_dm_o_nodelay0)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_30 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_dm[0]),
	.ODATAIN(k7ddrphy_dm_o_nodelay0)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_31 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip11[0]),
	.D2(k7ddrphy_bitslip11[1]),
	.D3(k7ddrphy_bitslip11[2]),
	.D4(k7ddrphy_bitslip11[3]),
	.D5(k7ddrphy_bitslip11[4]),
	.D6(k7ddrphy_bitslip11[5]),
	.D7(k7ddrphy_bitslip11[6]),
	.D8(k7ddrphy_bitslip11[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_dm_o_nodelay1)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_31 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_dm[1]),
	.ODATAIN(k7ddrphy_dm_o_nodelay1)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_32 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip21[0]),
	.D2(k7ddrphy_bitslip21[1]),
	.D3(k7ddrphy_bitslip21[2]),
	.D4(k7ddrphy_bitslip21[3]),
	.D5(k7ddrphy_bitslip21[4]),
	.D6(k7ddrphy_bitslip21[5]),
	.D7(k7ddrphy_bitslip21[6]),
	.D8(k7ddrphy_bitslip21[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_dm_o_nodelay2)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_32 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_dm[2]),
	.ODATAIN(k7ddrphy_dm_o_nodelay2)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_33 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip31[0]),
	.D2(k7ddrphy_bitslip31[1]),
	.D3(k7ddrphy_bitslip31[2]),
	.D4(k7ddrphy_bitslip31[3]),
	.D5(k7ddrphy_bitslip31[4]),
	.D6(k7ddrphy_bitslip31[5]),
	.D7(k7ddrphy_bitslip31[6]),
	.D8(k7ddrphy_bitslip31[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.OQ(k7ddrphy_dm_o_nodelay3)
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_33 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(ddram_dm[3]),
	.ODATAIN(k7ddrphy_dm_o_nodelay3)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_34 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip02[0]),
	.D2(k7ddrphy_bitslip02[1]),
	.D3(k7ddrphy_bitslip02[2]),
	.D4(k7ddrphy_bitslip02[3]),
	.D5(k7ddrphy_bitslip02[4]),
	.D6(k7ddrphy_bitslip02[5]),
	.D7(k7ddrphy_bitslip02[6]),
	.D8(k7ddrphy_bitslip02[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay0),
	.TQ(k7ddrphy_dq_t0)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed0),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip03[7]),
	.Q2(k7ddrphy_bitslip03[6]),
	.Q3(k7ddrphy_bitslip03[5]),
	.Q4(k7ddrphy_bitslip03[4]),
	.Q5(k7ddrphy_bitslip03[3]),
	.Q6(k7ddrphy_bitslip03[2]),
	.Q7(k7ddrphy_bitslip03[1]),
	.Q8(k7ddrphy_bitslip03[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_34 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed0),
	.ODATAIN(k7ddrphy_dq_o_nodelay0)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay0),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed0)
);

IOBUF IOBUF(
	.I(k7ddrphy_dq_o_delayed0),
	.T(k7ddrphy_dq_t0),
	.IO(ddram_dq[0]),
	.O(k7ddrphy_dq_i_nodelay0)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_35 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip12[0]),
	.D2(k7ddrphy_bitslip12[1]),
	.D3(k7ddrphy_bitslip12[2]),
	.D4(k7ddrphy_bitslip12[3]),
	.D5(k7ddrphy_bitslip12[4]),
	.D6(k7ddrphy_bitslip12[5]),
	.D7(k7ddrphy_bitslip12[6]),
	.D8(k7ddrphy_bitslip12[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay1),
	.TQ(k7ddrphy_dq_t1)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_1 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip13[7]),
	.Q2(k7ddrphy_bitslip13[6]),
	.Q3(k7ddrphy_bitslip13[5]),
	.Q4(k7ddrphy_bitslip13[4]),
	.Q5(k7ddrphy_bitslip13[3]),
	.Q6(k7ddrphy_bitslip13[2]),
	.Q7(k7ddrphy_bitslip13[1]),
	.Q8(k7ddrphy_bitslip13[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_35 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed1),
	.ODATAIN(k7ddrphy_dq_o_nodelay1)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_1 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay1),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed1)
);

IOBUF IOBUF_1(
	.I(k7ddrphy_dq_o_delayed1),
	.T(k7ddrphy_dq_t1),
	.IO(ddram_dq[1]),
	.O(k7ddrphy_dq_i_nodelay1)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_36 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip22[0]),
	.D2(k7ddrphy_bitslip22[1]),
	.D3(k7ddrphy_bitslip22[2]),
	.D4(k7ddrphy_bitslip22[3]),
	.D5(k7ddrphy_bitslip22[4]),
	.D6(k7ddrphy_bitslip22[5]),
	.D7(k7ddrphy_bitslip22[6]),
	.D8(k7ddrphy_bitslip22[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay2),
	.TQ(k7ddrphy_dq_t2)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_2 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed2),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip23[7]),
	.Q2(k7ddrphy_bitslip23[6]),
	.Q3(k7ddrphy_bitslip23[5]),
	.Q4(k7ddrphy_bitslip23[4]),
	.Q5(k7ddrphy_bitslip23[3]),
	.Q6(k7ddrphy_bitslip23[2]),
	.Q7(k7ddrphy_bitslip23[1]),
	.Q8(k7ddrphy_bitslip23[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_36 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed2),
	.ODATAIN(k7ddrphy_dq_o_nodelay2)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_2 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay2),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed2)
);

IOBUF IOBUF_2(
	.I(k7ddrphy_dq_o_delayed2),
	.T(k7ddrphy_dq_t2),
	.IO(ddram_dq[2]),
	.O(k7ddrphy_dq_i_nodelay2)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_37 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip32[0]),
	.D2(k7ddrphy_bitslip32[1]),
	.D3(k7ddrphy_bitslip32[2]),
	.D4(k7ddrphy_bitslip32[3]),
	.D5(k7ddrphy_bitslip32[4]),
	.D6(k7ddrphy_bitslip32[5]),
	.D7(k7ddrphy_bitslip32[6]),
	.D8(k7ddrphy_bitslip32[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay3),
	.TQ(k7ddrphy_dq_t3)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_3 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed3),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip33[7]),
	.Q2(k7ddrphy_bitslip33[6]),
	.Q3(k7ddrphy_bitslip33[5]),
	.Q4(k7ddrphy_bitslip33[4]),
	.Q5(k7ddrphy_bitslip33[3]),
	.Q6(k7ddrphy_bitslip33[2]),
	.Q7(k7ddrphy_bitslip33[1]),
	.Q8(k7ddrphy_bitslip33[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_37 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed3),
	.ODATAIN(k7ddrphy_dq_o_nodelay3)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_3 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay3),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed3)
);

IOBUF IOBUF_3(
	.I(k7ddrphy_dq_o_delayed3),
	.T(k7ddrphy_dq_t3),
	.IO(ddram_dq[3]),
	.O(k7ddrphy_dq_i_nodelay3)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_38 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip40[0]),
	.D2(k7ddrphy_bitslip40[1]),
	.D3(k7ddrphy_bitslip40[2]),
	.D4(k7ddrphy_bitslip40[3]),
	.D5(k7ddrphy_bitslip40[4]),
	.D6(k7ddrphy_bitslip40[5]),
	.D7(k7ddrphy_bitslip40[6]),
	.D8(k7ddrphy_bitslip40[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay4),
	.TQ(k7ddrphy_dq_t4)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_4 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed4),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip41[7]),
	.Q2(k7ddrphy_bitslip41[6]),
	.Q3(k7ddrphy_bitslip41[5]),
	.Q4(k7ddrphy_bitslip41[4]),
	.Q5(k7ddrphy_bitslip41[3]),
	.Q6(k7ddrphy_bitslip41[2]),
	.Q7(k7ddrphy_bitslip41[1]),
	.Q8(k7ddrphy_bitslip41[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_38 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed4),
	.ODATAIN(k7ddrphy_dq_o_nodelay4)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_4 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay4),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed4)
);

IOBUF IOBUF_4(
	.I(k7ddrphy_dq_o_delayed4),
	.T(k7ddrphy_dq_t4),
	.IO(ddram_dq[4]),
	.O(k7ddrphy_dq_i_nodelay4)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_39 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip50[0]),
	.D2(k7ddrphy_bitslip50[1]),
	.D3(k7ddrphy_bitslip50[2]),
	.D4(k7ddrphy_bitslip50[3]),
	.D5(k7ddrphy_bitslip50[4]),
	.D6(k7ddrphy_bitslip50[5]),
	.D7(k7ddrphy_bitslip50[6]),
	.D8(k7ddrphy_bitslip50[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay5),
	.TQ(k7ddrphy_dq_t5)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_5 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed5),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip51[7]),
	.Q2(k7ddrphy_bitslip51[6]),
	.Q3(k7ddrphy_bitslip51[5]),
	.Q4(k7ddrphy_bitslip51[4]),
	.Q5(k7ddrphy_bitslip51[3]),
	.Q6(k7ddrphy_bitslip51[2]),
	.Q7(k7ddrphy_bitslip51[1]),
	.Q8(k7ddrphy_bitslip51[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_39 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed5),
	.ODATAIN(k7ddrphy_dq_o_nodelay5)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_5 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay5),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed5)
);

IOBUF IOBUF_5(
	.I(k7ddrphy_dq_o_delayed5),
	.T(k7ddrphy_dq_t5),
	.IO(ddram_dq[5]),
	.O(k7ddrphy_dq_i_nodelay5)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_40 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip60[0]),
	.D2(k7ddrphy_bitslip60[1]),
	.D3(k7ddrphy_bitslip60[2]),
	.D4(k7ddrphy_bitslip60[3]),
	.D5(k7ddrphy_bitslip60[4]),
	.D6(k7ddrphy_bitslip60[5]),
	.D7(k7ddrphy_bitslip60[6]),
	.D8(k7ddrphy_bitslip60[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay6),
	.TQ(k7ddrphy_dq_t6)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_6 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed6),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip61[7]),
	.Q2(k7ddrphy_bitslip61[6]),
	.Q3(k7ddrphy_bitslip61[5]),
	.Q4(k7ddrphy_bitslip61[4]),
	.Q5(k7ddrphy_bitslip61[3]),
	.Q6(k7ddrphy_bitslip61[2]),
	.Q7(k7ddrphy_bitslip61[1]),
	.Q8(k7ddrphy_bitslip61[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_40 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed6),
	.ODATAIN(k7ddrphy_dq_o_nodelay6)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_6 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay6),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed6)
);

IOBUF IOBUF_6(
	.I(k7ddrphy_dq_o_delayed6),
	.T(k7ddrphy_dq_t6),
	.IO(ddram_dq[6]),
	.O(k7ddrphy_dq_i_nodelay6)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_41 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip70[0]),
	.D2(k7ddrphy_bitslip70[1]),
	.D3(k7ddrphy_bitslip70[2]),
	.D4(k7ddrphy_bitslip70[3]),
	.D5(k7ddrphy_bitslip70[4]),
	.D6(k7ddrphy_bitslip70[5]),
	.D7(k7ddrphy_bitslip70[6]),
	.D8(k7ddrphy_bitslip70[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay7),
	.TQ(k7ddrphy_dq_t7)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_7 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed7),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip71[7]),
	.Q2(k7ddrphy_bitslip71[6]),
	.Q3(k7ddrphy_bitslip71[5]),
	.Q4(k7ddrphy_bitslip71[4]),
	.Q5(k7ddrphy_bitslip71[3]),
	.Q6(k7ddrphy_bitslip71[2]),
	.Q7(k7ddrphy_bitslip71[1]),
	.Q8(k7ddrphy_bitslip71[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_41 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed7),
	.ODATAIN(k7ddrphy_dq_o_nodelay7)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_7 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay7),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[0] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed7)
);

IOBUF IOBUF_7(
	.I(k7ddrphy_dq_o_delayed7),
	.T(k7ddrphy_dq_t7),
	.IO(ddram_dq[7]),
	.O(k7ddrphy_dq_i_nodelay7)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_42 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip80[0]),
	.D2(k7ddrphy_bitslip80[1]),
	.D3(k7ddrphy_bitslip80[2]),
	.D4(k7ddrphy_bitslip80[3]),
	.D5(k7ddrphy_bitslip80[4]),
	.D6(k7ddrphy_bitslip80[5]),
	.D7(k7ddrphy_bitslip80[6]),
	.D8(k7ddrphy_bitslip80[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay8),
	.TQ(k7ddrphy_dq_t8)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_8 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed8),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip81[7]),
	.Q2(k7ddrphy_bitslip81[6]),
	.Q3(k7ddrphy_bitslip81[5]),
	.Q4(k7ddrphy_bitslip81[4]),
	.Q5(k7ddrphy_bitslip81[3]),
	.Q6(k7ddrphy_bitslip81[2]),
	.Q7(k7ddrphy_bitslip81[1]),
	.Q8(k7ddrphy_bitslip81[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_42 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed8),
	.ODATAIN(k7ddrphy_dq_o_nodelay8)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_8 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay8),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed8)
);

IOBUF IOBUF_8(
	.I(k7ddrphy_dq_o_delayed8),
	.T(k7ddrphy_dq_t8),
	.IO(ddram_dq[8]),
	.O(k7ddrphy_dq_i_nodelay8)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_43 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip90[0]),
	.D2(k7ddrphy_bitslip90[1]),
	.D3(k7ddrphy_bitslip90[2]),
	.D4(k7ddrphy_bitslip90[3]),
	.D5(k7ddrphy_bitslip90[4]),
	.D6(k7ddrphy_bitslip90[5]),
	.D7(k7ddrphy_bitslip90[6]),
	.D8(k7ddrphy_bitslip90[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay9),
	.TQ(k7ddrphy_dq_t9)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_9 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed9),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip91[7]),
	.Q2(k7ddrphy_bitslip91[6]),
	.Q3(k7ddrphy_bitslip91[5]),
	.Q4(k7ddrphy_bitslip91[4]),
	.Q5(k7ddrphy_bitslip91[3]),
	.Q6(k7ddrphy_bitslip91[2]),
	.Q7(k7ddrphy_bitslip91[1]),
	.Q8(k7ddrphy_bitslip91[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_43 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed9),
	.ODATAIN(k7ddrphy_dq_o_nodelay9)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_9 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay9),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed9)
);

IOBUF IOBUF_9(
	.I(k7ddrphy_dq_o_delayed9),
	.T(k7ddrphy_dq_t9),
	.IO(ddram_dq[9]),
	.O(k7ddrphy_dq_i_nodelay9)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_44 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip100[0]),
	.D2(k7ddrphy_bitslip100[1]),
	.D3(k7ddrphy_bitslip100[2]),
	.D4(k7ddrphy_bitslip100[3]),
	.D5(k7ddrphy_bitslip100[4]),
	.D6(k7ddrphy_bitslip100[5]),
	.D7(k7ddrphy_bitslip100[6]),
	.D8(k7ddrphy_bitslip100[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay10),
	.TQ(k7ddrphy_dq_t10)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_10 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed10),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip101[7]),
	.Q2(k7ddrphy_bitslip101[6]),
	.Q3(k7ddrphy_bitslip101[5]),
	.Q4(k7ddrphy_bitslip101[4]),
	.Q5(k7ddrphy_bitslip101[3]),
	.Q6(k7ddrphy_bitslip101[2]),
	.Q7(k7ddrphy_bitslip101[1]),
	.Q8(k7ddrphy_bitslip101[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_44 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed10),
	.ODATAIN(k7ddrphy_dq_o_nodelay10)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_10 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay10),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed10)
);

IOBUF IOBUF_10(
	.I(k7ddrphy_dq_o_delayed10),
	.T(k7ddrphy_dq_t10),
	.IO(ddram_dq[10]),
	.O(k7ddrphy_dq_i_nodelay10)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_45 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip110[0]),
	.D2(k7ddrphy_bitslip110[1]),
	.D3(k7ddrphy_bitslip110[2]),
	.D4(k7ddrphy_bitslip110[3]),
	.D5(k7ddrphy_bitslip110[4]),
	.D6(k7ddrphy_bitslip110[5]),
	.D7(k7ddrphy_bitslip110[6]),
	.D8(k7ddrphy_bitslip110[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay11),
	.TQ(k7ddrphy_dq_t11)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_11 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed11),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip111[7]),
	.Q2(k7ddrphy_bitslip111[6]),
	.Q3(k7ddrphy_bitslip111[5]),
	.Q4(k7ddrphy_bitslip111[4]),
	.Q5(k7ddrphy_bitslip111[3]),
	.Q6(k7ddrphy_bitslip111[2]),
	.Q7(k7ddrphy_bitslip111[1]),
	.Q8(k7ddrphy_bitslip111[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_45 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed11),
	.ODATAIN(k7ddrphy_dq_o_nodelay11)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_11 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay11),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed11)
);

IOBUF IOBUF_11(
	.I(k7ddrphy_dq_o_delayed11),
	.T(k7ddrphy_dq_t11),
	.IO(ddram_dq[11]),
	.O(k7ddrphy_dq_i_nodelay11)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_46 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip120[0]),
	.D2(k7ddrphy_bitslip120[1]),
	.D3(k7ddrphy_bitslip120[2]),
	.D4(k7ddrphy_bitslip120[3]),
	.D5(k7ddrphy_bitslip120[4]),
	.D6(k7ddrphy_bitslip120[5]),
	.D7(k7ddrphy_bitslip120[6]),
	.D8(k7ddrphy_bitslip120[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay12),
	.TQ(k7ddrphy_dq_t12)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_12 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed12),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip121[7]),
	.Q2(k7ddrphy_bitslip121[6]),
	.Q3(k7ddrphy_bitslip121[5]),
	.Q4(k7ddrphy_bitslip121[4]),
	.Q5(k7ddrphy_bitslip121[3]),
	.Q6(k7ddrphy_bitslip121[2]),
	.Q7(k7ddrphy_bitslip121[1]),
	.Q8(k7ddrphy_bitslip121[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_46 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed12),
	.ODATAIN(k7ddrphy_dq_o_nodelay12)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_12 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay12),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed12)
);

IOBUF IOBUF_12(
	.I(k7ddrphy_dq_o_delayed12),
	.T(k7ddrphy_dq_t12),
	.IO(ddram_dq[12]),
	.O(k7ddrphy_dq_i_nodelay12)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_47 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip130[0]),
	.D2(k7ddrphy_bitslip130[1]),
	.D3(k7ddrphy_bitslip130[2]),
	.D4(k7ddrphy_bitslip130[3]),
	.D5(k7ddrphy_bitslip130[4]),
	.D6(k7ddrphy_bitslip130[5]),
	.D7(k7ddrphy_bitslip130[6]),
	.D8(k7ddrphy_bitslip130[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay13),
	.TQ(k7ddrphy_dq_t13)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_13 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed13),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip131[7]),
	.Q2(k7ddrphy_bitslip131[6]),
	.Q3(k7ddrphy_bitslip131[5]),
	.Q4(k7ddrphy_bitslip131[4]),
	.Q5(k7ddrphy_bitslip131[3]),
	.Q6(k7ddrphy_bitslip131[2]),
	.Q7(k7ddrphy_bitslip131[1]),
	.Q8(k7ddrphy_bitslip131[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_47 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed13),
	.ODATAIN(k7ddrphy_dq_o_nodelay13)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_13 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay13),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed13)
);

IOBUF IOBUF_13(
	.I(k7ddrphy_dq_o_delayed13),
	.T(k7ddrphy_dq_t13),
	.IO(ddram_dq[13]),
	.O(k7ddrphy_dq_i_nodelay13)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_48 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip140[0]),
	.D2(k7ddrphy_bitslip140[1]),
	.D3(k7ddrphy_bitslip140[2]),
	.D4(k7ddrphy_bitslip140[3]),
	.D5(k7ddrphy_bitslip140[4]),
	.D6(k7ddrphy_bitslip140[5]),
	.D7(k7ddrphy_bitslip140[6]),
	.D8(k7ddrphy_bitslip140[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay14),
	.TQ(k7ddrphy_dq_t14)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_14 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed14),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip141[7]),
	.Q2(k7ddrphy_bitslip141[6]),
	.Q3(k7ddrphy_bitslip141[5]),
	.Q4(k7ddrphy_bitslip141[4]),
	.Q5(k7ddrphy_bitslip141[3]),
	.Q6(k7ddrphy_bitslip141[2]),
	.Q7(k7ddrphy_bitslip141[1]),
	.Q8(k7ddrphy_bitslip141[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_48 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed14),
	.ODATAIN(k7ddrphy_dq_o_nodelay14)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_14 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay14),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed14)
);

IOBUF IOBUF_14(
	.I(k7ddrphy_dq_o_delayed14),
	.T(k7ddrphy_dq_t14),
	.IO(ddram_dq[14]),
	.O(k7ddrphy_dq_i_nodelay14)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_49 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip150[0]),
	.D2(k7ddrphy_bitslip150[1]),
	.D3(k7ddrphy_bitslip150[2]),
	.D4(k7ddrphy_bitslip150[3]),
	.D5(k7ddrphy_bitslip150[4]),
	.D6(k7ddrphy_bitslip150[5]),
	.D7(k7ddrphy_bitslip150[6]),
	.D8(k7ddrphy_bitslip150[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay15),
	.TQ(k7ddrphy_dq_t15)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_15 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed15),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip151[7]),
	.Q2(k7ddrphy_bitslip151[6]),
	.Q3(k7ddrphy_bitslip151[5]),
	.Q4(k7ddrphy_bitslip151[4]),
	.Q5(k7ddrphy_bitslip151[3]),
	.Q6(k7ddrphy_bitslip151[2]),
	.Q7(k7ddrphy_bitslip151[1]),
	.Q8(k7ddrphy_bitslip151[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_49 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed15),
	.ODATAIN(k7ddrphy_dq_o_nodelay15)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_15 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay15),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[1] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed15)
);

IOBUF IOBUF_15(
	.I(k7ddrphy_dq_o_delayed15),
	.T(k7ddrphy_dq_t15),
	.IO(ddram_dq[15]),
	.O(k7ddrphy_dq_i_nodelay15)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_50 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip160[0]),
	.D2(k7ddrphy_bitslip160[1]),
	.D3(k7ddrphy_bitslip160[2]),
	.D4(k7ddrphy_bitslip160[3]),
	.D5(k7ddrphy_bitslip160[4]),
	.D6(k7ddrphy_bitslip160[5]),
	.D7(k7ddrphy_bitslip160[6]),
	.D8(k7ddrphy_bitslip160[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay16),
	.TQ(k7ddrphy_dq_t16)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_16 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed16),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip161[7]),
	.Q2(k7ddrphy_bitslip161[6]),
	.Q3(k7ddrphy_bitslip161[5]),
	.Q4(k7ddrphy_bitslip161[4]),
	.Q5(k7ddrphy_bitslip161[3]),
	.Q6(k7ddrphy_bitslip161[2]),
	.Q7(k7ddrphy_bitslip161[1]),
	.Q8(k7ddrphy_bitslip161[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_50 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed16),
	.ODATAIN(k7ddrphy_dq_o_nodelay16)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_16 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay16),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed16)
);

IOBUF IOBUF_16(
	.I(k7ddrphy_dq_o_delayed16),
	.T(k7ddrphy_dq_t16),
	.IO(ddram_dq[16]),
	.O(k7ddrphy_dq_i_nodelay16)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_51 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip170[0]),
	.D2(k7ddrphy_bitslip170[1]),
	.D3(k7ddrphy_bitslip170[2]),
	.D4(k7ddrphy_bitslip170[3]),
	.D5(k7ddrphy_bitslip170[4]),
	.D6(k7ddrphy_bitslip170[5]),
	.D7(k7ddrphy_bitslip170[6]),
	.D8(k7ddrphy_bitslip170[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay17),
	.TQ(k7ddrphy_dq_t17)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_17 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed17),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip171[7]),
	.Q2(k7ddrphy_bitslip171[6]),
	.Q3(k7ddrphy_bitslip171[5]),
	.Q4(k7ddrphy_bitslip171[4]),
	.Q5(k7ddrphy_bitslip171[3]),
	.Q6(k7ddrphy_bitslip171[2]),
	.Q7(k7ddrphy_bitslip171[1]),
	.Q8(k7ddrphy_bitslip171[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_51 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed17),
	.ODATAIN(k7ddrphy_dq_o_nodelay17)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_17 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay17),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed17)
);

IOBUF IOBUF_17(
	.I(k7ddrphy_dq_o_delayed17),
	.T(k7ddrphy_dq_t17),
	.IO(ddram_dq[17]),
	.O(k7ddrphy_dq_i_nodelay17)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_52 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip180[0]),
	.D2(k7ddrphy_bitslip180[1]),
	.D3(k7ddrphy_bitslip180[2]),
	.D4(k7ddrphy_bitslip180[3]),
	.D5(k7ddrphy_bitslip180[4]),
	.D6(k7ddrphy_bitslip180[5]),
	.D7(k7ddrphy_bitslip180[6]),
	.D8(k7ddrphy_bitslip180[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay18),
	.TQ(k7ddrphy_dq_t18)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_18 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed18),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip181[7]),
	.Q2(k7ddrphy_bitslip181[6]),
	.Q3(k7ddrphy_bitslip181[5]),
	.Q4(k7ddrphy_bitslip181[4]),
	.Q5(k7ddrphy_bitslip181[3]),
	.Q6(k7ddrphy_bitslip181[2]),
	.Q7(k7ddrphy_bitslip181[1]),
	.Q8(k7ddrphy_bitslip181[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_52 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed18),
	.ODATAIN(k7ddrphy_dq_o_nodelay18)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_18 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay18),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed18)
);

IOBUF IOBUF_18(
	.I(k7ddrphy_dq_o_delayed18),
	.T(k7ddrphy_dq_t18),
	.IO(ddram_dq[18]),
	.O(k7ddrphy_dq_i_nodelay18)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_53 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip190[0]),
	.D2(k7ddrphy_bitslip190[1]),
	.D3(k7ddrphy_bitslip190[2]),
	.D4(k7ddrphy_bitslip190[3]),
	.D5(k7ddrphy_bitslip190[4]),
	.D6(k7ddrphy_bitslip190[5]),
	.D7(k7ddrphy_bitslip190[6]),
	.D8(k7ddrphy_bitslip190[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay19),
	.TQ(k7ddrphy_dq_t19)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_19 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed19),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip191[7]),
	.Q2(k7ddrphy_bitslip191[6]),
	.Q3(k7ddrphy_bitslip191[5]),
	.Q4(k7ddrphy_bitslip191[4]),
	.Q5(k7ddrphy_bitslip191[3]),
	.Q6(k7ddrphy_bitslip191[2]),
	.Q7(k7ddrphy_bitslip191[1]),
	.Q8(k7ddrphy_bitslip191[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_53 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed19),
	.ODATAIN(k7ddrphy_dq_o_nodelay19)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_19 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay19),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed19)
);

IOBUF IOBUF_19(
	.I(k7ddrphy_dq_o_delayed19),
	.T(k7ddrphy_dq_t19),
	.IO(ddram_dq[19]),
	.O(k7ddrphy_dq_i_nodelay19)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_54 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip200[0]),
	.D2(k7ddrphy_bitslip200[1]),
	.D3(k7ddrphy_bitslip200[2]),
	.D4(k7ddrphy_bitslip200[3]),
	.D5(k7ddrphy_bitslip200[4]),
	.D6(k7ddrphy_bitslip200[5]),
	.D7(k7ddrphy_bitslip200[6]),
	.D8(k7ddrphy_bitslip200[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay20),
	.TQ(k7ddrphy_dq_t20)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_20 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed20),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip201[7]),
	.Q2(k7ddrphy_bitslip201[6]),
	.Q3(k7ddrphy_bitslip201[5]),
	.Q4(k7ddrphy_bitslip201[4]),
	.Q5(k7ddrphy_bitslip201[3]),
	.Q6(k7ddrphy_bitslip201[2]),
	.Q7(k7ddrphy_bitslip201[1]),
	.Q8(k7ddrphy_bitslip201[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_54 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed20),
	.ODATAIN(k7ddrphy_dq_o_nodelay20)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_20 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay20),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed20)
);

IOBUF IOBUF_20(
	.I(k7ddrphy_dq_o_delayed20),
	.T(k7ddrphy_dq_t20),
	.IO(ddram_dq[20]),
	.O(k7ddrphy_dq_i_nodelay20)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_55 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip210[0]),
	.D2(k7ddrphy_bitslip210[1]),
	.D3(k7ddrphy_bitslip210[2]),
	.D4(k7ddrphy_bitslip210[3]),
	.D5(k7ddrphy_bitslip210[4]),
	.D6(k7ddrphy_bitslip210[5]),
	.D7(k7ddrphy_bitslip210[6]),
	.D8(k7ddrphy_bitslip210[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay21),
	.TQ(k7ddrphy_dq_t21)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_21 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed21),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip211[7]),
	.Q2(k7ddrphy_bitslip211[6]),
	.Q3(k7ddrphy_bitslip211[5]),
	.Q4(k7ddrphy_bitslip211[4]),
	.Q5(k7ddrphy_bitslip211[3]),
	.Q6(k7ddrphy_bitslip211[2]),
	.Q7(k7ddrphy_bitslip211[1]),
	.Q8(k7ddrphy_bitslip211[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_55 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed21),
	.ODATAIN(k7ddrphy_dq_o_nodelay21)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_21 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay21),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed21)
);

IOBUF IOBUF_21(
	.I(k7ddrphy_dq_o_delayed21),
	.T(k7ddrphy_dq_t21),
	.IO(ddram_dq[21]),
	.O(k7ddrphy_dq_i_nodelay21)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_56 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip220[0]),
	.D2(k7ddrphy_bitslip220[1]),
	.D3(k7ddrphy_bitslip220[2]),
	.D4(k7ddrphy_bitslip220[3]),
	.D5(k7ddrphy_bitslip220[4]),
	.D6(k7ddrphy_bitslip220[5]),
	.D7(k7ddrphy_bitslip220[6]),
	.D8(k7ddrphy_bitslip220[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay22),
	.TQ(k7ddrphy_dq_t22)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_22 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed22),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip221[7]),
	.Q2(k7ddrphy_bitslip221[6]),
	.Q3(k7ddrphy_bitslip221[5]),
	.Q4(k7ddrphy_bitslip221[4]),
	.Q5(k7ddrphy_bitslip221[3]),
	.Q6(k7ddrphy_bitslip221[2]),
	.Q7(k7ddrphy_bitslip221[1]),
	.Q8(k7ddrphy_bitslip221[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_56 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed22),
	.ODATAIN(k7ddrphy_dq_o_nodelay22)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_22 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay22),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed22)
);

IOBUF IOBUF_22(
	.I(k7ddrphy_dq_o_delayed22),
	.T(k7ddrphy_dq_t22),
	.IO(ddram_dq[22]),
	.O(k7ddrphy_dq_i_nodelay22)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_57 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip230[0]),
	.D2(k7ddrphy_bitslip230[1]),
	.D3(k7ddrphy_bitslip230[2]),
	.D4(k7ddrphy_bitslip230[3]),
	.D5(k7ddrphy_bitslip230[4]),
	.D6(k7ddrphy_bitslip230[5]),
	.D7(k7ddrphy_bitslip230[6]),
	.D8(k7ddrphy_bitslip230[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay23),
	.TQ(k7ddrphy_dq_t23)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_23 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed23),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip231[7]),
	.Q2(k7ddrphy_bitslip231[6]),
	.Q3(k7ddrphy_bitslip231[5]),
	.Q4(k7ddrphy_bitslip231[4]),
	.Q5(k7ddrphy_bitslip231[3]),
	.Q6(k7ddrphy_bitslip231[2]),
	.Q7(k7ddrphy_bitslip231[1]),
	.Q8(k7ddrphy_bitslip231[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_57 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed23),
	.ODATAIN(k7ddrphy_dq_o_nodelay23)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_23 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay23),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[2] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed23)
);

IOBUF IOBUF_23(
	.I(k7ddrphy_dq_o_delayed23),
	.T(k7ddrphy_dq_t23),
	.IO(ddram_dq[23]),
	.O(k7ddrphy_dq_i_nodelay23)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_58 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip240[0]),
	.D2(k7ddrphy_bitslip240[1]),
	.D3(k7ddrphy_bitslip240[2]),
	.D4(k7ddrphy_bitslip240[3]),
	.D5(k7ddrphy_bitslip240[4]),
	.D6(k7ddrphy_bitslip240[5]),
	.D7(k7ddrphy_bitslip240[6]),
	.D8(k7ddrphy_bitslip240[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay24),
	.TQ(k7ddrphy_dq_t24)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_24 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed24),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip241[7]),
	.Q2(k7ddrphy_bitslip241[6]),
	.Q3(k7ddrphy_bitslip241[5]),
	.Q4(k7ddrphy_bitslip241[4]),
	.Q5(k7ddrphy_bitslip241[3]),
	.Q6(k7ddrphy_bitslip241[2]),
	.Q7(k7ddrphy_bitslip241[1]),
	.Q8(k7ddrphy_bitslip241[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_58 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed24),
	.ODATAIN(k7ddrphy_dq_o_nodelay24)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_24 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay24),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed24)
);

IOBUF IOBUF_24(
	.I(k7ddrphy_dq_o_delayed24),
	.T(k7ddrphy_dq_t24),
	.IO(ddram_dq[24]),
	.O(k7ddrphy_dq_i_nodelay24)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_59 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip250[0]),
	.D2(k7ddrphy_bitslip250[1]),
	.D3(k7ddrphy_bitslip250[2]),
	.D4(k7ddrphy_bitslip250[3]),
	.D5(k7ddrphy_bitslip250[4]),
	.D6(k7ddrphy_bitslip250[5]),
	.D7(k7ddrphy_bitslip250[6]),
	.D8(k7ddrphy_bitslip250[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay25),
	.TQ(k7ddrphy_dq_t25)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_25 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed25),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip251[7]),
	.Q2(k7ddrphy_bitslip251[6]),
	.Q3(k7ddrphy_bitslip251[5]),
	.Q4(k7ddrphy_bitslip251[4]),
	.Q5(k7ddrphy_bitslip251[3]),
	.Q6(k7ddrphy_bitslip251[2]),
	.Q7(k7ddrphy_bitslip251[1]),
	.Q8(k7ddrphy_bitslip251[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_59 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed25),
	.ODATAIN(k7ddrphy_dq_o_nodelay25)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_25 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay25),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed25)
);

IOBUF IOBUF_25(
	.I(k7ddrphy_dq_o_delayed25),
	.T(k7ddrphy_dq_t25),
	.IO(ddram_dq[25]),
	.O(k7ddrphy_dq_i_nodelay25)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_60 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip260[0]),
	.D2(k7ddrphy_bitslip260[1]),
	.D3(k7ddrphy_bitslip260[2]),
	.D4(k7ddrphy_bitslip260[3]),
	.D5(k7ddrphy_bitslip260[4]),
	.D6(k7ddrphy_bitslip260[5]),
	.D7(k7ddrphy_bitslip260[6]),
	.D8(k7ddrphy_bitslip260[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay26),
	.TQ(k7ddrphy_dq_t26)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_26 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed26),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip261[7]),
	.Q2(k7ddrphy_bitslip261[6]),
	.Q3(k7ddrphy_bitslip261[5]),
	.Q4(k7ddrphy_bitslip261[4]),
	.Q5(k7ddrphy_bitslip261[3]),
	.Q6(k7ddrphy_bitslip261[2]),
	.Q7(k7ddrphy_bitslip261[1]),
	.Q8(k7ddrphy_bitslip261[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_60 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed26),
	.ODATAIN(k7ddrphy_dq_o_nodelay26)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_26 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay26),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed26)
);

IOBUF IOBUF_26(
	.I(k7ddrphy_dq_o_delayed26),
	.T(k7ddrphy_dq_t26),
	.IO(ddram_dq[26]),
	.O(k7ddrphy_dq_i_nodelay26)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_61 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip270[0]),
	.D2(k7ddrphy_bitslip270[1]),
	.D3(k7ddrphy_bitslip270[2]),
	.D4(k7ddrphy_bitslip270[3]),
	.D5(k7ddrphy_bitslip270[4]),
	.D6(k7ddrphy_bitslip270[5]),
	.D7(k7ddrphy_bitslip270[6]),
	.D8(k7ddrphy_bitslip270[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay27),
	.TQ(k7ddrphy_dq_t27)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_27 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed27),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip271[7]),
	.Q2(k7ddrphy_bitslip271[6]),
	.Q3(k7ddrphy_bitslip271[5]),
	.Q4(k7ddrphy_bitslip271[4]),
	.Q5(k7ddrphy_bitslip271[3]),
	.Q6(k7ddrphy_bitslip271[2]),
	.Q7(k7ddrphy_bitslip271[1]),
	.Q8(k7ddrphy_bitslip271[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_61 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed27),
	.ODATAIN(k7ddrphy_dq_o_nodelay27)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_27 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay27),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed27)
);

IOBUF IOBUF_27(
	.I(k7ddrphy_dq_o_delayed27),
	.T(k7ddrphy_dq_t27),
	.IO(ddram_dq[27]),
	.O(k7ddrphy_dq_i_nodelay27)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_62 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip280[0]),
	.D2(k7ddrphy_bitslip280[1]),
	.D3(k7ddrphy_bitslip280[2]),
	.D4(k7ddrphy_bitslip280[3]),
	.D5(k7ddrphy_bitslip280[4]),
	.D6(k7ddrphy_bitslip280[5]),
	.D7(k7ddrphy_bitslip280[6]),
	.D8(k7ddrphy_bitslip280[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay28),
	.TQ(k7ddrphy_dq_t28)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_28 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed28),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip281[7]),
	.Q2(k7ddrphy_bitslip281[6]),
	.Q3(k7ddrphy_bitslip281[5]),
	.Q4(k7ddrphy_bitslip281[4]),
	.Q5(k7ddrphy_bitslip281[3]),
	.Q6(k7ddrphy_bitslip281[2]),
	.Q7(k7ddrphy_bitslip281[1]),
	.Q8(k7ddrphy_bitslip281[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_62 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed28),
	.ODATAIN(k7ddrphy_dq_o_nodelay28)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_28 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay28),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed28)
);

IOBUF IOBUF_28(
	.I(k7ddrphy_dq_o_delayed28),
	.T(k7ddrphy_dq_t28),
	.IO(ddram_dq[28]),
	.O(k7ddrphy_dq_i_nodelay28)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_63 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip290[0]),
	.D2(k7ddrphy_bitslip290[1]),
	.D3(k7ddrphy_bitslip290[2]),
	.D4(k7ddrphy_bitslip290[3]),
	.D5(k7ddrphy_bitslip290[4]),
	.D6(k7ddrphy_bitslip290[5]),
	.D7(k7ddrphy_bitslip290[6]),
	.D8(k7ddrphy_bitslip290[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay29),
	.TQ(k7ddrphy_dq_t29)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_29 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed29),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip291[7]),
	.Q2(k7ddrphy_bitslip291[6]),
	.Q3(k7ddrphy_bitslip291[5]),
	.Q4(k7ddrphy_bitslip291[4]),
	.Q5(k7ddrphy_bitslip291[3]),
	.Q6(k7ddrphy_bitslip291[2]),
	.Q7(k7ddrphy_bitslip291[1]),
	.Q8(k7ddrphy_bitslip291[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_63 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed29),
	.ODATAIN(k7ddrphy_dq_o_nodelay29)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_29 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay29),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed29)
);

IOBUF IOBUF_29(
	.I(k7ddrphy_dq_o_delayed29),
	.T(k7ddrphy_dq_t29),
	.IO(ddram_dq[29]),
	.O(k7ddrphy_dq_i_nodelay29)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_64 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip300[0]),
	.D2(k7ddrphy_bitslip300[1]),
	.D3(k7ddrphy_bitslip300[2]),
	.D4(k7ddrphy_bitslip300[3]),
	.D5(k7ddrphy_bitslip300[4]),
	.D6(k7ddrphy_bitslip300[5]),
	.D7(k7ddrphy_bitslip300[6]),
	.D8(k7ddrphy_bitslip300[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay30),
	.TQ(k7ddrphy_dq_t30)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_30 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed30),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip301[7]),
	.Q2(k7ddrphy_bitslip301[6]),
	.Q3(k7ddrphy_bitslip301[5]),
	.Q4(k7ddrphy_bitslip301[4]),
	.Q5(k7ddrphy_bitslip301[3]),
	.Q6(k7ddrphy_bitslip301[2]),
	.Q7(k7ddrphy_bitslip301[1]),
	.Q8(k7ddrphy_bitslip301[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_64 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed30),
	.ODATAIN(k7ddrphy_dq_o_nodelay30)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_30 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay30),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed30)
);

IOBUF IOBUF_30(
	.I(k7ddrphy_dq_o_delayed30),
	.T(k7ddrphy_dq_t30),
	.IO(ddram_dq[30]),
	.O(k7ddrphy_dq_i_nodelay30)
);

OSERDESE2 #(
	.DATA_RATE_OQ("DDR"),
	.DATA_RATE_TQ("BUF"),
	.DATA_WIDTH(4'd8),
	.SERDES_MODE("MASTER"),
	.TRISTATE_WIDTH(1'd1)
) OSERDESE2_65 (
	.CLK(sys4x_clk),
	.CLKDIV(sys_clk),
	.D1(k7ddrphy_bitslip310[0]),
	.D2(k7ddrphy_bitslip310[1]),
	.D3(k7ddrphy_bitslip310[2]),
	.D4(k7ddrphy_bitslip310[3]),
	.D5(k7ddrphy_bitslip310[4]),
	.D6(k7ddrphy_bitslip310[5]),
	.D7(k7ddrphy_bitslip310[6]),
	.D8(k7ddrphy_bitslip310[7]),
	.OCE(1'd1),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.T1((~k7ddrphy_dq_oe_delay_tappeddelayline_tappeddelayline1)),
	.TCE(1'd1),
	.OQ(k7ddrphy_dq_o_nodelay31),
	.TQ(k7ddrphy_dq_t31)
);

ISERDESE2 #(
	.DATA_RATE("DDR"),
	.DATA_WIDTH(4'd8),
	.INTERFACE_TYPE("NETWORKING"),
	.IOBDELAY("IFD"),
	.NUM_CE(1'd1),
	.SERDES_MODE("MASTER")
) ISERDESE2_31 (
	.BITSLIP(1'd0),
	.CE1(1'd1),
	.CLK(sys4x_clk),
	.CLKB((~sys4x_clk)),
	.CLKDIV(sys_clk),
	.DDLY(k7ddrphy_dq_i_delayed31),
	.RST((sys_rst | k7ddrphy_rst_storage)),
	.Q1(k7ddrphy_bitslip311[7]),
	.Q2(k7ddrphy_bitslip311[6]),
	.Q3(k7ddrphy_bitslip311[5]),
	.Q4(k7ddrphy_bitslip311[4]),
	.Q5(k7ddrphy_bitslip311[3]),
	.Q6(k7ddrphy_bitslip311[2]),
	.Q7(k7ddrphy_bitslip311[1]),
	.Q8(k7ddrphy_bitslip311[0])
);

ODELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("ODATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.ODELAY_TYPE("VARIABLE"),
	.ODELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) ODELAYE2_65 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_inc_re)),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_wdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_o_delayed31),
	.ODATAIN(k7ddrphy_dq_o_nodelay31)
);

IDELAYE2 #(
	.CINVCTRL_SEL("FALSE"),
	.DELAY_SRC("IDATAIN"),
	.HIGH_PERFORMANCE_MODE("TRUE"),
	.IDELAY_TYPE("VARIABLE"),
	.IDELAY_VALUE(1'd0),
	.PIPE_SEL("FALSE"),
	.REFCLK_FREQUENCY(200.0),
	.SIGNAL_PATTERN("DATA")
) IDELAYE2_31 (
	.C(sys_clk),
	.CE((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_inc_re)),
	.IDATAIN(k7ddrphy_dq_i_nodelay31),
	.INC(1'd1),
	.LD(((k7ddrphy_dly_sel_storage[3] & k7ddrphy_rdly_dq_rst_re) | k7ddrphy_rst_storage)),
	.LDPIPEEN(1'd0),
	.DATAOUT(k7ddrphy_dq_i_delayed31)
);

IOBUF IOBUF_31(
	.I(k7ddrphy_dq_o_delayed31),
	.T(k7ddrphy_dq_t31),
	.IO(ddram_dq[31]),
	.O(k7ddrphy_dq_i_nodelay31)
);

//------------------------------------------------------------------------------
// Memory storage: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage[0:15];
reg [24:0] storage_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine0_wrport_we)
		storage[litedramcore_bankmachine0_wrport_adr] <= litedramcore_bankmachine0_wrport_dat_w;
	storage_dat0 <= storage[litedramcore_bankmachine0_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine0_wrport_dat_r = storage_dat0;
assign litedramcore_bankmachine0_rdport_dat_r = storage[litedramcore_bankmachine0_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_1: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_1[0:15];
reg [24:0] storage_1_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine1_wrport_we)
		storage_1[litedramcore_bankmachine1_wrport_adr] <= litedramcore_bankmachine1_wrport_dat_w;
	storage_1_dat0 <= storage_1[litedramcore_bankmachine1_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine1_wrport_dat_r = storage_1_dat0;
assign litedramcore_bankmachine1_rdport_dat_r = storage_1[litedramcore_bankmachine1_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_2: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_2[0:15];
reg [24:0] storage_2_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine2_wrport_we)
		storage_2[litedramcore_bankmachine2_wrport_adr] <= litedramcore_bankmachine2_wrport_dat_w;
	storage_2_dat0 <= storage_2[litedramcore_bankmachine2_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine2_wrport_dat_r = storage_2_dat0;
assign litedramcore_bankmachine2_rdport_dat_r = storage_2[litedramcore_bankmachine2_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_3: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_3[0:15];
reg [24:0] storage_3_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine3_wrport_we)
		storage_3[litedramcore_bankmachine3_wrport_adr] <= litedramcore_bankmachine3_wrport_dat_w;
	storage_3_dat0 <= storage_3[litedramcore_bankmachine3_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine3_wrport_dat_r = storage_3_dat0;
assign litedramcore_bankmachine3_rdport_dat_r = storage_3[litedramcore_bankmachine3_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_4: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_4[0:15];
reg [24:0] storage_4_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine4_wrport_we)
		storage_4[litedramcore_bankmachine4_wrport_adr] <= litedramcore_bankmachine4_wrport_dat_w;
	storage_4_dat0 <= storage_4[litedramcore_bankmachine4_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine4_wrport_dat_r = storage_4_dat0;
assign litedramcore_bankmachine4_rdport_dat_r = storage_4[litedramcore_bankmachine4_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_5: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_5[0:15];
reg [24:0] storage_5_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine5_wrport_we)
		storage_5[litedramcore_bankmachine5_wrport_adr] <= litedramcore_bankmachine5_wrport_dat_w;
	storage_5_dat0 <= storage_5[litedramcore_bankmachine5_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine5_wrport_dat_r = storage_5_dat0;
assign litedramcore_bankmachine5_rdport_dat_r = storage_5[litedramcore_bankmachine5_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_6: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_6[0:15];
reg [24:0] storage_6_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine6_wrport_we)
		storage_6[litedramcore_bankmachine6_wrport_adr] <= litedramcore_bankmachine6_wrport_dat_w;
	storage_6_dat0 <= storage_6[litedramcore_bankmachine6_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine6_wrport_dat_r = storage_6_dat0;
assign litedramcore_bankmachine6_rdport_dat_r = storage_6[litedramcore_bankmachine6_rdport_adr];


//------------------------------------------------------------------------------
// Memory storage_7: 16-words x 25-bit
//------------------------------------------------------------------------------
// Port 0 | Read: Sync  | Write: Sync | Mode: Read-First  | Write-Granularity: 25 
// Port 1 | Read: Async | Write: ---- | 
reg [24:0] storage_7[0:15];
reg [24:0] storage_7_dat0;
always @(posedge sys_clk) begin
	if (litedramcore_bankmachine7_wrport_we)
		storage_7[litedramcore_bankmachine7_wrport_adr] <= litedramcore_bankmachine7_wrport_dat_w;
	storage_7_dat0 <= storage_7[litedramcore_bankmachine7_wrport_adr];
end
always @(posedge sys_clk) begin
end
assign litedramcore_bankmachine7_wrport_dat_r = storage_7_dat0;
assign litedramcore_bankmachine7_rdport_dat_r = storage_7[litedramcore_bankmachine7_rdport_adr];


FDCE FDCE(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(reset),
	.Q(litedramcore_reset0)
);

FDCE FDCE_1(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset0),
	.Q(litedramcore_reset1)
);

FDCE FDCE_2(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset1),
	.Q(litedramcore_reset2)
);

FDCE FDCE_3(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset2),
	.Q(litedramcore_reset3)
);

FDCE FDCE_4(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset3),
	.Q(litedramcore_reset4)
);

FDCE FDCE_5(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset4),
	.Q(litedramcore_reset5)
);

FDCE FDCE_6(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset5),
	.Q(litedramcore_reset6)
);

FDCE FDCE_7(
	.C(clkin),
	.CE(1'd1),
	.CLR(1'd0),
	.D(litedramcore_reset6),
	.Q(litedramcore_reset7)
);

PLLE2_ADV #(
	.CLKFBOUT_MULT(4'd8),
	.CLKIN1_PERIOD(5.0),
	.CLKOUT0_DIVIDE(4'd8),
	.CLKOUT0_PHASE(1'd0),
	.CLKOUT1_DIVIDE(5'd16),
	.CLKOUT1_PHASE(1'd0),
	.CLKOUT2_DIVIDE(3'd4),
	.CLKOUT2_PHASE(1'd0),
	.CLKOUT3_DIVIDE(3'd4),
	.CLKOUT3_PHASE(7'd90),
	.DIVCLK_DIVIDE(1'd1),
	.REF_JITTER1(0.01),
	.STARTUP_WAIT("FALSE")
) PLLE2_ADV (
	.CLKFBIN(litedramcore_pll_fb),
	.CLKIN1(clkin),
	.PWRDWN(power_down),
	.RST(litedramcore_reset7),
	.CLKFBOUT(litedramcore_pll_fb),
	.CLKOUT0(clkout0),
	.CLKOUT1(clkout1),
	.CLKOUT2(clkout2),
	.CLKOUT3(clkout3),
	.LOCKED(locked)
);

(* ars_ff1 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE (
	.C(iodelay_clk),
	.CE(1'd1),
	.D(1'd0),
	.PRE(xilinxasyncresetsynchronizerimpl0),
	.Q(xilinxasyncresetsynchronizerimpl0_rst_meta)
);

(* ars_ff2 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_1 (
	.C(iodelay_clk),
	.CE(1'd1),
	.D(xilinxasyncresetsynchronizerimpl0_rst_meta),
	.PRE(xilinxasyncresetsynchronizerimpl0),
	.Q(iodelay_rst)
);

(* ars_ff1 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_2 (
	.C(sys_clk),
	.CE(1'd1),
	.D(1'd0),
	.PRE(xilinxasyncresetsynchronizerimpl1),
	.Q(xilinxasyncresetsynchronizerimpl1_rst_meta)
);

(* ars_ff2 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_3 (
	.C(sys_clk),
	.CE(1'd1),
	.D(xilinxasyncresetsynchronizerimpl1_rst_meta),
	.PRE(xilinxasyncresetsynchronizerimpl1),
	.Q(sys_rst)
);

(* ars_ff1 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_4 (
	.C(sys4x_clk),
	.CE(1'd1),
	.D(1'd0),
	.PRE(xilinxasyncresetsynchronizerimpl2),
	.Q(xilinxasyncresetsynchronizerimpl2_rst_meta)
);

(* ars_ff2 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_5 (
	.C(sys4x_clk),
	.CE(1'd1),
	.D(xilinxasyncresetsynchronizerimpl2_rst_meta),
	.PRE(xilinxasyncresetsynchronizerimpl2),
	.Q(xilinxasyncresetsynchronizerimpl2_expr)
);

(* ars_ff1 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_6 (
	.C(sys4x_dqs_clk),
	.CE(1'd1),
	.D(1'd0),
	.PRE(xilinxasyncresetsynchronizerimpl3),
	.Q(xilinxasyncresetsynchronizerimpl3_rst_meta)
);

(* ars_ff2 = "true", async_reg = "true" *)
FDPE #(
	.INIT(1'd1)
) FDPE_7 (
	.C(sys4x_dqs_clk),
	.CE(1'd1),
	.D(xilinxasyncresetsynchronizerimpl3_rst_meta),
	.PRE(xilinxasyncresetsynchronizerimpl3),
	.Q(xilinxasyncresetsynchronizerimpl3_expr)
);

endmodule

// -----------------------------------------------------------------------------
//  Auto-Generated by LiteX on 2022-10-28 19:01:22.
//------------------------------------------------------------------------------
