// ed_synth.v

// Generated using ACDS version 21.3 170

`timescale 1 ps / 1 ps
module ed_synth (
		input  wire        emif_0_pll_ref_clk_clk,          // emif_0_pll_ref_clk.clk
		input  wire        emif_0_oct_oct_rzqin,            //         emif_0_oct.oct_rzqin
		output wire [0:0]  emif_0_mem_mem_ck,               //         emif_0_mem.mem_ck
		output wire [0:0]  emif_0_mem_mem_ck_n,             //                   .mem_ck_n
		output wire [9:0]  emif_0_mem_mem_a,                //                   .mem_a
		output wire [0:0]  emif_0_mem_mem_cke,              //                   .mem_cke
		output wire [0:0]  emif_0_mem_mem_cs_n,             //                   .mem_cs_n
		output wire [0:0]  emif_0_mem_mem_odt,              //                   .mem_odt
		inout  wire [3:0]  emif_0_mem_mem_dqs,              //                   .mem_dqs
		inout  wire [3:0]  emif_0_mem_mem_dqs_n,            //                   .mem_dqs_n
		inout  wire [31:0] emif_0_mem_mem_dq,               //                   .mem_dq
		output wire [3:0]  emif_0_mem_mem_dm,               //                   .mem_dm
		output wire        emif_0_status_local_cal_success, //      emif_0_status.local_cal_success
		output wire        emif_0_status_local_cal_fail,    //                   .local_cal_fail
		input  wire        global_reset_reset_n,            //       global_reset.reset_n
		output wire        emif_0_tg_0_traffic_gen_pass,    //        emif_0_tg_0.traffic_gen_pass
		output wire        emif_0_tg_0_traffic_gen_fail,    //                   .traffic_gen_fail
		output wire        emif_0_tg_0_traffic_gen_timeout  //                   .traffic_gen_timeout
	);

	wire          emif_0_emif_usr_clk_clk;                           // emif_0:emif_usr_clk -> [mm_interconnect_0:emif_0_emif_usr_clk_clk, rst_controller:clk, tg:emif_usr_clk]
	wire          emif_0_emif_usr_reset_n_reset;                     // emif_0:emif_usr_reset_n -> [rst_controller:reset_in0, tg:emif_usr_reset_n]
	wire          global_reset_n_splitter_sig_output_if_0_reset;     // global_reset_n_splitter:sig_output_0 -> emif_0:global_reset_n
	wire          tg_ctrl_amm_0_waitrequest;                         // mm_interconnect_0:tg_ctrl_amm_0_waitrequest -> tg:amm_ready_0
	wire  [255:0] tg_ctrl_amm_0_readdata;                            // mm_interconnect_0:tg_ctrl_amm_0_readdata -> tg:amm_readdata_0
	wire          tg_ctrl_amm_0_read;                                // tg:amm_read_0 -> mm_interconnect_0:tg_ctrl_amm_0_read
	wire   [29:0] tg_ctrl_amm_0_address;                             // tg:amm_address_0 -> mm_interconnect_0:tg_ctrl_amm_0_address
	wire   [31:0] tg_ctrl_amm_0_byteenable;                          // tg:amm_byteenable_0 -> mm_interconnect_0:tg_ctrl_amm_0_byteenable
	wire          tg_ctrl_amm_0_readdatavalid;                       // mm_interconnect_0:tg_ctrl_amm_0_readdatavalid -> tg:amm_readdatavalid_0
	wire          tg_ctrl_amm_0_write;                               // tg:amm_write_0 -> mm_interconnect_0:tg_ctrl_amm_0_write
	wire  [255:0] tg_ctrl_amm_0_writedata;                           // tg:amm_writedata_0 -> mm_interconnect_0:tg_ctrl_amm_0_writedata
	wire    [6:0] tg_ctrl_amm_0_burstcount;                          // tg:amm_burstcount_0 -> mm_interconnect_0:tg_ctrl_amm_0_burstcount
	wire  [255:0] mm_interconnect_0_emif_0_ctrl_amm_0_readdata;      // emif_0:amm_readdata_0 -> mm_interconnect_0:emif_0_ctrl_amm_0_readdata
	wire          mm_interconnect_0_emif_0_ctrl_amm_0_waitrequest;   // emif_0:amm_ready_0 -> mm_interconnect_0:emif_0_ctrl_amm_0_waitrequest
	wire   [24:0] mm_interconnect_0_emif_0_ctrl_amm_0_address;       // mm_interconnect_0:emif_0_ctrl_amm_0_address -> emif_0:amm_address_0
	wire          mm_interconnect_0_emif_0_ctrl_amm_0_read;          // mm_interconnect_0:emif_0_ctrl_amm_0_read -> emif_0:amm_read_0
	wire   [31:0] mm_interconnect_0_emif_0_ctrl_amm_0_byteenable;    // mm_interconnect_0:emif_0_ctrl_amm_0_byteenable -> emif_0:amm_byteenable_0
	wire          mm_interconnect_0_emif_0_ctrl_amm_0_readdatavalid; // emif_0:amm_readdatavalid_0 -> mm_interconnect_0:emif_0_ctrl_amm_0_readdatavalid
	wire          mm_interconnect_0_emif_0_ctrl_amm_0_write;         // mm_interconnect_0:emif_0_ctrl_amm_0_write -> emif_0:amm_write_0
	wire  [255:0] mm_interconnect_0_emif_0_ctrl_amm_0_writedata;     // mm_interconnect_0:emif_0_ctrl_amm_0_writedata -> emif_0:amm_writedata_0
	wire    [6:0] mm_interconnect_0_emif_0_ctrl_amm_0_burstcount;    // mm_interconnect_0:emif_0_ctrl_amm_0_burstcount -> emif_0:amm_burstcount_0
	wire          rst_controller_reset_out_reset;                    // rst_controller:reset_out -> mm_interconnect_0:tg_ctrl_amm_0_translator_reset_reset_bridge_in_reset_reset

	ed_synth_emif_0 emif_0 (
		.global_reset_n      (global_reset_n_splitter_sig_output_if_0_reset),     //   input,    width = 1,   global_reset_n.reset_n
		.pll_ref_clk         (emif_0_pll_ref_clk_clk),                            //   input,    width = 1,      pll_ref_clk.clk
		.oct_rzqin           (emif_0_oct_oct_rzqin),                              //   input,    width = 1,              oct.oct_rzqin
		.mem_ck              (emif_0_mem_mem_ck),                                 //  output,    width = 1,              mem.mem_ck
		.mem_ck_n            (emif_0_mem_mem_ck_n),                               //  output,    width = 1,                 .mem_ck_n
		.mem_a               (emif_0_mem_mem_a),                                  //  output,   width = 10,                 .mem_a
		.mem_cke             (emif_0_mem_mem_cke),                                //  output,    width = 1,                 .mem_cke
		.mem_cs_n            (emif_0_mem_mem_cs_n),                               //  output,    width = 1,                 .mem_cs_n
		.mem_odt             (emif_0_mem_mem_odt),                                //  output,    width = 1,                 .mem_odt
		.mem_dqs             (emif_0_mem_mem_dqs),                                //   inout,    width = 4,                 .mem_dqs
		.mem_dqs_n           (emif_0_mem_mem_dqs_n),                              //   inout,    width = 4,                 .mem_dqs_n
		.mem_dq              (emif_0_mem_mem_dq),                                 //   inout,   width = 32,                 .mem_dq
		.mem_dm              (emif_0_mem_mem_dm),                                 //  output,    width = 4,                 .mem_dm
		.local_cal_success   (emif_0_status_local_cal_success),                   //  output,    width = 1,           status.local_cal_success
		.local_cal_fail      (emif_0_status_local_cal_fail),                      //  output,    width = 1,                 .local_cal_fail
		.emif_usr_reset_n    (emif_0_emif_usr_reset_n_reset),                     //  output,    width = 1, emif_usr_reset_n.reset_n
		.emif_usr_clk        (emif_0_emif_usr_clk_clk),                           //  output,    width = 1,     emif_usr_clk.clk
		.amm_ready_0         (mm_interconnect_0_emif_0_ctrl_amm_0_waitrequest),   //  output,    width = 1,       ctrl_amm_0.waitrequest_n
		.amm_read_0          (mm_interconnect_0_emif_0_ctrl_amm_0_read),          //   input,    width = 1,                 .read
		.amm_write_0         (mm_interconnect_0_emif_0_ctrl_amm_0_write),         //   input,    width = 1,                 .write
		.amm_address_0       (mm_interconnect_0_emif_0_ctrl_amm_0_address),       //   input,   width = 25,                 .address
		.amm_readdata_0      (mm_interconnect_0_emif_0_ctrl_amm_0_readdata),      //  output,  width = 256,                 .readdata
		.amm_writedata_0     (mm_interconnect_0_emif_0_ctrl_amm_0_writedata),     //   input,  width = 256,                 .writedata
		.amm_burstcount_0    (mm_interconnect_0_emif_0_ctrl_amm_0_burstcount),    //   input,    width = 7,                 .burstcount
		.amm_byteenable_0    (mm_interconnect_0_emif_0_ctrl_amm_0_byteenable),    //   input,   width = 32,                 .byteenable
		.amm_readdatavalid_0 (mm_interconnect_0_emif_0_ctrl_amm_0_readdatavalid)  //  output,    width = 1,                 .readdatavalid
	);

	ed_synth_global_reset_n_splitter global_reset_n_splitter (
		.sig_input    (global_reset_reset_n),                          //   input,  width = 1,    sig_input_if.reset_n
		.sig_output_0 (global_reset_n_splitter_sig_output_if_0_reset)  //  output,  width = 1, sig_output_if_0.reset_n
	);

	ed_synth_tg tg (
		.emif_usr_reset_n      (emif_0_emif_usr_reset_n_reset),   //   input,    width = 1, emif_usr_reset_n.reset_n
		.ninit_done            (),                                //   input,    width = 1,       ninit_done.ninit_done
		.emif_usr_clk          (emif_0_emif_usr_clk_clk),         //   input,    width = 1,     emif_usr_clk.clk
		.amm_ready_0           (~tg_ctrl_amm_0_waitrequest),      //   input,    width = 1,       ctrl_amm_0.waitrequest_n
		.amm_read_0            (tg_ctrl_amm_0_read),              //  output,    width = 1,                 .read
		.amm_write_0           (tg_ctrl_amm_0_write),             //  output,    width = 1,                 .write
		.amm_address_0         (tg_ctrl_amm_0_address),           //  output,   width = 30,                 .address
		.amm_readdata_0        (tg_ctrl_amm_0_readdata),          //   input,  width = 256,                 .readdata
		.amm_writedata_0       (tg_ctrl_amm_0_writedata),         //  output,  width = 256,                 .writedata
		.amm_burstcount_0      (tg_ctrl_amm_0_burstcount),        //  output,    width = 7,                 .burstcount
		.amm_byteenable_0      (tg_ctrl_amm_0_byteenable),        //  output,   width = 32,                 .byteenable
		.amm_readdatavalid_0   (tg_ctrl_amm_0_readdatavalid),     //   input,    width = 1,                 .readdatavalid
		.traffic_gen_pass_0    (emif_0_tg_0_traffic_gen_pass),    //  output,    width = 1,      tg_status_0.traffic_gen_pass
		.traffic_gen_fail_0    (emif_0_tg_0_traffic_gen_fail),    //  output,    width = 1,                 .traffic_gen_fail
		.traffic_gen_timeout_0 (emif_0_tg_0_traffic_gen_timeout)  //  output,    width = 1,                 .traffic_gen_timeout
	);

	ed_synth_altera_mm_interconnect_1920_lpnfwuy mm_interconnect_0 (
		.tg_ctrl_amm_0_address                                      (tg_ctrl_amm_0_address),                             //   input,   width = 30,                                        tg_ctrl_amm_0.address
		.tg_ctrl_amm_0_waitrequest                                  (tg_ctrl_amm_0_waitrequest),                         //  output,    width = 1,                                                     .waitrequest
		.tg_ctrl_amm_0_burstcount                                   (tg_ctrl_amm_0_burstcount),                          //   input,    width = 7,                                                     .burstcount
		.tg_ctrl_amm_0_byteenable                                   (tg_ctrl_amm_0_byteenable),                          //   input,   width = 32,                                                     .byteenable
		.tg_ctrl_amm_0_read                                         (tg_ctrl_amm_0_read),                                //   input,    width = 1,                                                     .read
		.tg_ctrl_amm_0_readdata                                     (tg_ctrl_amm_0_readdata),                            //  output,  width = 256,                                                     .readdata
		.tg_ctrl_amm_0_readdatavalid                                (tg_ctrl_amm_0_readdatavalid),                       //  output,    width = 1,                                                     .readdatavalid
		.tg_ctrl_amm_0_write                                        (tg_ctrl_amm_0_write),                               //   input,    width = 1,                                                     .write
		.tg_ctrl_amm_0_writedata                                    (tg_ctrl_amm_0_writedata),                           //   input,  width = 256,                                                     .writedata
		.emif_0_ctrl_amm_0_address                                  (mm_interconnect_0_emif_0_ctrl_amm_0_address),       //  output,   width = 25,                                    emif_0_ctrl_amm_0.address
		.emif_0_ctrl_amm_0_write                                    (mm_interconnect_0_emif_0_ctrl_amm_0_write),         //  output,    width = 1,                                                     .write
		.emif_0_ctrl_amm_0_read                                     (mm_interconnect_0_emif_0_ctrl_amm_0_read),          //  output,    width = 1,                                                     .read
		.emif_0_ctrl_amm_0_readdata                                 (mm_interconnect_0_emif_0_ctrl_amm_0_readdata),      //   input,  width = 256,                                                     .readdata
		.emif_0_ctrl_amm_0_writedata                                (mm_interconnect_0_emif_0_ctrl_amm_0_writedata),     //  output,  width = 256,                                                     .writedata
		.emif_0_ctrl_amm_0_burstcount                               (mm_interconnect_0_emif_0_ctrl_amm_0_burstcount),    //  output,    width = 7,                                                     .burstcount
		.emif_0_ctrl_amm_0_byteenable                               (mm_interconnect_0_emif_0_ctrl_amm_0_byteenable),    //  output,   width = 32,                                                     .byteenable
		.emif_0_ctrl_amm_0_readdatavalid                            (mm_interconnect_0_emif_0_ctrl_amm_0_readdatavalid), //   input,    width = 1,                                                     .readdatavalid
		.emif_0_ctrl_amm_0_waitrequest                              (~mm_interconnect_0_emif_0_ctrl_amm_0_waitrequest),  //   input,    width = 1,                                                     .waitrequest
		.tg_ctrl_amm_0_translator_reset_reset_bridge_in_reset_reset (rst_controller_reset_out_reset),                    //   input,    width = 1, tg_ctrl_amm_0_translator_reset_reset_bridge_in_reset.reset
		.emif_0_emif_usr_clk_clk                                    (emif_0_emif_usr_clk_clk)                            //   input,    width = 1,                                  emif_0_emif_usr_clk.clk
	);

	altera_reset_controller #(
		.NUM_RESET_INPUTS          (1),
		.OUTPUT_RESET_SYNC_EDGES   ("deassert"),
		.SYNC_DEPTH                (2),
		.RESET_REQUEST_PRESENT     (0),
		.RESET_REQ_WAIT_TIME       (1),
		.MIN_RST_ASSERTION_TIME    (3),
		.RESET_REQ_EARLY_DSRT_TIME (1),
		.USE_RESET_REQUEST_IN0     (0),
		.USE_RESET_REQUEST_IN1     (0),
		.USE_RESET_REQUEST_IN2     (0),
		.USE_RESET_REQUEST_IN3     (0),
		.USE_RESET_REQUEST_IN4     (0),
		.USE_RESET_REQUEST_IN5     (0),
		.USE_RESET_REQUEST_IN6     (0),
		.USE_RESET_REQUEST_IN7     (0),
		.USE_RESET_REQUEST_IN8     (0),
		.USE_RESET_REQUEST_IN9     (0),
		.USE_RESET_REQUEST_IN10    (0),
		.USE_RESET_REQUEST_IN11    (0),
		.USE_RESET_REQUEST_IN12    (0),
		.USE_RESET_REQUEST_IN13    (0),
		.USE_RESET_REQUEST_IN14    (0),
		.USE_RESET_REQUEST_IN15    (0),
		.ADAPT_RESET_REQUEST       (0)
	) rst_controller (
		.reset_in0      (~emif_0_emif_usr_reset_n_reset), //   input,  width = 1, reset_in0.reset
		.clk            (emif_0_emif_usr_clk_clk),        //   input,  width = 1,       clk.clk
		.reset_out      (rst_controller_reset_out_reset), //  output,  width = 1, reset_out.reset
		.reset_req      (),                               // (terminated),                       
		.reset_req_in0  (1'b0),                           // (terminated),                       
		.reset_in1      (1'b0),                           // (terminated),                       
		.reset_req_in1  (1'b0),                           // (terminated),                       
		.reset_in2      (1'b0),                           // (terminated),                       
		.reset_req_in2  (1'b0),                           // (terminated),                       
		.reset_in3      (1'b0),                           // (terminated),                       
		.reset_req_in3  (1'b0),                           // (terminated),                       
		.reset_in4      (1'b0),                           // (terminated),                       
		.reset_req_in4  (1'b0),                           // (terminated),                       
		.reset_in5      (1'b0),                           // (terminated),                       
		.reset_req_in5  (1'b0),                           // (terminated),                       
		.reset_in6      (1'b0),                           // (terminated),                       
		.reset_req_in6  (1'b0),                           // (terminated),                       
		.reset_in7      (1'b0),                           // (terminated),                       
		.reset_req_in7  (1'b0),                           // (terminated),                       
		.reset_in8      (1'b0),                           // (terminated),                       
		.reset_req_in8  (1'b0),                           // (terminated),                       
		.reset_in9      (1'b0),                           // (terminated),                       
		.reset_req_in9  (1'b0),                           // (terminated),                       
		.reset_in10     (1'b0),                           // (terminated),                       
		.reset_req_in10 (1'b0),                           // (terminated),                       
		.reset_in11     (1'b0),                           // (terminated),                       
		.reset_req_in11 (1'b0),                           // (terminated),                       
		.reset_in12     (1'b0),                           // (terminated),                       
		.reset_req_in12 (1'b0),                           // (terminated),                       
		.reset_in13     (1'b0),                           // (terminated),                       
		.reset_req_in13 (1'b0),                           // (terminated),                       
		.reset_in14     (1'b0),                           // (terminated),                       
		.reset_req_in14 (1'b0),                           // (terminated),                       
		.reset_in15     (1'b0),                           // (terminated),                       
		.reset_req_in15 (1'b0)                            // (terminated),                       
	);

endmodule
