data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v
1: b'%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:27: Cannot find include file: sys.h\n`include "sys.h" \n         ^~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/458737381/src/verilog-parser/tests,data/full_repos/permissive/458737381/sys.h\n             data/full_repos/permissive/458737381/src/verilog-parser/tests,data/full_repos/permissive/458737381/sys.h.v\n             data/full_repos/permissive/458737381/src/verilog-parser/tests,data/full_repos/permissive/458737381/sys.h.sv\n             sys.h\n             sys.h.v\n             sys.h.sv\n             obj_dir/sys.h\n             obj_dir/sys.h.v\n             obj_dir/sys.h.sv\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:28: Cannot find include file: iop.h\n`include "iop.h" \n         ^~~~~~~\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:168: Define or directive not defined: \'`CLK_IOB_WIDTH\'\n   output [`CLK_IOB_WIDTH-1:0]clsp_iob_data;  \n           ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:391: Define or directive not defined: \'`IOB_CLK_WIDTH\'\n   input [`IOB_CLK_WIDTH-1:0]iob_clsp_data;  \n          ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:394: Define or directive not defined: \'`IOB_CPU_WIDTH\'\n   input [`IOB_CPU_WIDTH-1:0]iob_ctu_coreavail;  \n          ^~~~~~~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:525: Unsupported: Ignoring delay on this delayed statement.\n           #1 ;  \n           ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:625: Define or directive not defined: \'`CLK_IOB_WIDTH\'\n    .clsp_iob_data   (clsp_iob_data[`CLK_IOB_WIDTH-1:0]),\n                                    ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:740: Define or directive not defined: \'`IOB_CLK_WIDTH\'\n    .iob_clsp_data   (iob_clsp_data[`IOB_CLK_WIDTH-1:0]),\n                                    ^~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/458737381/src/verilog-parser/tests/ctu.v:954: Define or directive not defined: \'`IOB_CPU_WIDTH\'\n    .iob_ctu_coreavail   (iob_ctu_coreavail[`IOB_CPU_WIDTH-1:0]),\n                                            ^~~~~~~~~~~~~~\n%Error: Exiting due to 8 error(s), 1 warning(s)\n'
module ctu (

tap_iob_vld, tap_iob_stall, tap_iob_data, pscan_select, 
jbus_grst_out_l, jbus_gdbginit_out_l, jbus_gclk_out, 
jbus_gclk_dup_out, jbus_arst_l, jbus_adbginit_l, 
global_scan_bypass_en, dram_grst_out_l, dram_gdbginit_out_l, 
dram_gclk_out, dram_arst_l, dram_adbginit_l, ctu_tst_scan_disable, 
ctu_spc_sscan_tid, ctu_spc_const_maskid, ctu_spc7_tck, 
ctu_spc7_sscan_se, ctu_spc7_mbisten, ctu_spc7_cmp_cken, ctu_spc6_tck, 
ctu_spc6_sscan_se, ctu_spc6_mbisten, ctu_spc6_cmp_cken, ctu_spc5_tck, 
ctu_spc5_sscan_se, ctu_spc5_mbisten, ctu_spc5_cmp_cken, ctu_spc4_tck, 
ctu_spc4_sscan_se, ctu_spc4_mbisten, ctu_spc4_cmp_cken, ctu_spc3_tck, 
ctu_spc3_sscan_se, ctu_spc3_mbisten, ctu_spc3_cmp_cken, ctu_spc2_tck, 
ctu_spc2_sscan_se, ctu_spc2_mbisten, ctu_spc2_cmp_cken, ctu_spc1_tck, 
ctu_spc1_sscan_se, ctu_spc1_mbisten, ctu_spc1_cmp_cken, ctu_spc0_tck, 
ctu_spc0_sscan_se, ctu_spc0_mbisten, ctu_spc0_cmp_cken, 
ctu_sctag3_mbisten, ctu_sctag3_cmp_cken, ctu_sctag2_mbisten, 
ctu_sctag2_cmp_cken, ctu_sctag1_mbisten, ctu_sctag1_cmp_cken, 
ctu_sctag0_mbisten, ctu_sctag0_cmp_cken, ctu_scdata3_cmp_cken, 
ctu_scdata2_cmp_cken, ctu_scdata1_cmp_cken, ctu_scdata0_cmp_cken, 
ctu_pads_sscan_update, ctu_pads_so, ctu_pads_bso, ctu_misc_update_dr, 
ctu_misc_shift_dr, ctu_misc_mode_ctl, ctu_misc_jbus_cken, 
ctu_misc_hiz_l, ctu_misc_clock_dr, ctu_jbusr_update_dr, 
ctu_jbusr_shift_dr, ctu_jbusr_mode_ctl, ctu_jbusr_jbus_cken, 
ctu_jbusr_hiz_l, ctu_jbusr_clock_dr, ctu_jbusl_update_dr, 
ctu_jbusl_shift_dr, ctu_jbusl_mode_ctl, ctu_jbusl_jbus_cken, 
ctu_jbusl_hiz_l, ctu_jbusl_clock_dr, ctu_jbi_jbus_cken, 
ctu_jbi_cmp_cken, ctu_iob_wake_thr, ctu_iob_resetstat_wr, 
ctu_iob_resetstat, ctu_iob_jbus_cken, ctu_iob_cmp_cken, 
ctu_io_tsr_testio, ctu_io_tdo_en, ctu_io_tdo, ctu_io_j_err, 
ctu_io_clkobs, ctu_global_snap, ctu_fpu_so, ctu_fpu_cmp_cken, 
ctu_efc_updatedr, ctu_efc_tck, ctu_efc_shiftdr, ctu_efc_rowaddr, 
ctu_efc_read_mode, ctu_efc_read_en, ctu_efc_jbus_cken, 
ctu_efc_fuse_bypass, ctu_efc_dest_sample, ctu_efc_data_in, 
ctu_efc_coladdr, ctu_efc_capturedr, ctu_dram_selfrsh, 
ctu_dram13_jbus_cken, ctu_dram13_dram_cken, ctu_dram13_cmp_cken, 
ctu_dram02_jbus_cken, ctu_dram02_dram_cken, ctu_dram02_cmp_cken, 
ctu_dll3_byp_val, ctu_dll3_byp_l, ctu_dll2_byp_val, ctu_dll2_byp_l, 
ctu_dll1_byp_val, ctu_dll1_byp_l, ctu_dll0_byp_val, ctu_dll0_byp_l, 
ctu_debug_update_dr, ctu_debug_shift_dr, ctu_debug_mode_ctl, 
ctu_debug_hiz_l, ctu_debug_clock_dr, ctu_ddr_testmode_l, 
ctu_ddr3_update_dr, ctu_ddr3_shift_dr, ctu_ddr3_mode_ctl, 
ctu_ddr3_iodll_rst_l, ctu_ddr3_hiz_l, ctu_ddr3_dram_cken, 
ctu_ddr3_dll_delayctr, ctu_ddr3_clock_dr, ctu_ddr2_update_dr, 
ctu_ddr2_shift_dr, ctu_ddr2_mode_ctl, ctu_ddr2_iodll_rst_l, 
ctu_ddr2_hiz_l, ctu_ddr2_dram_cken, ctu_ddr2_dll_delayctr, 
ctu_ddr2_clock_dr, ctu_ddr1_update_dr, ctu_ddr1_shift_dr, 
ctu_ddr1_mode_ctl, ctu_ddr1_iodll_rst_l, ctu_ddr1_hiz_l, 
ctu_ddr1_dram_cken, ctu_ddr1_dll_delayctr, ctu_ddr1_clock_dr, 
ctu_ddr0_update_dr, ctu_ddr0_shift_dr, ctu_ddr0_mode_ctl, 
ctu_ddr0_iodll_rst_l, ctu_ddr0_hiz_l, ctu_ddr0_dram_cken, 
ctu_ddr0_dll_delayctr, ctu_ddr0_clock_dr, ctu_dbg_jbus_cken, 
ctu_ccx_cmp_cken, cmp_gdbginit_out_l, cmp_gclk_out, cmp_arst_l, 
cmp_adbginit_l, clsp_iob_vld, clsp_iob_stall, clsp_iob_data, 
afo_tsr_dout, afo_rt_data_out, afo_rt_ack, afo_rng_data, afo_rng_clk, 
ctu_tst_pre_grst_l, global_shift_enable, ctu_tst_scanmode, 
ctu_tst_macrotest, ctu_tst_short_chain, ctu_efc_read_start, 
ctu_jbi_ssiclk, ctu_dram_rx_sync_out, ctu_dram_tx_sync_out, 
ctu_jbus_rx_sync_out, ctu_jbus_tx_sync_out, cmp_grst_out_l, 

spc7_ctu_sscan_out, spc7_ctu_mbisterr, spc7_ctu_mbistdone, 
spc6_ctu_sscan_out, spc6_ctu_mbisterr, spc6_ctu_mbistdone, 
spc5_ctu_sscan_out, spc5_ctu_mbisterr, spc5_ctu_mbistdone, 
spc4_ctu_sscan_out, spc4_ctu_mbisterr, spc4_ctu_mbistdone, 
spc3_ctu_sscan_out, spc3_ctu_mbisterr, spc3_ctu_mbistdone, 
spc2_ctu_sscan_out, spc2_ctu_mbisterr, spc2_ctu_mbistdone, 
spc1_ctu_sscan_out, spc1_ctu_mbisterr, spc1_ctu_mbistdone, 
spc0_ctu_sscan_out, spc0_ctu_mbisterr, spc0_ctu_mbistdone, 
sctag3_ctu_tr, sctag3_ctu_mbisterr, sctag3_ctu_mbistdone, 
sctag2_ctu_tr, sctag2_ctu_serial_scan_in, sctag2_ctu_mbisterr, 
sctag2_ctu_mbistdone, sctag1_ctu_tr, sctag1_ctu_mbisterr, 
sctag1_ctu_mbistdone, sctag0_ctu_tr, sctag0_ctu_mbisterr, 
sctag0_ctu_mbistdone, pads_ctu_si, pads_ctu_bsi, jbus_grst_l, 
jbus_gclk_dup, jbus_gclk_cts, jbus_gclk, jbi_ctu_tr, iob_tap_vld, 
iob_tap_stall, iob_tap_data, iob_ctu_tr, iob_ctu_l2_tr, 
iob_ctu_coreavail, iob_clsp_vld, iob_clsp_stall, iob_clsp_data, 
io_vreg_selbg_l, io_vdda_tsr, io_vdda_rng, io_vdda_pll, io_trst_l, 
io_tms, io_test_mode, io_tdi, io_tck2, io_tck, io_pwron_rst_l, 
io_pll_char_in, io_j_rst_l, io_do_bist, io_clk_stretch, 
efc_ctu_data_out, dram_gclk_cts, dram13_ctu_tr, dram02_ctu_tr, 
dll3_ctu_ctrl, dll2_ctu_ctrl, dll1_ctu_ctrl, dll0_ctu_ctrl, 
ddr3_ctu_dll_overflow, ddr3_ctu_dll_lock, ddr2_ctu_dll_overflow, 
ddr2_ctu_dll_lock, ddr1_ctu_dll_overflow, ddr1_ctu_dll_lock, 
ddr0_ctu_dll_overflow, ddr0_ctu_dll_lock, cmp_gclk_cts, cmp_gclk, 
afi_tsr_tsel, afi_tsr_div, afi_rt_valid, afi_rt_read_write, 
afi_rt_high_low, afi_rt_data_in, afi_rt_addr_data, afi_rng_ctl, 
afi_pll_div2, afi_pll_clamp_fltr, afi_pll_char_mode, afi_bypass_mode, 
afi_bist_mode, afi_pll_trst_l, afi_tsr_mode, io_j_clk
);



   /

   output		afo_rng_clk;
   output		afo_rng_data;
   output		afo_rt_ack;
   output [31:0]	afo_rt_data_out;
   output [7:0]		afo_tsr_dout;
   output [`CLK_IOB_WIDTH-1:0]clsp_iob_data;
   output		clsp_iob_stall;
   output		clsp_iob_vld;
   output		cmp_adbginit_l;
   output		cmp_arst_l;
   output		cmp_gclk_out;
   output		cmp_gdbginit_out_l;
   output		ctu_ccx_cmp_cken;
   output		ctu_dbg_jbus_cken;
   output		ctu_ddr0_clock_dr;
   output [2:0]		ctu_ddr0_dll_delayctr;
   output		ctu_ddr0_dram_cken;
   output		ctu_ddr0_hiz_l;
   output		ctu_ddr0_iodll_rst_l;
   output		ctu_ddr0_mode_ctl;
   output		ctu_ddr0_shift_dr;
   output		ctu_ddr0_update_dr;
   output		ctu_ddr1_clock_dr;
   output [2:0]		ctu_ddr1_dll_delayctr;
   output		ctu_ddr1_dram_cken;
   output		ctu_ddr1_hiz_l;
   output		ctu_ddr1_iodll_rst_l;
   output		ctu_ddr1_mode_ctl;
   output		ctu_ddr1_shift_dr;
   output		ctu_ddr1_update_dr;
   output		ctu_ddr2_clock_dr;
   output [2:0]		ctu_ddr2_dll_delayctr;
   output		ctu_ddr2_dram_cken;
   output		ctu_ddr2_hiz_l;
   output		ctu_ddr2_iodll_rst_l;
   output		ctu_ddr2_mode_ctl;
   output		ctu_ddr2_shift_dr;
   output		ctu_ddr2_update_dr;
   output		ctu_ddr3_clock_dr;
   output [2:0]		ctu_ddr3_dll_delayctr;
   output		ctu_ddr3_dram_cken;
   output		ctu_ddr3_hiz_l;
   output		ctu_ddr3_iodll_rst_l;
   output		ctu_ddr3_mode_ctl;
   output		ctu_ddr3_shift_dr;
   output		ctu_ddr3_update_dr;
   output		ctu_ddr_testmode_l;
   output		ctu_debug_clock_dr;
   output		ctu_debug_hiz_l;
   output		ctu_debug_mode_ctl;
   output		ctu_debug_shift_dr;
   output		ctu_debug_update_dr;
   output		ctu_dll0_byp_l;
   output [4:0]		ctu_dll0_byp_val;
   output		ctu_dll1_byp_l;
   output [4:0]		ctu_dll1_byp_val;
   output		ctu_dll2_byp_l;
   output [4:0]		ctu_dll2_byp_val;
   output		ctu_dll3_byp_l;
   output [4:0]		ctu_dll3_byp_val;
   output		ctu_dram02_cmp_cken;
   output		ctu_dram02_dram_cken;
   output		ctu_dram02_jbus_cken;
   output		ctu_dram13_cmp_cken;
   output		ctu_dram13_dram_cken;
   output		ctu_dram13_jbus_cken;
   output		ctu_dram_selfrsh;
   output		ctu_efc_capturedr;
   output [4:0]		ctu_efc_coladdr;
   output		ctu_efc_data_in;
   output		ctu_efc_dest_sample;
   output		ctu_efc_fuse_bypass;
   output		ctu_efc_jbus_cken;
   output		ctu_efc_read_en;
   output [2:0]		ctu_efc_read_mode;
   output [6:0]		ctu_efc_rowaddr;
   output		ctu_efc_shiftdr;
   output		ctu_efc_tck;
   output		ctu_efc_updatedr;
   output		ctu_fpu_cmp_cken;
   output		ctu_fpu_so;
   output		ctu_global_snap;
   output [1:0]		ctu_io_clkobs;
   output		ctu_io_j_err;
   output		ctu_io_tdo;
   output		ctu_io_tdo_en;
   output [1:0]		ctu_io_tsr_testio;
   output		ctu_iob_cmp_cken;
   output		ctu_iob_jbus_cken;
   output [2:0]		ctu_iob_resetstat;
   output		ctu_iob_resetstat_wr;
   output		ctu_iob_wake_thr;
   output		ctu_jbi_cmp_cken;
   output		ctu_jbi_jbus_cken;
   output		ctu_jbusl_clock_dr;
   output		ctu_jbusl_hiz_l;
   output		ctu_jbusl_jbus_cken;
   output		ctu_jbusl_mode_ctl;
   output		ctu_jbusl_shift_dr;
   output		ctu_jbusl_update_dr;
   output		ctu_jbusr_clock_dr;
   output		ctu_jbusr_hiz_l;
   output		ctu_jbusr_jbus_cken;
   output		ctu_jbusr_mode_ctl;
   output		ctu_jbusr_shift_dr;
   output		ctu_jbusr_update_dr;
   output		ctu_misc_clock_dr;
   output		ctu_misc_hiz_l;
   output		ctu_misc_jbus_cken;
   output		ctu_misc_mode_ctl;
   output		ctu_misc_shift_dr;
   output		ctu_misc_update_dr;
   output		ctu_pads_bso;
   output		ctu_pads_so;
   output		ctu_pads_sscan_update;
   output		ctu_scdata0_cmp_cken;
   output		ctu_scdata1_cmp_cken;
   output		ctu_scdata2_cmp_cken;
   output		ctu_scdata3_cmp_cken;
   output		ctu_sctag0_cmp_cken;
   output		ctu_sctag0_mbisten;
   output		ctu_sctag1_cmp_cken;
   output		ctu_sctag1_mbisten;
   output		ctu_sctag2_cmp_cken;
   output		ctu_sctag2_mbisten;
   output		ctu_sctag3_cmp_cken;
   output		ctu_sctag3_mbisten;
   output		ctu_spc0_cmp_cken;
   output		ctu_spc0_mbisten;
   output		ctu_spc0_sscan_se;
   output		ctu_spc0_tck;
   output		ctu_spc1_cmp_cken;
   output		ctu_spc1_mbisten;
   output		ctu_spc1_sscan_se;
   output		ctu_spc1_tck;
   output		ctu_spc2_cmp_cken;
   output		ctu_spc2_mbisten;
   output		ctu_spc2_sscan_se;
   output		ctu_spc2_tck;
   output		ctu_spc3_cmp_cken;
   output		ctu_spc3_mbisten;
   output		ctu_spc3_sscan_se;
   output		ctu_spc3_tck;
   output		ctu_spc4_cmp_cken;
   output		ctu_spc4_mbisten;
   output		ctu_spc4_sscan_se;
   output		ctu_spc4_tck;
   output		ctu_spc5_cmp_cken;
   output		ctu_spc5_mbisten;
   output		ctu_spc5_sscan_se;
   output		ctu_spc5_tck;
   output		ctu_spc6_cmp_cken;
   output		ctu_spc6_mbisten;
   output		ctu_spc6_sscan_se;
   output		ctu_spc6_tck;
   output		ctu_spc7_cmp_cken;
   output		ctu_spc7_mbisten;
   output		ctu_spc7_sscan_se;
   output		ctu_spc7_tck;
   output [7:0]		ctu_spc_const_maskid;
   output [3:0]		ctu_spc_sscan_tid;
   output		ctu_tst_scan_disable;
   output		dram_adbginit_l;
   output		dram_arst_l;
   output		dram_gclk_out;
   output		dram_gdbginit_out_l;
   output		dram_grst_out_l;
   output		global_scan_bypass_en;
   output		jbus_adbginit_l;
   output		jbus_arst_l;
   output		jbus_gclk_dup_out;
   output		jbus_gclk_out;
   output		jbus_gdbginit_out_l;
   output		jbus_grst_out_l;
   output		pscan_select;
   output [7:0]		tap_iob_data;
   output		tap_iob_stall;
   output		tap_iob_vld;




   input		afi_bist_mode;
   input		afi_bypass_mode;
   input		afi_pll_char_mode;
   input		afi_pll_clamp_fltr;
   input [5:0]		afi_pll_div2;
   input [2:0]		afi_rng_ctl;
   input		afi_rt_addr_data;
   input [31:0]		afi_rt_data_in;
   input		afi_rt_high_low;
   input		afi_rt_read_write;
   input		afi_rt_valid;
   input [9:1]		afi_tsr_div;
   input [7:0]		afi_tsr_tsel;
   input		cmp_gclk;
   input		cmp_gclk_cts;
   input		ddr0_ctu_dll_lock;
   input		ddr0_ctu_dll_overflow;
   input		ddr1_ctu_dll_lock;
   input		ddr1_ctu_dll_overflow;
   input		ddr2_ctu_dll_lock;
   input		ddr2_ctu_dll_overflow;
   input		ddr3_ctu_dll_lock;
   input		ddr3_ctu_dll_overflow;
   input [4:0]		dll0_ctu_ctrl;
   input [4:0]		dll1_ctu_ctrl;
   input [4:0]		dll2_ctu_ctrl;
   input [4:0]		dll3_ctu_ctrl;
   input		dram02_ctu_tr;
   input		dram13_ctu_tr;
   input		dram_gclk_cts;
   input		efc_ctu_data_out;
   input		io_clk_stretch;
   input		io_do_bist;
   input		io_j_rst_l;
   input		io_pll_char_in;
   input		io_pwron_rst_l;
   input		io_tck;
   input		io_tck2;
   input		io_tdi;
   input		io_test_mode;
   input		io_tms;
   input		io_trst_l;
   input		io_vdda_pll;
   input		io_vdda_rng;
   input		io_vdda_tsr;
   input		io_vreg_selbg_l;
   input [`IOB_CLK_WIDTH-1:0]iob_clsp_data;
   input		iob_clsp_stall;
   input		iob_clsp_vld;
   input [`IOB_CPU_WIDTH-1:0]iob_ctu_coreavail;
   input		iob_ctu_l2_tr;
   input		iob_ctu_tr;
   input [7:0]		iob_tap_data;
   input		iob_tap_stall;
   input		iob_tap_vld;
   input		jbi_ctu_tr;
   input		jbus_gclk;
   input		jbus_gclk_cts;
   input		jbus_gclk_dup;
   input		jbus_grst_l;
   input		pads_ctu_bsi;
   input		pads_ctu_si;
   input		sctag0_ctu_mbistdone;
   input		sctag0_ctu_mbisterr;
   input		sctag0_ctu_tr;
   input		sctag1_ctu_mbistdone;
   input		sctag1_ctu_mbisterr;
   input		sctag1_ctu_tr;
   input		sctag2_ctu_mbistdone;
   input		sctag2_ctu_mbisterr;
   input		sctag2_ctu_serial_scan_in;
   input		sctag2_ctu_tr;
   input		sctag3_ctu_mbistdone;
   input		sctag3_ctu_mbisterr;
   input		sctag3_ctu_tr;
   input		spc0_ctu_mbistdone;
   input		spc0_ctu_mbisterr;
   input		spc0_ctu_sscan_out;
   input		spc1_ctu_mbistdone;
   input		spc1_ctu_mbisterr;
   input		spc1_ctu_sscan_out;
   input		spc2_ctu_mbistdone;
   input		spc2_ctu_mbisterr;
   input		spc2_ctu_sscan_out;
   input		spc3_ctu_mbistdone;
   input		spc3_ctu_mbisterr;
   input		spc3_ctu_sscan_out;
   input		spc4_ctu_mbistdone;
   input		spc4_ctu_mbisterr;
   input		spc4_ctu_sscan_out;
   input		spc5_ctu_mbistdone;
   input		spc5_ctu_mbisterr;
   input		spc5_ctu_sscan_out;
   input		spc6_ctu_mbistdone;
   input		spc6_ctu_mbisterr;
   input		spc6_ctu_sscan_out;
   input		spc7_ctu_mbistdone;
   input		spc7_ctu_mbisterr;
   input		spc7_ctu_sscan_out;




   wire [5:0]		clsp_bist_ctrl;
   wire			clsp_bist_dobist;
   wire			clsp_bist_type;
   wire			cmp_clk;
   wire			cmp_gclk_int;
   wire			cmp_grst_l;
   wire			cmp_grst_pipe1_l;
   wire			cmp_grst_pipe2_l;
   wire			cmp_pre_rst_l;
   wire			cmp_rst_l;
   wire			ctu_ddr0_iodll_rst_l_tmp;
   wire			ctu_ddr1_iodll_rst_l_tmp;
   wire			ctu_ddr2_iodll_rst_l_tmp;
   wire			ctu_ddr3_iodll_rst_l_tmp;
   wire			ctu_dram_tx_sync_early;
   wire [2:0]		ctu_sel_cpu;
   wire [2:0]		ctu_sel_dram;
   wire [2:0]		ctu_sel_jbus;
   wire			dft_clsp_nstep_capture_l;
   wire			dft_ctu_scan_disable;
   wire			dft_pin_pscan_l;
   wire			dft_pll_arst_l;
   wire			dft_pll_clamp_fltr;
   wire [5:0]		dft_pll_div2;
   wire			dft_pll_testmode;
   wire			dft_rng_rst_l;
   wire [2:0]		dft_rng_vctrl;
   wire			dft_tdo;
   wire [9:1]		dft_tsr_div;
   wire			dft_tsr_reset_l;
   wire [7:0]		dft_tsr_tsel;
   wire			dft_wake_thr;
   wire			dram_gclk_int;
   wire			jbus_clk;
   wire			jbus_gclk_int;
   wire			jbus_rst_l;
   wire			jbus_rx_sync;
   wire			jbus_tx_sync;
   wire			jtag_clock_dr;
   wire			jtag_clsp_force_cken_cmp;
   wire			jtag_clsp_force_cken_dram;
   wire			jtag_clsp_force_cken_jbus;
   wire			jtag_clsp_ignore_wrm_rst;
   wire			jtag_clsp_sel_tck2;
   wire [5:0]		jtag_clsp_stop_id;
   wire			jtag_clsp_stop_id_vld;
   wire [3:0]		jtag_id;
   wire [3:0]		jtag_nstep_count;
   wire [2:0]		jtag_nstep_domain;
   wire			jtag_nstep_vld;
   wire [3:0]		mask_major_id;
   wire [3:0]		mask_minor_id;
   wire			pll_bypass;
   wire			pll_clk_out;
   wire			pll_clk_out_l;
   wire			pll_clk_out_pre;
   wire			pll_clk_out_pre_l;
   wire			pll_raw_clk_out;
   wire			pll_reset_ref_l;
   wire			se;
   wire			start_clk_early_jl;
   wire			start_clk_jl;
   wire			tck_cts;
   wire			tck_l_cts;
   wire			testmode_l;


   wire 	        ctu_tst_pre_grst_l;
   wire                 MT_long_chain_so_0;





       always @ (ctu_sel_cpu or ctu_sel_dram
		 or ctu_sel_jbus or io_trst_l)
       begin
           #1 ;
           if(  (io_trst_l === 1'b1) &
                (ctu_sel_cpu[2:0] !== 3'b100) &
                (ctu_sel_cpu[2:0] !== 3'b010) &
                (ctu_sel_cpu[2:0] !== 3'b001) 
             )
		`ifdef MODELSIM
           $display ( "CTU_not_one_hot_error",
                    "Select signals to cmp clkswitch are not one hot: %h",
                     ctu_sel_cpu[2:0] );
		`else
           $error ( "CTU_not_one_hot_error",
                    "Select signals to cmp clkswitch are not one hot: %h",
                     ctu_sel_cpu[2:0] );
		`endif

           if(  (io_trst_l === 1'b1) &
                (ctu_sel_dram[2:0] !== 3'b100) &
                (ctu_sel_dram[2:0] !== 3'b010) &
                (ctu_sel_dram[2:0] !== 3'b001) 
             )
		`ifdef MODELSIM
           $display ( "CTU_not_one_hot_error",
                    "Select signals to dram clkswitch are not one hot: %h",
                     ctu_sel_dram[2:0] );
		`else
           $error ( "CTU_not_one_hot_error",
                    "Select signals to dram clkswitch are not one hot: %h",
                     ctu_sel_dram[2:0] );
		`endif
           if(  (io_trst_l === 1'b1) &
                (ctu_sel_jbus[2:0] !== 3'b100) &
                (ctu_sel_jbus[2:0] !== 3'b010) &
                (ctu_sel_jbus[2:0] !== 3'b001) 
             )
		`ifdef MODELSIM
           $display ( "CTU_not_one_hot_error",
                    "Select signals to jbus clkswitch are not one hot: %h",
                     ctu_sel_jbus[2:0] );
		`else
           $error ( "CTU_not_one_hot_error",
                    "Select signals to jbus clkswitch are not one hot: %h",
                     ctu_sel_jbus[2:0] );
		`endif
      end




ctu_or2 u_ctu_ddr0_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr0_iodll_rst_l),

					   .a(ctu_ddr0_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));
ctu_or2 u_ctu_ddr1_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr1_iodll_rst_l),

					   .a(ctu_ddr1_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));
ctu_or2 u_ctu_ddr2_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr2_iodll_rst_l),

					   .a(ctu_ddr2_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));
ctu_or2 u_ctu_ddr3_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr3_iodll_rst_l),

					   .a(ctu_ddr3_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));




   ctu_clsp ctu_clsp
   (

    .clsp_bist_ctrl			(clsp_bist_ctrl[5:0]),
    .clsp_bist_dobist			(clsp_bist_dobist),
    .clsp_bist_type			(clsp_bist_type),
    .clsp_iob_data			(clsp_iob_data[`CLK_IOB_WIDTH-1:0]),
    .clsp_iob_stall			(clsp_iob_stall),
    .clsp_iob_vld			(clsp_iob_vld),
    .cmp_adbginit_l			(cmp_adbginit_l),
    .cmp_arst_l				(cmp_arst_l),
    .cmp_gclk_out			(cmp_gclk_out),
    .cmp_gdbginit_out_l			(cmp_gdbginit_out_l),
    .cmp_grst_out_l			(cmp_grst_out_l),
    .ctu_ccx_cmp_cken			(ctu_ccx_cmp_cken),
    .ctu_dbg_jbus_cken			(ctu_dbg_jbus_cken),
    .ctu_ddr0_dll_delayctr		(ctu_ddr0_dll_delayctr[2:0]),
    .ctu_ddr0_dram_cken			(ctu_ddr0_dram_cken),
    .ctu_ddr1_dll_delayctr		(ctu_ddr1_dll_delayctr[2:0]),
    .ctu_ddr1_dram_cken			(ctu_ddr1_dram_cken),
    .ctu_ddr1_iodll_rst_l		(ctu_ddr1_iodll_rst_l_tmp),
    .ctu_ddr2_dll_delayctr		(ctu_ddr2_dll_delayctr[2:0]),
    .ctu_ddr2_dram_cken			(ctu_ddr2_dram_cken),
    .ctu_ddr2_iodll_rst_l		(ctu_ddr2_iodll_rst_l_tmp),
    .ctu_ddr3_dll_delayctr		(ctu_ddr3_dll_delayctr[2:0]),
    .ctu_ddr3_dram_cken			(ctu_ddr3_dram_cken),
    .ctu_ddr3_iodll_rst_l		(ctu_ddr3_iodll_rst_l_tmp),
    .ctu_dll0_byp_l			(ctu_dll0_byp_l),
    .ctu_dll0_byp_val			(ctu_dll0_byp_val[4:0]),
    .ctu_dll1_byp_l			(ctu_dll1_byp_l),
    .ctu_dll1_byp_val			(ctu_dll1_byp_val[4:0]),
    .ctu_dll2_byp_l			(ctu_dll2_byp_l),
    .ctu_dll2_byp_val			(ctu_dll2_byp_val[4:0]),
    .ctu_dll3_byp_l			(ctu_dll3_byp_l),
    .ctu_dll3_byp_val			(ctu_dll3_byp_val[4:0]),
    .ctu_dram02_cmp_cken		(ctu_dram02_cmp_cken),
    .ctu_dram02_dram_cken		(ctu_dram02_dram_cken),
    .ctu_dram02_jbus_cken		(ctu_dram02_jbus_cken),
    .ctu_dram13_cmp_cken		(ctu_dram13_cmp_cken),
    .ctu_dram13_dram_cken		(ctu_dram13_dram_cken),
    .ctu_dram13_jbus_cken		(ctu_dram13_jbus_cken),
    .ctu_dram_rx_sync_out		(ctu_dram_rx_sync_out),
    .ctu_dram_selfrsh			(ctu_dram_selfrsh),
    .ctu_dram_tx_sync_out		(ctu_dram_tx_sync_out),
    .ctu_efc_jbus_cken			(ctu_efc_jbus_cken),
    .ctu_efc_read_start			(ctu_efc_read_start),
    .ctu_fpu_cmp_cken			(ctu_fpu_cmp_cken),
    .ctu_io_j_err			(ctu_io_j_err),
    .ctu_iob_cmp_cken			(ctu_iob_cmp_cken),
    .ctu_iob_jbus_cken			(ctu_iob_jbus_cken),
    .ctu_iob_resetstat			(ctu_iob_resetstat[2:0]),
    .ctu_iob_resetstat_wr		(ctu_iob_resetstat_wr),
    .ctu_iob_wake_thr			(ctu_iob_wake_thr),
    .ctu_jbi_cmp_cken			(ctu_jbi_cmp_cken),
    .ctu_jbi_jbus_cken			(ctu_jbi_jbus_cken),
    .ctu_jbi_ssiclk			(ctu_jbi_ssiclk),
    .ctu_jbus_tx_sync_out		(ctu_jbus_tx_sync_out),
    .ctu_jbusl_jbus_cken		(ctu_jbusl_jbus_cken),
    .ctu_jbusr_jbus_cken		(ctu_jbusr_jbus_cken),
    .ctu_misc_jbus_cken			(ctu_misc_jbus_cken),
    .ctu_scdata0_cmp_cken		(ctu_scdata0_cmp_cken),
    .ctu_scdata1_cmp_cken		(ctu_scdata1_cmp_cken),
    .ctu_scdata2_cmp_cken		(ctu_scdata2_cmp_cken),
    .ctu_scdata3_cmp_cken		(ctu_scdata3_cmp_cken),
    .ctu_sctag0_cmp_cken		(ctu_sctag0_cmp_cken),
    .ctu_sctag1_cmp_cken		(ctu_sctag1_cmp_cken),
    .ctu_sctag2_cmp_cken		(ctu_sctag2_cmp_cken),
    .ctu_sctag3_cmp_cken		(ctu_sctag3_cmp_cken),
    .ctu_sparc0_cmp_cken		(ctu_spc0_cmp_cken),
    .ctu_sparc1_cmp_cken		(ctu_spc1_cmp_cken),
    .ctu_sparc2_cmp_cken		(ctu_spc2_cmp_cken),
    .ctu_sparc3_cmp_cken		(ctu_spc3_cmp_cken),
    .ctu_sparc4_cmp_cken		(ctu_spc4_cmp_cken),
    .ctu_sparc5_cmp_cken		(ctu_spc5_cmp_cken),
    .ctu_sparc6_cmp_cken		(ctu_spc6_cmp_cken),
    .ctu_sparc7_cmp_cken		(ctu_spc7_cmp_cken),
    .ctu_spc_const_maskid		(ctu_spc_const_maskid[7:0]),
    .ctu_tst_pre_grst_l			(ctu_tst_pre_grst_l),
    .dram_adbginit_l			(dram_adbginit_l),
    .dram_arst_l			(dram_arst_l),
    .dram_gclk_out			(dram_gclk_out),
    .dram_gdbginit_out_l		(dram_gdbginit_out_l),
    .dram_grst_out_l			(dram_grst_out_l),
    .jbus_adbginit_l			(jbus_adbginit_l),
    .jbus_arst_l			(jbus_arst_l),
    .jbus_gclk_dup_out			(jbus_gclk_dup_out),
    .jbus_gclk_out			(jbus_gclk_out),
    .jbus_gdbginit_out_l		(jbus_gdbginit_out_l),
    .jbus_grst_out_l			(jbus_grst_out_l),
    .pll_reset_ref_l			(pll_reset_ref_l),
    .ctu_ddr0_iodll_rst_l		(ctu_ddr0_iodll_rst_l_tmp),
    .ctu_jbus_rx_sync_out		(ctu_jbus_rx_sync_out),
    .start_clk_jl			(start_clk_jl),
    .start_clk_early_jl			(start_clk_early_jl),

    .cmp_clk				(cmp_clk),
    .cmp_gclk				(cmp_gclk_int),
    .ctu_dram_tx_sync_early		(ctu_dram_tx_sync_early),
    .ddr0_ctu_dll_lock			(ddr0_ctu_dll_lock),
    .ddr0_ctu_dll_overflow		(ddr0_ctu_dll_overflow),
    .ddr1_ctu_dll_lock			(ddr1_ctu_dll_lock),
    .ddr1_ctu_dll_overflow		(ddr1_ctu_dll_overflow),
    .ddr2_ctu_dll_lock			(ddr2_ctu_dll_lock),
    .ddr2_ctu_dll_overflow		(ddr2_ctu_dll_overflow),
    .ddr3_ctu_dll_lock			(ddr3_ctu_dll_lock),
    .ddr3_ctu_dll_overflow		(ddr3_ctu_dll_overflow),
    .dft_clsp_nstep_capture_l		(dft_clsp_nstep_capture_l),
    .dft_wake_thr			(dft_wake_thr),
    .dll0_ctu_ctrl			(dll0_ctu_ctrl[4:0]),
    .dll1_ctu_ctrl			(dll1_ctu_ctrl[4:0]),
    .dll2_ctu_ctrl			(dll2_ctu_ctrl[4:0]),
    .dll3_ctu_ctrl			(dll3_ctu_ctrl[4:0]),
    .dram02_ctu_tr			(dram02_ctu_tr),
    .dram13_ctu_tr			(dram13_ctu_tr),
    .dram_gclk				(dram_gclk_int),
    .io_clk_stretch			(io_clk_stretch),
    .io_do_bist				(io_do_bist),
    .io_j_rst_l				(io_j_rst_l),
    .io_pll_char_in			(io_pll_char_in),
    .io_pwron_rst_l			(io_pwron_rst_l),
    .io_tck2				(io_tck2),
    .iob_clsp_data			(iob_clsp_data[`IOB_CLK_WIDTH-1:0]),
    .iob_clsp_stall			(iob_clsp_stall),
    .iob_clsp_vld			(iob_clsp_vld),
    .iob_ctu_l2_tr			(iob_ctu_l2_tr),
    .iob_ctu_tr				(iob_ctu_tr),
    .jbi_ctu_tr				(jbi_ctu_tr),
    .jbus_clk				(jbus_clk),
    .jbus_gclk				(jbus_gclk_int),
    .jbus_rst_l				(jbus_rst_l),
    .jbus_rx_sync			(jbus_rx_sync),
    .jbus_tx_sync			(jbus_tx_sync),
    .jtag_clock_dr			(jtag_clock_dr),
    .jtag_clsp_force_cken_cmp		(jtag_clsp_force_cken_cmp),
    .jtag_clsp_force_cken_dram		(jtag_clsp_force_cken_dram),
    .jtag_clsp_force_cken_jbus		(jtag_clsp_force_cken_jbus),
    .jtag_clsp_ignore_wrm_rst		(jtag_clsp_ignore_wrm_rst),
    .jtag_clsp_sel_cpu			(ctu_sel_cpu[2:0]),
    .jtag_clsp_sel_dram			(ctu_sel_dram[2:0]),
    .jtag_clsp_sel_jbus			(ctu_sel_jbus[2:0]),
    .jtag_clsp_sel_tck2			(jtag_clsp_sel_tck2),
    .jtag_clsp_stop_id			(jtag_clsp_stop_id[5:0]),
    .jtag_clsp_stop_id_vld		(jtag_clsp_stop_id_vld),
    .jtag_nstep_count			(jtag_nstep_count[3:0]),
    .jtag_nstep_domain			(jtag_nstep_domain[2:0]),
    .jtag_nstep_vld			(jtag_nstep_vld),
    .mask_major_id			(mask_major_id[3:0]),
    .mask_minor_id			(mask_minor_id[3:0]),
    .pll_clk_out			(pll_clk_out),
    .pll_clk_out_l			(pll_clk_out_l),
    .pll_clk_out_pre			(pll_clk_out_pre),
    .pll_clk_out_pre_l			(pll_clk_out_pre_l),
    .pll_raw_clk_out			(pll_raw_clk_out),
    .sctag0_ctu_tr			(sctag0_ctu_tr),
    .sctag1_ctu_tr			(sctag1_ctu_tr),
    .sctag2_ctu_tr			(sctag2_ctu_tr),
    .sctag3_ctu_tr			(sctag3_ctu_tr),
    .se					(se),
    .testmode_l				(testmode_l));



   ctu_dft ctu_dft
   (

    .ctu_ddr0_clock_dr			(ctu_ddr0_clock_dr),
    .ctu_ddr0_hiz_l			(ctu_ddr0_hiz_l),
    .ctu_ddr0_mode_ctl			(ctu_ddr0_mode_ctl),
    .ctu_ddr0_shift_dr			(ctu_ddr0_shift_dr),
    .ctu_ddr0_update_dr			(ctu_ddr0_update_dr),
    .ctu_ddr1_clock_dr			(ctu_ddr1_clock_dr),
    .ctu_ddr1_hiz_l			(ctu_ddr1_hiz_l),
    .ctu_ddr1_mode_ctl			(ctu_ddr1_mode_ctl),
    .ctu_ddr1_shift_dr			(ctu_ddr1_shift_dr),
    .ctu_ddr1_update_dr			(ctu_ddr1_update_dr),
    .ctu_ddr2_clock_dr			(ctu_ddr2_clock_dr),
    .ctu_ddr2_hiz_l			(ctu_ddr2_hiz_l),
    .ctu_ddr2_mode_ctl			(ctu_ddr2_mode_ctl),
    .ctu_ddr2_shift_dr			(ctu_ddr2_shift_dr),
    .ctu_ddr2_update_dr			(ctu_ddr2_update_dr),
    .ctu_ddr3_clock_dr			(ctu_ddr3_clock_dr),
    .ctu_ddr3_hiz_l			(ctu_ddr3_hiz_l),
    .ctu_ddr3_mode_ctl			(ctu_ddr3_mode_ctl),
    .ctu_ddr3_shift_dr			(ctu_ddr3_shift_dr),
    .ctu_ddr3_update_dr			(ctu_ddr3_update_dr),
    .ctu_ddr_testmode_l			(ctu_ddr_testmode_l),
    .ctu_debug_clock_dr			(ctu_debug_clock_dr),
    .ctu_debug_hiz_l			(ctu_debug_hiz_l),
    .ctu_debug_mode_ctl			(ctu_debug_mode_ctl),
    .ctu_debug_shift_dr			(ctu_debug_shift_dr),
    .ctu_debug_update_dr		(ctu_debug_update_dr),
    .ctu_efc_capturedr			(ctu_efc_capturedr),
    .ctu_efc_coladdr			(ctu_efc_coladdr[4:0]),
    .ctu_efc_data_in			(ctu_efc_data_in),
    .ctu_efc_dest_sample		(ctu_efc_dest_sample),
    .ctu_efc_fuse_bypass		(ctu_efc_fuse_bypass),
    .ctu_efc_read_en			(ctu_efc_read_en),
    .ctu_efc_read_mode			(ctu_efc_read_mode[2:0]),
    .ctu_efc_rowaddr			(ctu_efc_rowaddr[6:0]),
    .ctu_efc_shiftdr			(ctu_efc_shiftdr),
    .ctu_efc_tck			(ctu_efc_tck),
    .ctu_efc_updatedr			(ctu_efc_updatedr),
    .ctu_fpu_so				(ctu_fpu_so),
    .ctu_global_snap			(ctu_global_snap),
    .ctu_jbusl_clock_dr			(ctu_jbusl_clock_dr),
    .ctu_jbusl_hiz_l			(ctu_jbusl_hiz_l),
    .ctu_jbusl_mode_ctl			(ctu_jbusl_mode_ctl),
    .ctu_jbusl_shift_dr			(ctu_jbusl_shift_dr),
    .ctu_jbusl_update_dr		(ctu_jbusl_update_dr),
    .ctu_jbusr_clock_dr			(ctu_jbusr_clock_dr),
    .ctu_jbusr_hiz_l			(ctu_jbusr_hiz_l),
    .ctu_jbusr_mode_ctl			(ctu_jbusr_mode_ctl),
    .ctu_jbusr_shift_dr			(ctu_jbusr_shift_dr),
    .ctu_jbusr_update_dr		(ctu_jbusr_update_dr),
    .ctu_misc_clock_dr			(ctu_misc_clock_dr),
    .ctu_misc_hiz_l			(ctu_misc_hiz_l),
    .ctu_misc_mode_ctl			(ctu_misc_mode_ctl),
    .ctu_misc_shift_dr			(ctu_misc_shift_dr),
    .ctu_misc_update_dr			(ctu_misc_update_dr),
    .ctu_pads_bso			(ctu_pads_bso),
    .ctu_pads_so			(ctu_pads_so),
    .ctu_pads_sscan_update		(ctu_pads_sscan_update),
    .ctu_sctag0_mbisten			(ctu_sctag0_mbisten),
    .ctu_sctag1_mbisten			(ctu_sctag1_mbisten),
    .ctu_sctag2_mbisten			(ctu_sctag2_mbisten),
    .ctu_sctag3_mbisten			(ctu_sctag3_mbisten),
    .ctu_sel_cpu			(ctu_sel_cpu[2:0]),
    .ctu_sel_dram			(ctu_sel_dram[2:0]),
    .ctu_sel_jbus			(ctu_sel_jbus[2:0]),
    .ctu_spc0_mbisten			(ctu_spc0_mbisten),
    .ctu_spc0_sscan_se			(ctu_spc0_sscan_se),
    .ctu_spc0_tck			(ctu_spc0_tck),
    .ctu_spc1_mbisten			(ctu_spc1_mbisten),
    .ctu_spc1_sscan_se			(ctu_spc1_sscan_se),
    .ctu_spc1_tck			(ctu_spc1_tck),
    .ctu_spc2_mbisten			(ctu_spc2_mbisten),
    .ctu_spc2_sscan_se			(ctu_spc2_sscan_se),
    .ctu_spc2_tck			(ctu_spc2_tck),
    .ctu_spc3_mbisten			(ctu_spc3_mbisten),
    .ctu_spc3_sscan_se			(ctu_spc3_sscan_se),
    .ctu_spc3_tck			(ctu_spc3_tck),
    .ctu_spc4_mbisten			(ctu_spc4_mbisten),
    .ctu_spc4_sscan_se			(ctu_spc4_sscan_se),
    .ctu_spc4_tck			(ctu_spc4_tck),
    .ctu_spc5_mbisten			(ctu_spc5_mbisten),
    .ctu_spc5_sscan_se			(ctu_spc5_sscan_se),
    .ctu_spc5_tck			(ctu_spc5_tck),
    .ctu_spc6_mbisten			(ctu_spc6_mbisten),
    .ctu_spc6_sscan_se			(ctu_spc6_sscan_se),
    .ctu_spc6_tck			(ctu_spc6_tck),
    .ctu_spc7_mbisten			(ctu_spc7_mbisten),
    .ctu_spc7_sscan_se			(ctu_spc7_sscan_se),
    .ctu_spc7_tck			(ctu_spc7_tck),
    .ctu_spc_sscan_tid			(ctu_spc_sscan_tid[3:0]),
    .ctu_tst_macrotest			(ctu_tst_macrotest),
    .ctu_tst_scan_disable		(ctu_tst_scan_disable),
    .ctu_tst_scanmode			(ctu_tst_scanmode),
    .ctu_tst_short_chain		(ctu_tst_short_chain),
    .dft_clsp_nstep_capture_l		(dft_clsp_nstep_capture_l),
    .dft_ctu_scan_disable		(dft_ctu_scan_disable),
    .dft_pin_pscan_l			(dft_pin_pscan_l),
    .dft_pll_arst_l			(dft_pll_arst_l),
    .dft_pll_clamp_fltr			(dft_pll_clamp_fltr),
    .dft_pll_div2			(dft_pll_div2[5:0]),
    .dft_pll_testmode			(dft_pll_testmode),
    .dft_rng_rst_l			(dft_rng_rst_l),
    .dft_rng_vctrl			(dft_rng_vctrl[2:0]),
    .dft_tdo				(dft_tdo),
    .dft_tsr_div			(dft_tsr_div[9:1]),
    .dft_tsr_reset_l			(dft_tsr_reset_l),
    .dft_tsr_tsel			(dft_tsr_tsel[7:0]),
    .dft_wake_thr			(dft_wake_thr),
    .global_scan_bypass_en		(global_scan_bypass_en),
    .global_shift_enable		(global_shift_enable),
    .io_tdo_en				(ctu_io_tdo_en),
    .jtag_clock_dr			(jtag_clock_dr),
    .jtag_clsp_force_cken_cmp		(jtag_clsp_force_cken_cmp),
    .jtag_clsp_force_cken_dram		(jtag_clsp_force_cken_dram),
    .jtag_clsp_force_cken_jbus		(jtag_clsp_force_cken_jbus),
    .jtag_clsp_ignore_wrm_rst		(jtag_clsp_ignore_wrm_rst),
    .jtag_clsp_sel_tck2			(jtag_clsp_sel_tck2),
    .jtag_clsp_stop_id			(jtag_clsp_stop_id[5:0]),
    .jtag_clsp_stop_id_vld		(jtag_clsp_stop_id_vld),
    .jtag_nstep_count			(jtag_nstep_count[3:0]),
    .jtag_nstep_domain			(jtag_nstep_domain[2:0]),
    .jtag_nstep_vld			(jtag_nstep_vld),
    .pll_bypass				(pll_bypass),
    .pscan_select			(pscan_select),
    .rt_ack				(afo_rt_ack),
    .rt_data_out			(afo_rt_data_out[31:0]),
    .tap_iob_data			(tap_iob_data[7:0]),
    .tap_iob_stall			(tap_iob_stall),
    .tap_iob_vld			(tap_iob_vld),
    .testmode_l				(testmode_l),

    .afi_pll_char_mode			(afi_pll_char_mode),
    .afi_pll_clamp_fltr			(afi_pll_clamp_fltr),
    .afi_pll_div2			(afi_pll_div2[5:0]),
    .afi_pll_trst_l			(afi_pll_trst_l),
    .afi_rng_ctl			(afi_rng_ctl[2:0]),
    .afi_tsr_div			(afi_tsr_div[9:1]),
    .afi_tsr_mode			(afi_tsr_mode),
    .afi_tsr_tsel			(afi_tsr_tsel[7:0]),
    .bist_mode_pin			(afi_bist_mode),
    .clsp_bist_ctrl			(clsp_bist_ctrl[5:0]),
    .clsp_bist_dobist			(clsp_bist_dobist),
    .clsp_bist_type			(clsp_bist_type),
    .cmp_clk				(cmp_clk),
    .cmp_rst_l				(cmp_rst_l),
    .cmp_rx_en				(jbus_rx_sync),
    .cmp_tx_en				(jbus_tx_sync),
    .efc_ctu_data_out			(efc_ctu_data_out),
    .io_pwron_rst_l			(io_pwron_rst_l),
    .io_tck				(tck_cts),
    .io_tdi				(io_tdi),
    .io_tms				(io_tms),
    .io_trst_l				(io_trst_l),
    .iob_ctu_coreavail			(iob_ctu_coreavail[`IOB_CPU_WIDTH-1:0]),
    .iob_tap_data			(iob_tap_data[7:0]),
    .iob_tap_stall			(iob_tap_stall),
    .iob_tap_vld			(iob_tap_vld),
    .jbus_clk				(jbus_clk),
    .jbus_rst_l				(jbus_rst_l),
    .jtag_id				(jtag_id[3:0]),
    .pads_ctu_bsi			(pads_ctu_bsi),
    .pads_ctu_si			(pads_ctu_si),
    .pll_bypass_pin			(afi_bypass_mode),
    .pll_reset_ref_l			(pll_reset_ref_l),
    .rt_addr_data			(afi_rt_addr_data),
    .rt_data_in				(afi_rt_data_in[31:0]),
    .rt_high_low			(afi_rt_high_low),
    .rt_read_write			(afi_rt_read_write),
    .rt_valid				(afi_rt_valid),
    .sctag0_ctu_mbistdone		(sctag0_ctu_mbistdone),
    .sctag0_ctu_mbisterr		(sctag0_ctu_mbisterr),
    .sctag1_ctu_mbistdone		(sctag1_ctu_mbistdone),
    .sctag1_ctu_mbisterr		(sctag1_ctu_mbisterr),
    .sctag2_ctu_mbistdone		(sctag2_ctu_mbistdone),
    .sctag2_ctu_mbisterr		(sctag2_ctu_mbisterr),
    .sctag2_ctu_serial_scan_in		(sctag2_ctu_serial_scan_in),
    .sctag3_ctu_mbistdone		(sctag3_ctu_mbistdone),
    .sctag3_ctu_mbisterr		(sctag3_ctu_mbisterr),
    .spc0_ctu_mbistdone			(spc0_ctu_mbistdone),
    .spc0_ctu_mbisterr			(spc0_ctu_mbisterr),
    .spc0_ctu_sscan_out			(spc0_ctu_sscan_out),
    .spc1_ctu_mbistdone			(spc1_ctu_mbistdone),
    .spc1_ctu_mbisterr			(spc1_ctu_mbisterr),
    .spc1_ctu_sscan_out			(spc1_ctu_sscan_out),
    .spc2_ctu_mbistdone			(spc2_ctu_mbistdone),
    .spc2_ctu_mbisterr			(spc2_ctu_mbisterr),
    .spc2_ctu_sscan_out			(spc2_ctu_sscan_out),
    .spc3_ctu_mbistdone			(spc3_ctu_mbistdone),
    .spc3_ctu_mbisterr			(spc3_ctu_mbisterr),
    .spc3_ctu_sscan_out			(spc3_ctu_sscan_out),
    .spc4_ctu_mbistdone			(spc4_ctu_mbistdone),
    .spc4_ctu_mbisterr			(spc4_ctu_mbisterr),
    .spc4_ctu_sscan_out			(spc4_ctu_sscan_out),
    .spc5_ctu_mbistdone			(spc5_ctu_mbistdone),
    .spc5_ctu_mbisterr			(spc5_ctu_mbisterr),
    .spc5_ctu_sscan_out			(spc5_ctu_sscan_out),
    .spc6_ctu_mbistdone			(spc6_ctu_mbistdone),
    .spc6_ctu_mbisterr			(spc6_ctu_mbisterr),
    .spc6_ctu_sscan_out			(spc6_ctu_sscan_out),
    .spc7_ctu_mbistdone			(spc7_ctu_mbistdone),
    .spc7_ctu_mbisterr			(spc7_ctu_mbisterr),
    .spc7_ctu_sscan_out			(spc7_ctu_sscan_out),
    .start_clk_jl			(start_clk_jl),
    .tck_l				(tck_l_cts),
    .test_mode_pin			(io_test_mode));


   bw_rng u_rng (

		 .rng_data		(afo_rng_data),
		 .rng_clk		(afo_rng_clk),

		 .vsup_rng_hv18		(io_vdda_rng),
		 .sel_bg_l		(io_vreg_selbg_l),
		 .vctrl			(dft_rng_vctrl[2:0]),
		 .clk_jbus		(jbus_clk),
		 .rst_l			(dft_rng_rst_l));


  bw_pll u_pll
  (


   .pll_raw_clk_out			(pll_raw_clk_out),
   .pll_vco_out				(),
   .pll_clk_out				(pll_clk_out_pre),
   .pll_clk_out_l			(pll_clk_out_pre_l),
   .pll_char_out			(ctu_io_clkobs[1:0]),

   .pll_sys_clk				({io_j_clk[1],io_j_clk[0]}),
   .pll_bypass				(pll_bypass),
   .pll_arst_l				(dft_pll_arst_l),
   .l2clk				(jbus_gclk_dup),
   .pll_clamp_fltr			(dft_pll_clamp_fltr),
   .pll_div1				(6'b00_0000),
   .pll_div2				(dft_pll_div2[5:0]),
   .pll_div3				(6'b00_0000),
   .vdd_pll				(io_vdda_pll),
   .pll_char_in				(io_pll_char_in),
   .testmode				(dft_pll_testmode),
   .vreg_seldb_l			(io_vreg_selbg_l));


   bw_tsr u_tsr
   (


    .dout				(afo_tsr_dout[7:0]),
    .testio				(ctu_io_tsr_testio[1:0]),
    .i50				(),
    .v0p5				(),

    .vdd_tsr				(io_vdda_tsr),
    .div				(dft_tsr_div[9:1]),
    .clk				(jbus_clk),
    .reset_l				(dft_tsr_reset_l),
    .tsel				(dft_tsr_tsel[7:0]),
    .vreg_selbg_l			(io_vreg_selbg_l));




   bw_clk_cl_ctu_jbus u_jbus_header
   (

    .cluster_grst_l			(jbus_rst_l),
    .dbginit_l				(),
    .rclk				(jbus_clk ),
    .so					(),

    .adbginit_l				(1'b1),
    .arst_l				(io_pwron_rst_l),
    .cluster_cken			(1'b1),
    .gclk				(jbus_gclk ),
    .gdbginit_l				(1'b1),
    .grst_l				(jbus_grst_l),
    .se					(se),
    .si					(1'b0));




   bw_clk_cl_ctu_cmp u_cmp_header
   (

    .cluster_grst_l			(cmp_pre_rst_l),
    .dbginit_l				(),
    .rclk				(cmp_clk ),
    .so					(),

    .adbginit_l				(1'b1),
    .arst_l				(io_pwron_rst_l),
    .cluster_cken			(1'b1),
    .gclk				(cmp_gclk),
    .gdbginit_l				(1'b1),
    .grst_l				(cmp_grst_l),
    .se					(1'b0),
    .si					(1'b0));





    dff_ns u_cmp_header_cmp_rst_pipe1(

				      .q(cmp_grst_pipe1_l),

				      .din(cmp_grst_out_l),
				      .clk(cmp_gclk_int));

    dff_ns u_cmp_header_cmp_rst_pipe2(

				      .q(cmp_grst_pipe2_l),

				      .din(cmp_grst_pipe1_l),
				      .clk(cmp_gclk_int));

    dff_ns u_cmp_header_cmp_rst_pipe3(

				      .q(cmp_grst_l),

				      .din(cmp_grst_pipe2_l),
				      .clk(cmp_gclk_int));



    dffrl_async_ns  u_cmp_header_cmp_rst_l(

					   .q(cmp_rst_l),

					   .din(cmp_pre_rst_l),
					   .clk(cmp_clk),
					   .rst_l(io_pwron_rst_l));




    ctu_sync_header u_sync_header (

				   .ctu_dram_tx_sync_early(ctu_dram_tx_sync_early),
				   .jbus_rx_sync(jbus_rx_sync),
				   .jbus_tx_sync(jbus_tx_sync),
				   .so	(),

				   .cmp_clk(cmp_clk),
				   .cmp_gclk(cmp_gclk_int),
				   .ctu_dram_tx_sync(ctu_dram_tx_sync_out),
				   .ctu_jbus_rx_sync(ctu_jbus_rx_sync_out),
				   .ctu_jbus_tx_sync(ctu_jbus_tx_sync_out),
				   .se	(se),
				   .si	(1'b0),
				   .start_clk_early_jl(start_clk_early_jl));



    bw_u1_ckbuf_30x u_tck_dr (

			      .clk	(tck_cts),

			      .rclk	(io_tck));



    bw_u1_inv_30x u_tck_l_dr (

			      .z	(tck_l_cts),

			      .a	(io_tck));






    bw_u1_ckbuf_40x u_cmp_gclk_dr (

				   .clk	(cmp_gclk_int),

				   .rclk(cmp_gclk_cts));




    bw_u1_ckbuf_30x u_jbus_gclk_dr (

				    .clk(jbus_gclk_int),

				    .rclk(jbus_gclk_cts));



    bw_u1_ckbuf_30x u_dram_gclk_dr (

				    .clk(dram_gclk_int),

				    .rclk(dram_gclk_cts));

  
  



      bw_clk_cl_ctu_2xcmp u_pll_clkdr0 (

					.bw_pll_2x_clk_local(pll_clk_out),

					.bw_pll_2xclk(pll_clk_out_pre));


      bw_clk_cl_ctu_2xcmp_b u_pll_clkdr1 (

					  .bw_pll_2x_clk_local_b(pll_clk_out_l),

					  .bw_pll_2xclk_b(pll_clk_out_pre_l));



/

ctu_test_stub_scan u_test_stub (
			        .long_chain_so_0      (MT_long_chain_so_0),



				.se	(se),
				.so_0	(ctu_io_tdo),

				.global_shift_enable(global_shift_enable),
				.ctu_tst_scan_disable(dft_ctu_scan_disable),
				.ctu_tst_short_chain(dft_pin_pscan_l),
				.short_chain_so_0(dft_tdo));
           
/

			 .jtag_id	(jtag_id[3:0]),
			 .mask_major_id	(mask_major_id[3:0]),
			 .mask_minor_id	(mask_minor_id[3:0]));

endmodule
module ctu (

tap_iob_vld, tap_iob_stall, tap_iob_data, pscan_select, 
jbus_grst_out_l, jbus_gdbginit_out_l, jbus_gclk_out, 
jbus_gclk_dup_out, jbus_arst_l, jbus_adbginit_l, 
global_scan_bypass_en, dram_grst_out_l, dram_gdbginit_out_l, 
dram_gclk_out, dram_arst_l, dram_adbginit_l, ctu_tst_scan_disable, 
ctu_spc_sscan_tid, ctu_spc_const_maskid, ctu_spc7_tck, 
ctu_spc7_sscan_se, ctu_spc7_mbisten, ctu_spc7_cmp_cken, ctu_spc6_tck, 
ctu_spc6_sscan_se, ctu_spc6_mbisten, ctu_spc6_cmp_cken, ctu_spc5_tck, 
ctu_spc5_sscan_se, ctu_spc5_mbisten, ctu_spc5_cmp_cken, ctu_spc4_tck, 
ctu_spc4_sscan_se, ctu_spc4_mbisten, ctu_spc4_cmp_cken, ctu_spc3_tck, 
ctu_spc3_sscan_se, ctu_spc3_mbisten, ctu_spc3_cmp_cken, ctu_spc2_tck, 
ctu_spc2_sscan_se, ctu_spc2_mbisten, ctu_spc2_cmp_cken, ctu_spc1_tck, 
ctu_spc1_sscan_se, ctu_spc1_mbisten, ctu_spc1_cmp_cken, ctu_spc0_tck, 
ctu_spc0_sscan_se, ctu_spc0_mbisten, ctu_spc0_cmp_cken, 
ctu_sctag3_mbisten, ctu_sctag3_cmp_cken, ctu_sctag2_mbisten, 
ctu_sctag2_cmp_cken, ctu_sctag1_mbisten, ctu_sctag1_cmp_cken, 
ctu_sctag0_mbisten, ctu_sctag0_cmp_cken, ctu_scdata3_cmp_cken, 
ctu_scdata2_cmp_cken, ctu_scdata1_cmp_cken, ctu_scdata0_cmp_cken, 
ctu_pads_sscan_update, ctu_pads_so, ctu_pads_bso, ctu_misc_update_dr, 
ctu_misc_shift_dr, ctu_misc_mode_ctl, ctu_misc_jbus_cken, 
ctu_misc_hiz_l, ctu_misc_clock_dr, ctu_jbusr_update_dr, 
ctu_jbusr_shift_dr, ctu_jbusr_mode_ctl, ctu_jbusr_jbus_cken, 
ctu_jbusr_hiz_l, ctu_jbusr_clock_dr, ctu_jbusl_update_dr, 
ctu_jbusl_shift_dr, ctu_jbusl_mode_ctl, ctu_jbusl_jbus_cken, 
ctu_jbusl_hiz_l, ctu_jbusl_clock_dr, ctu_jbi_jbus_cken, 
ctu_jbi_cmp_cken, ctu_iob_wake_thr, ctu_iob_resetstat_wr, 
ctu_iob_resetstat, ctu_iob_jbus_cken, ctu_iob_cmp_cken, 
ctu_io_tsr_testio, ctu_io_tdo_en, ctu_io_tdo, ctu_io_j_err, 
ctu_io_clkobs, ctu_global_snap, ctu_fpu_so, ctu_fpu_cmp_cken, 
ctu_efc_updatedr, ctu_efc_tck, ctu_efc_shiftdr, ctu_efc_rowaddr, 
ctu_efc_read_mode, ctu_efc_read_en, ctu_efc_jbus_cken, 
ctu_efc_fuse_bypass, ctu_efc_dest_sample, ctu_efc_data_in, 
ctu_efc_coladdr, ctu_efc_capturedr, ctu_dram_selfrsh, 
ctu_dram13_jbus_cken, ctu_dram13_dram_cken, ctu_dram13_cmp_cken, 
ctu_dram02_jbus_cken, ctu_dram02_dram_cken, ctu_dram02_cmp_cken, 
ctu_dll3_byp_val, ctu_dll3_byp_l, ctu_dll2_byp_val, ctu_dll2_byp_l, 
ctu_dll1_byp_val, ctu_dll1_byp_l, ctu_dll0_byp_val, ctu_dll0_byp_l, 
ctu_debug_update_dr, ctu_debug_shift_dr, ctu_debug_mode_ctl, 
ctu_debug_hiz_l, ctu_debug_clock_dr, ctu_ddr_testmode_l, 
ctu_ddr3_update_dr, ctu_ddr3_shift_dr, ctu_ddr3_mode_ctl, 
ctu_ddr3_iodll_rst_l, ctu_ddr3_hiz_l, ctu_ddr3_dram_cken, 
ctu_ddr3_dll_delayctr, ctu_ddr3_clock_dr, ctu_ddr2_update_dr, 
ctu_ddr2_shift_dr, ctu_ddr2_mode_ctl, ctu_ddr2_iodll_rst_l, 
ctu_ddr2_hiz_l, ctu_ddr2_dram_cken, ctu_ddr2_dll_delayctr, 
ctu_ddr2_clock_dr, ctu_ddr1_update_dr, ctu_ddr1_shift_dr, 
ctu_ddr1_mode_ctl, ctu_ddr1_iodll_rst_l, ctu_ddr1_hiz_l, 
ctu_ddr1_dram_cken, ctu_ddr1_dll_delayctr, ctu_ddr1_clock_dr, 
ctu_ddr0_update_dr, ctu_ddr0_shift_dr, ctu_ddr0_mode_ctl, 
ctu_ddr0_iodll_rst_l, ctu_ddr0_hiz_l, ctu_ddr0_dram_cken, 
ctu_ddr0_dll_delayctr, ctu_ddr0_clock_dr, ctu_dbg_jbus_cken, 
ctu_ccx_cmp_cken, cmp_gdbginit_out_l, cmp_gclk_out, cmp_arst_l, 
cmp_adbginit_l, clsp_iob_vld, clsp_iob_stall, clsp_iob_data, 
afo_tsr_dout, afo_rt_data_out, afo_rt_ack, afo_rng_data, afo_rng_clk, 
ctu_tst_pre_grst_l, global_shift_enable, ctu_tst_scanmode, 
ctu_tst_macrotest, ctu_tst_short_chain, ctu_efc_read_start, 
ctu_jbi_ssiclk, ctu_dram_rx_sync_out, ctu_dram_tx_sync_out, 
ctu_jbus_rx_sync_out, ctu_jbus_tx_sync_out, cmp_grst_out_l, 

spc7_ctu_sscan_out, spc7_ctu_mbisterr, spc7_ctu_mbistdone, 
spc6_ctu_sscan_out, spc6_ctu_mbisterr, spc6_ctu_mbistdone, 
spc5_ctu_sscan_out, spc5_ctu_mbisterr, spc5_ctu_mbistdone, 
spc4_ctu_sscan_out, spc4_ctu_mbisterr, spc4_ctu_mbistdone, 
spc3_ctu_sscan_out, spc3_ctu_mbisterr, spc3_ctu_mbistdone, 
spc2_ctu_sscan_out, spc2_ctu_mbisterr, spc2_ctu_mbistdone, 
spc1_ctu_sscan_out, spc1_ctu_mbisterr, spc1_ctu_mbistdone, 
spc0_ctu_sscan_out, spc0_ctu_mbisterr, spc0_ctu_mbistdone, 
sctag3_ctu_tr, sctag3_ctu_mbisterr, sctag3_ctu_mbistdone, 
sctag2_ctu_tr, sctag2_ctu_serial_scan_in, sctag2_ctu_mbisterr, 
sctag2_ctu_mbistdone, sctag1_ctu_tr, sctag1_ctu_mbisterr, 
sctag1_ctu_mbistdone, sctag0_ctu_tr, sctag0_ctu_mbisterr, 
sctag0_ctu_mbistdone, pads_ctu_si, pads_ctu_bsi, jbus_grst_l, 
jbus_gclk_dup, jbus_gclk_cts, jbus_gclk, jbi_ctu_tr, iob_tap_vld, 
iob_tap_stall, iob_tap_data, iob_ctu_tr, iob_ctu_l2_tr, 
iob_ctu_coreavail, iob_clsp_vld, iob_clsp_stall, iob_clsp_data, 
io_vreg_selbg_l, io_vdda_tsr, io_vdda_rng, io_vdda_pll, io_trst_l, 
io_tms, io_test_mode, io_tdi, io_tck2, io_tck, io_pwron_rst_l, 
io_pll_char_in, io_j_rst_l, io_do_bist, io_clk_stretch, 
efc_ctu_data_out, dram_gclk_cts, dram13_ctu_tr, dram02_ctu_tr, 
dll3_ctu_ctrl, dll2_ctu_ctrl, dll1_ctu_ctrl, dll0_ctu_ctrl, 
ddr3_ctu_dll_overflow, ddr3_ctu_dll_lock, ddr2_ctu_dll_overflow, 
ddr2_ctu_dll_lock, ddr1_ctu_dll_overflow, ddr1_ctu_dll_lock, 
ddr0_ctu_dll_overflow, ddr0_ctu_dll_lock, cmp_gclk_cts, cmp_gclk, 
afi_tsr_tsel, afi_tsr_div, afi_rt_valid, afi_rt_read_write, 
afi_rt_high_low, afi_rt_data_in, afi_rt_addr_data, afi_rng_ctl, 
afi_pll_div2, afi_pll_clamp_fltr, afi_pll_char_mode, afi_bypass_mode, 
afi_bist_mode, afi_pll_trst_l, afi_tsr_mode, io_j_clk
);




   /

   output		afo_rng_clk;
   output		afo_rng_data;
   output		afo_rt_ack;
   output [31:0]	afo_rt_data_out;
   output [7:0]		afo_tsr_dout;
   output [`CLK_IOB_WIDTH-1:0]clsp_iob_data;
   output		clsp_iob_stall;
   output		clsp_iob_vld;
   output		cmp_adbginit_l;
   output		cmp_arst_l;
   output		cmp_gclk_out;
   output		cmp_gdbginit_out_l;
   output		ctu_ccx_cmp_cken;
   output		ctu_dbg_jbus_cken;
   output		ctu_ddr0_clock_dr;
   output [2:0]		ctu_ddr0_dll_delayctr;
   output		ctu_ddr0_dram_cken;
   output		ctu_ddr0_hiz_l;
   output		ctu_ddr0_iodll_rst_l;
   output		ctu_ddr0_mode_ctl;
   output		ctu_ddr0_shift_dr;
   output		ctu_ddr0_update_dr;
   output		ctu_ddr1_clock_dr;
   output [2:0]		ctu_ddr1_dll_delayctr;
   output		ctu_ddr1_dram_cken;
   output		ctu_ddr1_hiz_l;
   output		ctu_ddr1_iodll_rst_l;
   output		ctu_ddr1_mode_ctl;
   output		ctu_ddr1_shift_dr;
   output		ctu_ddr1_update_dr;
   output		ctu_ddr2_clock_dr;
   output [2:0]		ctu_ddr2_dll_delayctr;
   output		ctu_ddr2_dram_cken;
   output		ctu_ddr2_hiz_l;
   output		ctu_ddr2_iodll_rst_l;
   output		ctu_ddr2_mode_ctl;
   output		ctu_ddr2_shift_dr;
   output		ctu_ddr2_update_dr;
   output		ctu_ddr3_clock_dr;
   output [2:0]		ctu_ddr3_dll_delayctr;
   output		ctu_ddr3_dram_cken;
   output		ctu_ddr3_hiz_l;
   output		ctu_ddr3_iodll_rst_l;
   output		ctu_ddr3_mode_ctl;
   output		ctu_ddr3_shift_dr;
   output		ctu_ddr3_update_dr;
   output		ctu_ddr_testmode_l;
   output		ctu_debug_clock_dr;
   output		ctu_debug_hiz_l;
   output		ctu_debug_mode_ctl;
   output		ctu_debug_shift_dr;
   output		ctu_debug_update_dr;
   output		ctu_dll0_byp_l;
   output [4:0]		ctu_dll0_byp_val;
   output		ctu_dll1_byp_l;
   output [4:0]		ctu_dll1_byp_val;
   output		ctu_dll2_byp_l;
   output [4:0]		ctu_dll2_byp_val;
   output		ctu_dll3_byp_l;
   output [4:0]		ctu_dll3_byp_val;
   output		ctu_dram02_cmp_cken;
   output		ctu_dram02_dram_cken;
   output		ctu_dram02_jbus_cken;
   output		ctu_dram13_cmp_cken;
   output		ctu_dram13_dram_cken;
   output		ctu_dram13_jbus_cken;
   output		ctu_dram_selfrsh;
   output		ctu_efc_capturedr;
   output [4:0]		ctu_efc_coladdr;
   output		ctu_efc_data_in;
   output		ctu_efc_dest_sample;
   output		ctu_efc_fuse_bypass;
   output		ctu_efc_jbus_cken;
   output		ctu_efc_read_en;
   output [2:0]		ctu_efc_read_mode;
   output [6:0]		ctu_efc_rowaddr;
   output		ctu_efc_shiftdr;
   output		ctu_efc_tck;
   output		ctu_efc_updatedr;
   output		ctu_fpu_cmp_cken;
   output		ctu_fpu_so;
   output		ctu_global_snap;
   output [1:0]		ctu_io_clkobs;
   output		ctu_io_j_err;
   output		ctu_io_tdo;
   output		ctu_io_tdo_en;
   output [1:0]		ctu_io_tsr_testio;
   output		ctu_iob_cmp_cken;
   output		ctu_iob_jbus_cken;
   output [2:0]		ctu_iob_resetstat;
   output		ctu_iob_resetstat_wr;
   output		ctu_iob_wake_thr;
   output		ctu_jbi_cmp_cken;
   output		ctu_jbi_jbus_cken;
   output		ctu_jbusl_clock_dr;
   output		ctu_jbusl_hiz_l;
   output		ctu_jbusl_jbus_cken;
   output		ctu_jbusl_mode_ctl;
   output		ctu_jbusl_shift_dr;
   output		ctu_jbusl_update_dr;
   output		ctu_jbusr_clock_dr;
   output		ctu_jbusr_hiz_l;
   output		ctu_jbusr_jbus_cken;
   output		ctu_jbusr_mode_ctl;
   output		ctu_jbusr_shift_dr;
   output		ctu_jbusr_update_dr;
   output		ctu_misc_clock_dr;
   output		ctu_misc_hiz_l;
   output		ctu_misc_jbus_cken;
   output		ctu_misc_mode_ctl;
   output		ctu_misc_shift_dr;
   output		ctu_misc_update_dr;
   output		ctu_pads_bso;
   output		ctu_pads_so;
   output		ctu_pads_sscan_update;
   output		ctu_scdata0_cmp_cken;
   output		ctu_scdata1_cmp_cken;
   output		ctu_scdata2_cmp_cken;
   output		ctu_scdata3_cmp_cken;
   output		ctu_sctag0_cmp_cken;
   output		ctu_sctag0_mbisten;
   output		ctu_sctag1_cmp_cken;
   output		ctu_sctag1_mbisten;
   output		ctu_sctag2_cmp_cken;
   output		ctu_sctag2_mbisten;
   output		ctu_sctag3_cmp_cken;
   output		ctu_sctag3_mbisten;
   output		ctu_spc0_cmp_cken;
   output		ctu_spc0_mbisten;
   output		ctu_spc0_sscan_se;
   output		ctu_spc0_tck;
   output		ctu_spc1_cmp_cken;
   output		ctu_spc1_mbisten;
   output		ctu_spc1_sscan_se;
   output		ctu_spc1_tck;
   output		ctu_spc2_cmp_cken;
   output		ctu_spc2_mbisten;
   output		ctu_spc2_sscan_se;
   output		ctu_spc2_tck;
   output		ctu_spc3_cmp_cken;
   output		ctu_spc3_mbisten;
   output		ctu_spc3_sscan_se;
   output		ctu_spc3_tck;
   output		ctu_spc4_cmp_cken;
   output		ctu_spc4_mbisten;
   output		ctu_spc4_sscan_se;
   output		ctu_spc4_tck;
   output		ctu_spc5_cmp_cken;
   output		ctu_spc5_mbisten;
   output		ctu_spc5_sscan_se;
   output		ctu_spc5_tck;
   output		ctu_spc6_cmp_cken;
   output		ctu_spc6_mbisten;
   output		ctu_spc6_sscan_se;
   output		ctu_spc6_tck;
   output		ctu_spc7_cmp_cken;
   output		ctu_spc7_mbisten;
   output		ctu_spc7_sscan_se;
   output		ctu_spc7_tck;
   output [7:0]		ctu_spc_const_maskid;
   output [3:0]		ctu_spc_sscan_tid;
   output		ctu_tst_scan_disable;
   output		dram_adbginit_l;
   output		dram_arst_l;
   output		dram_gclk_out;
   output		dram_gdbginit_out_l;
   output		dram_grst_out_l;
   output		global_scan_bypass_en;
   output		jbus_adbginit_l;
   output		jbus_arst_l;
   output		jbus_gclk_dup_out;
   output		jbus_gclk_out;
   output		jbus_gdbginit_out_l;
   output		jbus_grst_out_l;
   output		pscan_select;
   output [7:0]		tap_iob_data;
   output		tap_iob_stall;
   output		tap_iob_vld;




   input		afi_bist_mode;
   input		afi_bypass_mode;
   input		afi_pll_char_mode;
   input		afi_pll_clamp_fltr;
   input [5:0]		afi_pll_div2;
   input [2:0]		afi_rng_ctl;
   input		afi_rt_addr_data;
   input [31:0]		afi_rt_data_in;
   input		afi_rt_high_low;
   input		afi_rt_read_write;
   input		afi_rt_valid;
   input [9:1]		afi_tsr_div;
   input [7:0]		afi_tsr_tsel;
   input		cmp_gclk;
   input		cmp_gclk_cts;
   input		ddr0_ctu_dll_lock;
   input		ddr0_ctu_dll_overflow;
   input		ddr1_ctu_dll_lock;
   input		ddr1_ctu_dll_overflow;
   input		ddr2_ctu_dll_lock;
   input		ddr2_ctu_dll_overflow;
   input		ddr3_ctu_dll_lock;
   input		ddr3_ctu_dll_overflow;
   input [4:0]		dll0_ctu_ctrl;
   input [4:0]		dll1_ctu_ctrl;
   input [4:0]		dll2_ctu_ctrl;
   input [4:0]		dll3_ctu_ctrl;
   input		dram02_ctu_tr;
   input		dram13_ctu_tr;
   input		dram_gclk_cts;
   input		efc_ctu_data_out;
   input		io_clk_stretch;
   input		io_do_bist;
   input		io_j_rst_l;
   input		io_pll_char_in;
   input		io_pwron_rst_l;
   input		io_tck;
   input		io_tck2;
   input		io_tdi;
   input		io_test_mode;
   input		io_tms;
   input		io_trst_l;
   input		io_vdda_pll;
   input		io_vdda_rng;
   input		io_vdda_tsr;
   input		io_vreg_selbg_l;
   input [`IOB_CLK_WIDTH-1:0]iob_clsp_data;
   input		iob_clsp_stall;
   input		iob_clsp_vld;
   input [`IOB_CPU_WIDTH-1:0]iob_ctu_coreavail;
   input		iob_ctu_l2_tr;
   input		iob_ctu_tr;
   input [7:0]		iob_tap_data;
   input		iob_tap_stall;
   input		iob_tap_vld;
   input		jbi_ctu_tr;
   input		jbus_gclk;
   input		jbus_gclk_cts;
   input		jbus_gclk_dup;
   input		jbus_grst_l;
   input		pads_ctu_bsi;
   input		pads_ctu_si;
   input		sctag0_ctu_mbistdone;
   input		sctag0_ctu_mbisterr;
   input		sctag0_ctu_tr;
   input		sctag1_ctu_mbistdone;
   input		sctag1_ctu_mbisterr;
   input		sctag1_ctu_tr;
   input		sctag2_ctu_mbistdone;
   input		sctag2_ctu_mbisterr;
   input		sctag2_ctu_serial_scan_in;
   input		sctag2_ctu_tr;
   input		sctag3_ctu_mbistdone;
   input		sctag3_ctu_mbisterr;
   input		sctag3_ctu_tr;
   input		spc0_ctu_mbistdone;
   input		spc0_ctu_mbisterr;
   input		spc0_ctu_sscan_out;
   input		spc1_ctu_mbistdone;
   input		spc1_ctu_mbisterr;
   input		spc1_ctu_sscan_out;
   input		spc2_ctu_mbistdone;
   input		spc2_ctu_mbisterr;
   input		spc2_ctu_sscan_out;
   input		spc3_ctu_mbistdone;
   input		spc3_ctu_mbisterr;
   input		spc3_ctu_sscan_out;
   input		spc4_ctu_mbistdone;
   input		spc4_ctu_mbisterr;
   input		spc4_ctu_sscan_out;
   input		spc5_ctu_mbistdone;
   input		spc5_ctu_mbisterr;
   input		spc5_ctu_sscan_out;
   input		spc6_ctu_mbistdone;
   input		spc6_ctu_mbisterr;
   input		spc6_ctu_sscan_out;
   input		spc7_ctu_mbistdone;
   input		spc7_ctu_mbisterr;
   input		spc7_ctu_sscan_out;




   wire [5:0]		clsp_bist_ctrl;
   wire			clsp_bist_dobist;
   wire			clsp_bist_type;
   wire			cmp_clk;
   wire			cmp_gclk_int;
   wire			cmp_grst_l;
   wire			cmp_grst_pipe1_l;
   wire			cmp_grst_pipe2_l;
   wire			cmp_pre_rst_l;
   wire			cmp_rst_l;
   wire			ctu_ddr0_iodll_rst_l_tmp;
   wire			ctu_ddr1_iodll_rst_l_tmp;
   wire			ctu_ddr2_iodll_rst_l_tmp;
   wire			ctu_ddr3_iodll_rst_l_tmp;
   wire			ctu_dram_tx_sync_early;
   wire [2:0]		ctu_sel_cpu;
   wire [2:0]		ctu_sel_dram;
   wire [2:0]		ctu_sel_jbus;
   wire			dft_clsp_nstep_capture_l;
   wire			dft_ctu_scan_disable;
   wire			dft_pin_pscan_l;
   wire			dft_pll_arst_l;
   wire			dft_pll_clamp_fltr;
   wire [5:0]		dft_pll_div2;
   wire			dft_pll_testmode;
   wire			dft_rng_rst_l;
   wire [2:0]		dft_rng_vctrl;
   wire			dft_tdo;
   wire [9:1]		dft_tsr_div;
   wire			dft_tsr_reset_l;
   wire [7:0]		dft_tsr_tsel;
   wire			dft_wake_thr;
   wire			dram_gclk_int;
   wire			jbus_clk;
   wire			jbus_gclk_int;
   wire			jbus_rst_l;
   wire			jbus_rx_sync;
   wire			jbus_tx_sync;
   wire			jtag_clock_dr;
   wire			jtag_clsp_force_cken_cmp;
   wire			jtag_clsp_force_cken_dram;
   wire			jtag_clsp_force_cken_jbus;
   wire			jtag_clsp_ignore_wrm_rst;
   wire			jtag_clsp_sel_tck2;
   wire [5:0]		jtag_clsp_stop_id;
   wire			jtag_clsp_stop_id_vld;
   wire [3:0]		jtag_id;
   wire [3:0]		jtag_nstep_count;
   wire [2:0]		jtag_nstep_domain;
   wire			jtag_nstep_vld;
   wire [3:0]		mask_major_id;
   wire [3:0]		mask_minor_id;
   wire			pll_bypass;
   wire			pll_clk_out;
   wire			pll_clk_out_l;
   wire			pll_clk_out_pre;
   wire			pll_clk_out_pre_l;
   wire			pll_raw_clk_out;
   wire			pll_reset_ref_l;
   wire			se;
   wire			start_clk_early_jl;
   wire			start_clk_jl;
   wire			tck_cts;
   wire			tck_l_cts;
   wire			testmode_l;


   wire 	        ctu_tst_pre_grst_l;
   wire                 MT_long_chain_so_0;





       always @ (ctu_sel_cpu or ctu_sel_dram
		 or ctu_sel_jbus or io_trst_l)
       begin
           #1 ;
           if(  (io_trst_l === 1'b1) &
                (ctu_sel_cpu[2:0] !== 3'b100) &
                (ctu_sel_cpu[2:0] !== 3'b010) &
                (ctu_sel_cpu[2:0] !== 3'b001) 
             )
		`ifdef MODELSIM
           $display ( "CTU_not_one_hot_error",
                    "Select signals to cmp clkswitch are not one hot: %h",
                     ctu_sel_cpu[2:0] );
		`else
           $error ( "CTU_not_one_hot_error",
                    "Select signals to cmp clkswitch are not one hot: %h",
                     ctu_sel_cpu[2:0] );
		`endif

           if(  (io_trst_l === 1'b1) &
                (ctu_sel_dram[2:0] !== 3'b100) &
                (ctu_sel_dram[2:0] !== 3'b010) &
                (ctu_sel_dram[2:0] !== 3'b001) 
             )
		`ifdef MODELSIM
           $display ( "CTU_not_one_hot_error",
                    "Select signals to dram clkswitch are not one hot: %h",
                     ctu_sel_dram[2:0] );
		`else
           $error ( "CTU_not_one_hot_error",
                    "Select signals to dram clkswitch are not one hot: %h",
                     ctu_sel_dram[2:0] );
		`endif
           if(  (io_trst_l === 1'b1) &
                (ctu_sel_jbus[2:0] !== 3'b100) &
                (ctu_sel_jbus[2:0] !== 3'b010) &
                (ctu_sel_jbus[2:0] !== 3'b001) 
             )
		`ifdef MODELSIM
           $display ( "CTU_not_one_hot_error",
                    "Select signals to jbus clkswitch are not one hot: %h",
                     ctu_sel_jbus[2:0] );
		`else
           $error ( "CTU_not_one_hot_error",
                    "Select signals to jbus clkswitch are not one hot: %h",
                     ctu_sel_jbus[2:0] );
		`endif
      end




ctu_or2 u_ctu_ddr0_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr0_iodll_rst_l),

					   .a(ctu_ddr0_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));
ctu_or2 u_ctu_ddr1_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr1_iodll_rst_l),

					   .a(ctu_ddr1_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));
ctu_or2 u_ctu_ddr2_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr2_iodll_rst_l),

					   .a(ctu_ddr2_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));
ctu_or2 u_ctu_ddr3_iodll_rst_l_or2_ecobug (

					   .z(ctu_ddr3_iodll_rst_l),

					   .a(ctu_ddr3_iodll_rst_l_tmp),
					   .b(ctu_tst_scanmode));




   ctu_clsp ctu_clsp
   (

    .clsp_bist_ctrl			(clsp_bist_ctrl[5:0]),
    .clsp_bist_dobist			(clsp_bist_dobist),
    .clsp_bist_type			(clsp_bist_type),
    .clsp_iob_data			(clsp_iob_data[`CLK_IOB_WIDTH-1:0]),
    .clsp_iob_stall			(clsp_iob_stall),
    .clsp_iob_vld			(clsp_iob_vld),
    .cmp_adbginit_l			(cmp_adbginit_l),
    .cmp_arst_l				(cmp_arst_l),
    .cmp_gclk_out			(cmp_gclk_out),
    .cmp_gdbginit_out_l			(cmp_gdbginit_out_l),
    .cmp_grst_out_l			(cmp_grst_out_l),
    .ctu_ccx_cmp_cken			(ctu_ccx_cmp_cken),
    .ctu_dbg_jbus_cken			(ctu_dbg_jbus_cken),
    .ctu_ddr0_dll_delayctr		(ctu_ddr0_dll_delayctr[2:0]),
    .ctu_ddr0_dram_cken			(ctu_ddr0_dram_cken),
    .ctu_ddr1_dll_delayctr		(ctu_ddr1_dll_delayctr[2:0]),
    .ctu_ddr1_dram_cken			(ctu_ddr1_dram_cken),
    .ctu_ddr1_iodll_rst_l		(ctu_ddr1_iodll_rst_l_tmp),
    .ctu_ddr2_dll_delayctr		(ctu_ddr2_dll_delayctr[2:0]),
    .ctu_ddr2_dram_cken			(ctu_ddr2_dram_cken),
    .ctu_ddr2_iodll_rst_l		(ctu_ddr2_iodll_rst_l_tmp),
    .ctu_ddr3_dll_delayctr		(ctu_ddr3_dll_delayctr[2:0]),
    .ctu_ddr3_dram_cken			(ctu_ddr3_dram_cken),
    .ctu_ddr3_iodll_rst_l		(ctu_ddr3_iodll_rst_l_tmp),
    .ctu_dll0_byp_l			(ctu_dll0_byp_l),
    .ctu_dll0_byp_val			(ctu_dll0_byp_val[4:0]),
    .ctu_dll1_byp_l			(ctu_dll1_byp_l),
    .ctu_dll1_byp_val			(ctu_dll1_byp_val[4:0]),
    .ctu_dll2_byp_l			(ctu_dll2_byp_l),
    .ctu_dll2_byp_val			(ctu_dll2_byp_val[4:0]),
    .ctu_dll3_byp_l			(ctu_dll3_byp_l),
    .ctu_dll3_byp_val			(ctu_dll3_byp_val[4:0]),
    .ctu_dram02_cmp_cken		(ctu_dram02_cmp_cken),
    .ctu_dram02_dram_cken		(ctu_dram02_dram_cken),
    .ctu_dram02_jbus_cken		(ctu_dram02_jbus_cken),
    .ctu_dram13_cmp_cken		(ctu_dram13_cmp_cken),
    .ctu_dram13_dram_cken		(ctu_dram13_dram_cken),
    .ctu_dram13_jbus_cken		(ctu_dram13_jbus_cken),
    .ctu_dram_rx_sync_out		(ctu_dram_rx_sync_out),
    .ctu_dram_selfrsh			(ctu_dram_selfrsh),
    .ctu_dram_tx_sync_out		(ctu_dram_tx_sync_out),
    .ctu_efc_jbus_cken			(ctu_efc_jbus_cken),
    .ctu_efc_read_start			(ctu_efc_read_start),
    .ctu_fpu_cmp_cken			(ctu_fpu_cmp_cken),
    .ctu_io_j_err			(ctu_io_j_err),
    .ctu_iob_cmp_cken			(ctu_iob_cmp_cken),
    .ctu_iob_jbus_cken			(ctu_iob_jbus_cken),
    .ctu_iob_resetstat			(ctu_iob_resetstat[2:0]),
    .ctu_iob_resetstat_wr		(ctu_iob_resetstat_wr),
    .ctu_iob_wake_thr			(ctu_iob_wake_thr),
    .ctu_jbi_cmp_cken			(ctu_jbi_cmp_cken),
    .ctu_jbi_jbus_cken			(ctu_jbi_jbus_cken),
    .ctu_jbi_ssiclk			(ctu_jbi_ssiclk),
    .ctu_jbus_tx_sync_out		(ctu_jbus_tx_sync_out),
    .ctu_jbusl_jbus_cken		(ctu_jbusl_jbus_cken),
    .ctu_jbusr_jbus_cken		(ctu_jbusr_jbus_cken),
    .ctu_misc_jbus_cken			(ctu_misc_jbus_cken),
    .ctu_scdata0_cmp_cken		(ctu_scdata0_cmp_cken),
    .ctu_scdata1_cmp_cken		(ctu_scdata1_cmp_cken),
    .ctu_scdata2_cmp_cken		(ctu_scdata2_cmp_cken),
    .ctu_scdata3_cmp_cken		(ctu_scdata3_cmp_cken),
    .ctu_sctag0_cmp_cken		(ctu_sctag0_cmp_cken),
    .ctu_sctag1_cmp_cken		(ctu_sctag1_cmp_cken),
    .ctu_sctag2_cmp_cken		(ctu_sctag2_cmp_cken),
    .ctu_sctag3_cmp_cken		(ctu_sctag3_cmp_cken),
    .ctu_sparc0_cmp_cken		(ctu_spc0_cmp_cken),
    .ctu_sparc1_cmp_cken		(ctu_spc1_cmp_cken),
    .ctu_sparc2_cmp_cken		(ctu_spc2_cmp_cken),
    .ctu_sparc3_cmp_cken		(ctu_spc3_cmp_cken),
    .ctu_sparc4_cmp_cken		(ctu_spc4_cmp_cken),
    .ctu_sparc5_cmp_cken		(ctu_spc5_cmp_cken),
    .ctu_sparc6_cmp_cken		(ctu_spc6_cmp_cken),
    .ctu_sparc7_cmp_cken		(ctu_spc7_cmp_cken),
    .ctu_spc_const_maskid		(ctu_spc_const_maskid[7:0]),
    .ctu_tst_pre_grst_l			(ctu_tst_pre_grst_l),
    .dram_adbginit_l			(dram_adbginit_l),
    .dram_arst_l			(dram_arst_l),
    .dram_gclk_out			(dram_gclk_out),
    .dram_gdbginit_out_l		(dram_gdbginit_out_l),
    .dram_grst_out_l			(dram_grst_out_l),
    .jbus_adbginit_l			(jbus_adbginit_l),
    .jbus_arst_l			(jbus_arst_l),
    .jbus_gclk_dup_out			(jbus_gclk_dup_out),
    .jbus_gclk_out			(jbus_gclk_out),
    .jbus_gdbginit_out_l		(jbus_gdbginit_out_l),
    .jbus_grst_out_l			(jbus_grst_out_l),
    .pll_reset_ref_l			(pll_reset_ref_l),
    .ctu_ddr0_iodll_rst_l		(ctu_ddr0_iodll_rst_l_tmp),
    .ctu_jbus_rx_sync_out		(ctu_jbus_rx_sync_out),
    .start_clk_jl			(start_clk_jl),
    .start_clk_early_jl			(start_clk_early_jl),

    .cmp_clk				(cmp_clk),
    .cmp_gclk				(cmp_gclk_int),
    .ctu_dram_tx_sync_early		(ctu_dram_tx_sync_early),
    .ddr0_ctu_dll_lock			(ddr0_ctu_dll_lock),
    .ddr0_ctu_dll_overflow		(ddr0_ctu_dll_overflow),
    .ddr1_ctu_dll_lock			(ddr1_ctu_dll_lock),
    .ddr1_ctu_dll_overflow		(ddr1_ctu_dll_overflow),
    .ddr2_ctu_dll_lock			(ddr2_ctu_dll_lock),
    .ddr2_ctu_dll_overflow		(ddr2_ctu_dll_overflow),
    .ddr3_ctu_dll_lock			(ddr3_ctu_dll_lock),
    .ddr3_ctu_dll_overflow		(ddr3_ctu_dll_overflow),
    .dft_clsp_nstep_capture_l		(dft_clsp_nstep_capture_l),
    .dft_wake_thr			(dft_wake_thr),
    .dll0_ctu_ctrl			(dll0_ctu_ctrl[4:0]),
    .dll1_ctu_ctrl			(dll1_ctu_ctrl[4:0]),
    .dll2_ctu_ctrl			(dll2_ctu_ctrl[4:0]),
    .dll3_ctu_ctrl			(dll3_ctu_ctrl[4:0]),
    .dram02_ctu_tr			(dram02_ctu_tr),
    .dram13_ctu_tr			(dram13_ctu_tr),
    .dram_gclk				(dram_gclk_int),
    .io_clk_stretch			(io_clk_stretch),
    .io_do_bist				(io_do_bist),
    .io_j_rst_l				(io_j_rst_l),
    .io_pll_char_in			(io_pll_char_in),
    .io_pwron_rst_l			(io_pwron_rst_l),
    .io_tck2				(io_tck2),
    .iob_clsp_data			(iob_clsp_data[`IOB_CLK_WIDTH-1:0]),
    .iob_clsp_stall			(iob_clsp_stall),
    .iob_clsp_vld			(iob_clsp_vld),
    .iob_ctu_l2_tr			(iob_ctu_l2_tr),
    .iob_ctu_tr				(iob_ctu_tr),
    .jbi_ctu_tr				(jbi_ctu_tr),
    .jbus_clk				(jbus_clk),
    .jbus_gclk				(jbus_gclk_int),
    .jbus_rst_l				(jbus_rst_l),
    .jbus_rx_sync			(jbus_rx_sync),
    .jbus_tx_sync			(jbus_tx_sync),
    .jtag_clock_dr			(jtag_clock_dr),
    .jtag_clsp_force_cken_cmp		(jtag_clsp_force_cken_cmp),
    .jtag_clsp_force_cken_dram		(jtag_clsp_force_cken_dram),
    .jtag_clsp_force_cken_jbus		(jtag_clsp_force_cken_jbus),
    .jtag_clsp_ignore_wrm_rst		(jtag_clsp_ignore_wrm_rst),
    .jtag_clsp_sel_cpu			(ctu_sel_cpu[2:0]),
    .jtag_clsp_sel_dram			(ctu_sel_dram[2:0]),
    .jtag_clsp_sel_jbus			(ctu_sel_jbus[2:0]),
    .jtag_clsp_sel_tck2			(jtag_clsp_sel_tck2),
    .jtag_clsp_stop_id			(jtag_clsp_stop_id[5:0]),
    .jtag_clsp_stop_id_vld		(jtag_clsp_stop_id_vld),
    .jtag_nstep_count			(jtag_nstep_count[3:0]),
    .jtag_nstep_domain			(jtag_nstep_domain[2:0]),
    .jtag_nstep_vld			(jtag_nstep_vld),
    .mask_major_id			(mask_major_id[3:0]),
    .mask_minor_id			(mask_minor_id[3:0]),
    .pll_clk_out			(pll_clk_out),
    .pll_clk_out_l			(pll_clk_out_l),
    .pll_clk_out_pre			(pll_clk_out_pre),
    .pll_clk_out_pre_l			(pll_clk_out_pre_l),
    .pll_raw_clk_out			(pll_raw_clk_out),
    .sctag0_ctu_tr			(sctag0_ctu_tr),
    .sctag1_ctu_tr			(sctag1_ctu_tr),
    .sctag2_ctu_tr			(sctag2_ctu_tr),
    .sctag3_ctu_tr			(sctag3_ctu_tr),
    .se					(se),
    .testmode_l				(testmode_l));



   ctu_dft ctu_dft
   (

    .ctu_ddr0_clock_dr			(ctu_ddr0_clock_dr),
    .ctu_ddr0_hiz_l			(ctu_ddr0_hiz_l),
    .ctu_ddr0_mode_ctl			(ctu_ddr0_mode_ctl),
    .ctu_ddr0_shift_dr			(ctu_ddr0_shift_dr),
    .ctu_ddr0_update_dr			(ctu_ddr0_update_dr),
    .ctu_ddr1_clock_dr			(ctu_ddr1_clock_dr),
    .ctu_ddr1_hiz_l			(ctu_ddr1_hiz_l),
    .ctu_ddr1_mode_ctl			(ctu_ddr1_mode_ctl),
    .ctu_ddr1_shift_dr			(ctu_ddr1_shift_dr),
    .ctu_ddr1_update_dr			(ctu_ddr1_update_dr),
    .ctu_ddr2_clock_dr			(ctu_ddr2_clock_dr),
    .ctu_ddr2_hiz_l			(ctu_ddr2_hiz_l),
    .ctu_ddr2_mode_ctl			(ctu_ddr2_mode_ctl),
    .ctu_ddr2_shift_dr			(ctu_ddr2_shift_dr),
    .ctu_ddr2_update_dr			(ctu_ddr2_update_dr),
    .ctu_ddr3_clock_dr			(ctu_ddr3_clock_dr),
    .ctu_ddr3_hiz_l			(ctu_ddr3_hiz_l),
    .ctu_ddr3_mode_ctl			(ctu_ddr3_mode_ctl),
    .ctu_ddr3_shift_dr			(ctu_ddr3_shift_dr),
    .ctu_ddr3_update_dr			(ctu_ddr3_update_dr),
    .ctu_ddr_testmode_l			(ctu_ddr_testmode_l),
    .ctu_debug_clock_dr			(ctu_debug_clock_dr),
    .ctu_debug_hiz_l			(ctu_debug_hiz_l),
    .ctu_debug_mode_ctl			(ctu_debug_mode_ctl),
    .ctu_debug_shift_dr			(ctu_debug_shift_dr),
    .ctu_debug_update_dr		(ctu_debug_update_dr),
    .ctu_efc_capturedr			(ctu_efc_capturedr),
    .ctu_efc_coladdr			(ctu_efc_coladdr[4:0]),
    .ctu_efc_data_in			(ctu_efc_data_in),
    .ctu_efc_dest_sample		(ctu_efc_dest_sample),
    .ctu_efc_fuse_bypass		(ctu_efc_fuse_bypass),
    .ctu_efc_read_en			(ctu_efc_read_en),
    .ctu_efc_read_mode			(ctu_efc_read_mode[2:0]),
    .ctu_efc_rowaddr			(ctu_efc_rowaddr[6:0]),
    .ctu_efc_shiftdr			(ctu_efc_shiftdr),
    .ctu_efc_tck			(ctu_efc_tck),
    .ctu_efc_updatedr			(ctu_efc_updatedr),
    .ctu_fpu_so				(ctu_fpu_so),
    .ctu_global_snap			(ctu_global_snap),
    .ctu_jbusl_clock_dr			(ctu_jbusl_clock_dr),
    .ctu_jbusl_hiz_l			(ctu_jbusl_hiz_l),
    .ctu_jbusl_mode_ctl			(ctu_jbusl_mode_ctl),
    .ctu_jbusl_shift_dr			(ctu_jbusl_shift_dr),
    .ctu_jbusl_update_dr		(ctu_jbusl_update_dr),
    .ctu_jbusr_clock_dr			(ctu_jbusr_clock_dr),
    .ctu_jbusr_hiz_l			(ctu_jbusr_hiz_l),
    .ctu_jbusr_mode_ctl			(ctu_jbusr_mode_ctl),
    .ctu_jbusr_shift_dr			(ctu_jbusr_shift_dr),
    .ctu_jbusr_update_dr		(ctu_jbusr_update_dr),
    .ctu_misc_clock_dr			(ctu_misc_clock_dr),
    .ctu_misc_hiz_l			(ctu_misc_hiz_l),
    .ctu_misc_mode_ctl			(ctu_misc_mode_ctl),
    .ctu_misc_shift_dr			(ctu_misc_shift_dr),
    .ctu_misc_update_dr			(ctu_misc_update_dr),
    .ctu_pads_bso			(ctu_pads_bso),
    .ctu_pads_so			(ctu_pads_so),
    .ctu_pads_sscan_update		(ctu_pads_sscan_update),
    .ctu_sctag0_mbisten			(ctu_sctag0_mbisten),
    .ctu_sctag1_mbisten			(ctu_sctag1_mbisten),
    .ctu_sctag2_mbisten			(ctu_sctag2_mbisten),
    .ctu_sctag3_mbisten			(ctu_sctag3_mbisten),
    .ctu_sel_cpu			(ctu_sel_cpu[2:0]),
    .ctu_sel_dram			(ctu_sel_dram[2:0]),
    .ctu_sel_jbus			(ctu_sel_jbus[2:0]),
    .ctu_spc0_mbisten			(ctu_spc0_mbisten),
    .ctu_spc0_sscan_se			(ctu_spc0_sscan_se),
    .ctu_spc0_tck			(ctu_spc0_tck),
    .ctu_spc1_mbisten			(ctu_spc1_mbisten),
    .ctu_spc1_sscan_se			(ctu_spc1_sscan_se),
    .ctu_spc1_tck			(ctu_spc1_tck),
    .ctu_spc2_mbisten			(ctu_spc2_mbisten),
    .ctu_spc2_sscan_se			(ctu_spc2_sscan_se),
    .ctu_spc2_tck			(ctu_spc2_tck),
    .ctu_spc3_mbisten			(ctu_spc3_mbisten),
    .ctu_spc3_sscan_se			(ctu_spc3_sscan_se),
    .ctu_spc3_tck			(ctu_spc3_tck),
    .ctu_spc4_mbisten			(ctu_spc4_mbisten),
    .ctu_spc4_sscan_se			(ctu_spc4_sscan_se),
    .ctu_spc4_tck			(ctu_spc4_tck),
    .ctu_spc5_mbisten			(ctu_spc5_mbisten),
    .ctu_spc5_sscan_se			(ctu_spc5_sscan_se),
    .ctu_spc5_tck			(ctu_spc5_tck),
    .ctu_spc6_mbisten			(ctu_spc6_mbisten),
    .ctu_spc6_sscan_se			(ctu_spc6_sscan_se),
    .ctu_spc6_tck			(ctu_spc6_tck),
    .ctu_spc7_mbisten			(ctu_spc7_mbisten),
    .ctu_spc7_sscan_se			(ctu_spc7_sscan_se),
    .ctu_spc7_tck			(ctu_spc7_tck),
    .ctu_spc_sscan_tid			(ctu_spc_sscan_tid[3:0]),
    .ctu_tst_macrotest			(ctu_tst_macrotest),
    .ctu_tst_scan_disable		(ctu_tst_scan_disable),
    .ctu_tst_scanmode			(ctu_tst_scanmode),
    .ctu_tst_short_chain		(ctu_tst_short_chain),
    .dft_clsp_nstep_capture_l		(dft_clsp_nstep_capture_l),
    .dft_ctu_scan_disable		(dft_ctu_scan_disable),
    .dft_pin_pscan_l			(dft_pin_pscan_l),
    .dft_pll_arst_l			(dft_pll_arst_l),
    .dft_pll_clamp_fltr			(dft_pll_clamp_fltr),
    .dft_pll_div2			(dft_pll_div2[5:0]),
    .dft_pll_testmode			(dft_pll_testmode),
    .dft_rng_rst_l			(dft_rng_rst_l),
    .dft_rng_vctrl			(dft_rng_vctrl[2:0]),
    .dft_tdo				(dft_tdo),
    .dft_tsr_div			(dft_tsr_div[9:1]),
    .dft_tsr_reset_l			(dft_tsr_reset_l),
    .dft_tsr_tsel			(dft_tsr_tsel[7:0]),
    .dft_wake_thr			(dft_wake_thr),
    .global_scan_bypass_en		(global_scan_bypass_en),
    .global_shift_enable		(global_shift_enable),
    .io_tdo_en				(ctu_io_tdo_en),
    .jtag_clock_dr			(jtag_clock_dr),
    .jtag_clsp_force_cken_cmp		(jtag_clsp_force_cken_cmp),
    .jtag_clsp_force_cken_dram		(jtag_clsp_force_cken_dram),
    .jtag_clsp_force_cken_jbus		(jtag_clsp_force_cken_jbus),
    .jtag_clsp_ignore_wrm_rst		(jtag_clsp_ignore_wrm_rst),
    .jtag_clsp_sel_tck2			(jtag_clsp_sel_tck2),
    .jtag_clsp_stop_id			(jtag_clsp_stop_id[5:0]),
    .jtag_clsp_stop_id_vld		(jtag_clsp_stop_id_vld),
    .jtag_nstep_count			(jtag_nstep_count[3:0]),
    .jtag_nstep_domain			(jtag_nstep_domain[2:0]),
    .jtag_nstep_vld			(jtag_nstep_vld),
    .pll_bypass				(pll_bypass),
    .pscan_select			(pscan_select),
    .rt_ack				(afo_rt_ack),
    .rt_data_out			(afo_rt_data_out[31:0]),
    .tap_iob_data			(tap_iob_data[7:0]),
    .tap_iob_stall			(tap_iob_stall),
    .tap_iob_vld			(tap_iob_vld),
    .testmode_l				(testmode_l),

    .afi_pll_char_mode			(afi_pll_char_mode),
    .afi_pll_clamp_fltr			(afi_pll_clamp_fltr),
    .afi_pll_div2			(afi_pll_div2[5:0]),
    .afi_pll_trst_l			(afi_pll_trst_l),
    .afi_rng_ctl			(afi_rng_ctl[2:0]),
    .afi_tsr_div			(afi_tsr_div[9:1]),
    .afi_tsr_mode			(afi_tsr_mode),
    .afi_tsr_tsel			(afi_tsr_tsel[7:0]),
    .bist_mode_pin			(afi_bist_mode),
    .clsp_bist_ctrl			(clsp_bist_ctrl[5:0]),
    .clsp_bist_dobist			(clsp_bist_dobist),
    .clsp_bist_type			(clsp_bist_type),
    .cmp_clk				(cmp_clk),
    .cmp_rst_l				(cmp_rst_l),
    .cmp_rx_en				(jbus_rx_sync),
    .cmp_tx_en				(jbus_tx_sync),
    .efc_ctu_data_out			(efc_ctu_data_out),
    .io_pwron_rst_l			(io_pwron_rst_l),
    .io_tck				(tck_cts),
    .io_tdi				(io_tdi),
    .io_tms				(io_tms),
    .io_trst_l				(io_trst_l),
    .iob_ctu_coreavail			(iob_ctu_coreavail[`IOB_CPU_WIDTH-1:0]),
    .iob_tap_data			(iob_tap_data[7:0]),
    .iob_tap_stall			(iob_tap_stall),
    .iob_tap_vld			(iob_tap_vld),
    .jbus_clk				(jbus_clk),
    .jbus_rst_l				(jbus_rst_l),
    .jtag_id				(jtag_id[3:0]),
    .pads_ctu_bsi			(pads_ctu_bsi),
    .pads_ctu_si			(pads_ctu_si),
    .pll_bypass_pin			(afi_bypass_mode),
    .pll_reset_ref_l			(pll_reset_ref_l),
    .rt_addr_data			(afi_rt_addr_data),
    .rt_data_in				(afi_rt_data_in[31:0]),
    .rt_high_low			(afi_rt_high_low),
    .rt_read_write			(afi_rt_read_write),
    .rt_valid				(afi_rt_valid),
    .sctag0_ctu_mbistdone		(sctag0_ctu_mbistdone),
    .sctag0_ctu_mbisterr		(sctag0_ctu_mbisterr),
    .sctag1_ctu_mbistdone		(sctag1_ctu_mbistdone),
    .sctag1_ctu_mbisterr		(sctag1_ctu_mbisterr),
    .sctag2_ctu_mbistdone		(sctag2_ctu_mbistdone),
    .sctag2_ctu_mbisterr		(sctag2_ctu_mbisterr),
    .sctag2_ctu_serial_scan_in		(sctag2_ctu_serial_scan_in),
    .sctag3_ctu_mbistdone		(sctag3_ctu_mbistdone),
    .sctag3_ctu_mbisterr		(sctag3_ctu_mbisterr),
    .spc0_ctu_mbistdone			(spc0_ctu_mbistdone),
    .spc0_ctu_mbisterr			(spc0_ctu_mbisterr),
    .spc0_ctu_sscan_out			(spc0_ctu_sscan_out),
    .spc1_ctu_mbistdone			(spc1_ctu_mbistdone),
    .spc1_ctu_mbisterr			(spc1_ctu_mbisterr),
    .spc1_ctu_sscan_out			(spc1_ctu_sscan_out),
    .spc2_ctu_mbistdone			(spc2_ctu_mbistdone),
    .spc2_ctu_mbisterr			(spc2_ctu_mbisterr),
    .spc2_ctu_sscan_out			(spc2_ctu_sscan_out),
    .spc3_ctu_mbistdone			(spc3_ctu_mbistdone),
    .spc3_ctu_mbisterr			(spc3_ctu_mbisterr),
    .spc3_ctu_sscan_out			(spc3_ctu_sscan_out),
    .spc4_ctu_mbistdone			(spc4_ctu_mbistdone),
    .spc4_ctu_mbisterr			(spc4_ctu_mbisterr),
    .spc4_ctu_sscan_out			(spc4_ctu_sscan_out),
    .spc5_ctu_mbistdone			(spc5_ctu_mbistdone),
    .spc5_ctu_mbisterr			(spc5_ctu_mbisterr),
    .spc5_ctu_sscan_out			(spc5_ctu_sscan_out),
    .spc6_ctu_mbistdone			(spc6_ctu_mbistdone),
    .spc6_ctu_mbisterr			(spc6_ctu_mbisterr),
    .spc6_ctu_sscan_out			(spc6_ctu_sscan_out),
    .spc7_ctu_mbistdone			(spc7_ctu_mbistdone),
    .spc7_ctu_mbisterr			(spc7_ctu_mbisterr),
    .spc7_ctu_sscan_out			(spc7_ctu_sscan_out),
    .start_clk_jl			(start_clk_jl),
    .tck_l				(tck_l_cts),
    .test_mode_pin			(io_test_mode));


   bw_rng u_rng (

		 .rng_data		(afo_rng_data),
		 .rng_clk		(afo_rng_clk),

		 .vsup_rng_hv18		(io_vdda_rng),
		 .sel_bg_l		(io_vreg_selbg_l),
		 .vctrl			(dft_rng_vctrl[2:0]),
		 .clk_jbus		(jbus_clk),
		 .rst_l			(dft_rng_rst_l));


  bw_pll u_pll
  (


   .pll_raw_clk_out			(pll_raw_clk_out),
   .pll_vco_out				(),
   .pll_clk_out				(pll_clk_out_pre),
   .pll_clk_out_l			(pll_clk_out_pre_l),
   .pll_char_out			(ctu_io_clkobs[1:0]),

   .pll_sys_clk				({io_j_clk[1],io_j_clk[0]}),
   .pll_bypass				(pll_bypass),
   .pll_arst_l				(dft_pll_arst_l),
   .l2clk				(jbus_gclk_dup),
   .pll_clamp_fltr			(dft_pll_clamp_fltr),
   .pll_div1				(6'b00_0000),
   .pll_div2				(dft_pll_div2[5:0]),
   .pll_div3				(6'b00_0000),
   .vdd_pll				(io_vdda_pll),
   .pll_char_in				(io_pll_char_in),
   .testmode				(dft_pll_testmode),
   .vreg_seldb_l			(io_vreg_selbg_l));


   bw_tsr u_tsr
   (


    .dout				(afo_tsr_dout[7:0]),
    .testio				(ctu_io_tsr_testio[1:0]),
    .i50				(),
    .v0p5				(),

    .vdd_tsr				(io_vdda_tsr),
    .div				(dft_tsr_div[9:1]),
    .clk				(jbus_clk),
    .reset_l				(dft_tsr_reset_l),
    .tsel				(dft_tsr_tsel[7:0]),
    .vreg_selbg_l			(io_vreg_selbg_l));




   bw_clk_cl_ctu_jbus u_jbus_header
   (

    .cluster_grst_l			(jbus_rst_l),
    .dbginit_l				(),
    .rclk				(jbus_clk ),
    .so					(),

    .adbginit_l				(1'b1),
    .arst_l				(io_pwron_rst_l),
    .cluster_cken			(1'b1),
    .gclk				(jbus_gclk ),
    .gdbginit_l				(1'b1),
    .grst_l				(jbus_grst_l),
    .se					(se),
    .si					(1'b0));




   bw_clk_cl_ctu_cmp u_cmp_header
   (

    .cluster_grst_l			(cmp_pre_rst_l),
    .dbginit_l				(),
    .rclk				(cmp_clk ),
    .so					(),

    .adbginit_l				(1'b1),
    .arst_l				(io_pwron_rst_l),
    .cluster_cken			(1'b1),
    .gclk				(cmp_gclk),
    .gdbginit_l				(1'b1),
    .grst_l				(cmp_grst_l),
    .se					(1'b0),
    .si					(1'b0));





    dff_ns u_cmp_header_cmp_rst_pipe1(

				      .q(cmp_grst_pipe1_l),

				      .din(cmp_grst_out_l),
				      .clk(cmp_gclk_int));

    dff_ns u_cmp_header_cmp_rst_pipe2(

				      .q(cmp_grst_pipe2_l),

				      .din(cmp_grst_pipe1_l),
				      .clk(cmp_gclk_int));

    dff_ns u_cmp_header_cmp_rst_pipe3(

				      .q(cmp_grst_l),

				      .din(cmp_grst_pipe2_l),
				      .clk(cmp_gclk_int));



    dffrl_async_ns  u_cmp_header_cmp_rst_l(

					   .q(cmp_rst_l),

					   .din(cmp_pre_rst_l),
					   .clk(cmp_clk),
					   .rst_l(io_pwron_rst_l));




    ctu_sync_header u_sync_header (

				   .ctu_dram_tx_sync_early(ctu_dram_tx_sync_early),
				   .jbus_rx_sync(jbus_rx_sync),
				   .jbus_tx_sync(jbus_tx_sync),
				   .so	(),

				   .cmp_clk(cmp_clk),
				   .cmp_gclk(cmp_gclk_int),
				   .ctu_dram_tx_sync(ctu_dram_tx_sync_out),
				   .ctu_jbus_rx_sync(ctu_jbus_rx_sync_out),
				   .ctu_jbus_tx_sync(ctu_jbus_tx_sync_out),
				   .se	(se),
				   .si	(1'b0),
				   .start_clk_early_jl(start_clk_early_jl));



    bw_u1_ckbuf_30x u_tck_dr (

			      .clk	(tck_cts),

			      .rclk	(io_tck));



    bw_u1_inv_30x u_tck_l_dr (

			      .z	(tck_l_cts),

			      .a	(io_tck));






    bw_u1_ckbuf_40x u_cmp_gclk_dr (

				   .clk	(cmp_gclk_int),

				   .rclk(cmp_gclk_cts));




    bw_u1_ckbuf_30x u_jbus_gclk_dr (

				    .clk(jbus_gclk_int),

				    .rclk(jbus_gclk_cts));



    bw_u1_ckbuf_30x u_dram_gclk_dr (

				    .clk(dram_gclk_int),

				    .rclk(dram_gclk_cts));

  
  



      bw_clk_cl_ctu_2xcmp u_pll_clkdr0 (

					.bw_pll_2x_clk_local(pll_clk_out),

					.bw_pll_2xclk(pll_clk_out_pre));


      bw_clk_cl_ctu_2xcmp_b u_pll_clkdr1 (

					  .bw_pll_2x_clk_local_b(pll_clk_out_l),

					  .bw_pll_2xclk_b(pll_clk_out_pre_l));



/

ctu_test_stub_scan u_test_stub (
			        .long_chain_so_0      (MT_long_chain_so_0),



				.se	(se),
				.so_0	(ctu_io_tdo),

				.global_shift_enable(global_shift_enable),
				.ctu_tst_scan_disable(dft_ctu_scan_disable),
				.ctu_tst_short_chain(dft_pin_pscan_l),
				.short_chain_so_0(dft_tdo));
           
/

			 .jtag_id	(jtag_id[3:0]),
			 .mask_major_id	(mask_major_id[3:0]),
			 .mask_minor_id	(mask_minor_id[3:0]));

endmodule