// ========== Copyright Header Begin ==========================================
// 
// OpenSPARC T1 Processor File: swrvr_clib.v
// Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
// 
// The above named program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License version 2 as published by the Free Software Foundation.
// 
// The above named program is distributed in the hope that it will be 
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
// 
// You should have received a copy of the GNU General Public
// License along with this work; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
// 
// ========== Copyright Header End ============================================
///////////////////////////////////////////////////////////////////////
/*
//
//  Module Name: swrvr_clib.v
//      Description: Design control behavioural library
*/                 

`ifdef FPGA_SYN 
`define NO_SCAN 
`endif

// POSITVE-EDGE TRIGGERED FLOP with SCAN
[Up: sctag_tagdp_ctl ff_evict_c3_1][Up: sctag_tagdp_ctl ff_evict_c3_2][Up: sctag_tagdp_ctl ff_tagdp_par_err_c3][Up: sctag_tagdp_ctl ff_tagdp_par_err_c3_2][Up: sctag_tagdp_ctl ff_tagdp_mbctl_par_err_c3][Up: sctag_tagdp_ctl ff_tagdp_tagctl_par_err_c3][Up: sctag_tagdp_ctl ff_tagdp_arbctl_par_err_c3][Up: sctag_tagdp_ctl ff_tagdp_par_err_c4][Up: sctag_tagdp_ctl ff_tagdp_par_err_c5][Up: sctag_tagdp_ctl ff_tag_error_c6][Up: sctag_tagdp_ctl ff_tag_error_c7][Up: sctag_tagdp_ctl ff_tag_error_c8][Up: sctag_tagdp_ctl ff_l2_dir_map_on_d1][Up: sctag_tagdp_ctl ff_diag_way_c3][Up: sctag_tagdp_ctl ff_diag_way_c4][Up: sctag_tagdp_ctl ff_lru_quad_muxsel_c2][Up: sctag_tagdp_ctl ff_bist_way_c1][Up: sctag_tagdp_ctl ff_bist_way_c2][Up: sctag_tagdp_ctl ff_bist_enable_c1][Up: sctag_tagdp_ctl ff_bist_enable_c2][Up: sctag_tagdp_ctl ff_use_dec_sel_c3][Up: sctag_tagdp_ctl ff_tag_triad0_muxsel_c2][Up: sctag_tagdp_ctl ff_tag_triad1_muxsel_c2][Up: sctag_tagdp_ctl ff_tag_triad2_muxsel_c2][Up: sctag_tagdp_ctl ff_tag_triad3_muxsel_c2][Up: sctag_tagdp_ctl ff_dir_quad_way_c3][Up: sctag_tagdp_ctl ff_lru_state][Up: sctag_tagdp_ctl ff_lru_state_triad0][Up: sctag_tagdp_ctl ff_lru_state_triad1][Up: sctag_tagdp_ctl ff_lru_state_triad2][Up: sctag_tagdp_ctl ff_lru_state_triad3][Up: sctag_tagdp_ctl ff_spec_alloc_c3]... (truncated)
module dffIndex (din, clk, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk or scan clk

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

`ifdef NO_SCAN
always @ (posedge clk)
  q[SIZE-1:0]  <= din[SIZE-1:0] ;
`else

always @ (posedge clk)

	q[SIZE-1:0]  <= (se) ? si[SIZE-1:0]  : din[SIZE-1:0] ;

assign so[SIZE-1:0] = q[SIZE-1:0] ;

`endif

endmodule // dff

// POSITVE-EDGE TRIGGERED FLOP with SCAN for Shadow-scan
module dff_sscanIndex (din, clk, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk or scan clk

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

`ifdef CONNECT_SHADOW_SCAN

always @ (posedge clk)

	q[SIZE-1:0]  <= (se) ? si[SIZE-1:0]  : din[SIZE-1:0] ;

assign so[SIZE-1:0] = q[SIZE-1:0] ;

`else
always @ (posedge clk)
  q[SIZE-1:0]  <= din[SIZE-1:0] ;

assign so={SIZE{1'b0}};
`endif

endmodule // dff

// POSITVE-EDGE TRIGGERED FLOP without SCAN
[Up: ctu_dft_bist u_dff_clsp_bist_dobist_ff][Up: ctu_dft_bist u_dff_clsp_bist_type_ff][Up: ctu_dft_bist u_dff_clsp_bist_ctrl_ff][Up: ctu_dft_bist u_dffrl_clsp_bist_dobist_d1][Up: ctu_dft_bist u_dffrl_jtag_bist_serial_c_d1][Up: ctu_dft_bist u_dffrl_jtag_bist_parallel_c_d1][Up: ctu_dft_bist u_dff_mbistdone_ff][Up: ctu_dft_bist u_dff_mbistdone_d1][Up: ctu_dft_bist u_dff_mbisterr_ff][Up: jbi_sctrdq_fifo rd_enb_reg][Up: jbi_sctrdq_fifo wr_addr_sync_reg][Up: jbi_sctrdq_fifo rd_addr_presync_reg][Up: jbi_sctrdq_fifo rd_addr_sync_reg][Up: jbi_dbg_ctl_qctl u_dff_wptr_d1][Up: ctu_clsp_ctrl u_clkctrl_dn_jl][Up: ctu_clsp_ctrl u_ctu_io_j_err_jl][Up: ctu_clsp_ctrl u_ctu_efc_read_start_nxt][Up: ctu_clsp_ctrl u_ctu_iob_wake_thr][Up: ctu_clsp_ctrl u_jbus_grst_jl_l_dly1][Up: ctu_clsp_ctrl u_jbus_grst_jl_l_dly2][Up: i2c_fctrl int_buf_empty_prev_ff][Up: i2c_fctrl io_buf_empty_prev_ff][Up: jbi_ncio_prqq_ctl u_dff_entry_wptr_d1][Up: ucb_flow_spi buf_head_ff][Up: ucb_flow_spi buf_tail_ff][Up: jbi_j_pack_out_gen u_dff_ctu_jbi_tx_en_mout_ff][Up: jbi_j_pack_out_gen sctag_req_p1_reg][Up: jbi_j_pack_out_gen sctag_req_sync_reg][Up: jbi_min_rq_rhq_ctl u_dff_cpu_rx_en_d1][Up: jbi_min_rq_rhq_ctl u_dff_l2_timeout_cnt][Up: jbi_ssi_ucbif u_dff_io_jbi_ext_int_l_pre_sync][Up: jbi_ssi_ucbif u_dff_io_jbi_ext_int_l_sync]... (truncated)
module dff_nsIndex (din, clk, q);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk

output	[SIZE-1:0]	q ;	// output

reg 	[SIZE-1:0]	q ;

always @ (posedge clk)

	q[SIZE-1:0]  <= din[SIZE-1:0] ;

endmodule // dff_ns

// POSITIVE-EDGE TRIGGERED FLOP with SCAN, RESET
[Up: spu_maexp rde_state_ff][Up: spu_maexp gotomulred1_state_ff][Up: spu_maexp echk_state_ff][Up: spu_maexp gotomulred2_state_ff][Up: spu_maexp esmax_state_ff][Up: sparc_exu_rml_cwp slot0_data_dff][Up: sparc_exu_rml_cwp slot1_data_dff][Up: sparc_exu_rml_cwp slot2_data_dff][Up: sparc_exu_rml_cwp slot3_data_dff][Up: sparc_exu_rml_cwp can_swap_flop][Up: spu_lsurpt1 ldxa_vld_ff][Up: spu_lsurpt1 illgl_va_ff][Up: sparc_ifu_thrcmpl wmi_ff][Up: sparc_ifu_thrcmpl wmo_ff][Up: tlu_misctl dffr_tlu_exu_pic_onebelow_m][Up: tlu_misctl dffr_tlu_exu_pic_twobelow_m][Up: sparc_ifu_swl enspec_ff][Up: sparc_ifu_swl mulb_ff][Up: sparc_ifu_swl divb_ff][Up: sparc_ifu_swl fpb_ff][Up: sparc_ifu_swl tfbe_ff][Up: sparc_ifu_swl mw_ff][Up: sparc_ifu_swl dw_ff][Up: sparc_ifu_swl fw_ff][Up: sparc_ifu_swl stbw_reg][Up: fpu_div_ctl i_d1stg_op][Up: fpu_div_ctl i_d1stg_div][Up: fpu_div_ctl i_d2stg_opdec][Up: fpu_div_ctl i_d234stg_fdiv][Up: fpu_div_ctl i_d3stg_opdec][Up: fpu_div_ctl i_d4stg_opdec][Up: fpu_div_ctl i_d6stg_opdec]... (truncated)
module dffrIndex (din, clk, rst, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk or scan clk
input			rst ;	// reset

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

`ifdef NO_SCAN
always @ (posedge clk)
	q[SIZE-1:0]  <= ((rst) ? {SIZE{1'b0}}  : din[SIZE-1:0] );
`else

// Scan-Enable dominates
always @ (posedge clk)

	q[SIZE-1:0]  <= se ? si[SIZE-1:0] : ((rst) ? {SIZE{1'b0}}  : din[SIZE-1:0] );

assign so[SIZE-1:0] = q[SIZE-1:0] ;
`endif

endmodule // dffr

// POSITIVE-EDGE TRIGGERED FLOP with SCAN, RESET_L
[Up: sctag_fbctl ff_valid_bit][Up: sctag_fbctl ff_bypassed][Up: sctag_fbctl ff_way_vld][Up: sctag_fbctl ff_fb_l2_ready][Up: sctag_fbctl ff_l2_wait][Up: sctag_fbctl ff_fb_next_link_vld][Up: sctag_fbctl ff_fb_cerr][Up: sctag_fbctl ff_fb_uerr][Up: sctag_fbctl ff_fb_uerr_pend][Up: sctag_fbctl ff_fb_cerr_pend][Up: sctag_fbctl ff_fb_tecc_pend][Up: sctag_snpctl ff_wr_ptr][Up: sctag_snpctl ff_rdmad_wr_entry_s2_d1][Up: sctag_snpctl ff_snp_valid][Up: sctag_snpctl ff_rd_ptr][Up: sctag_arbctl ff_gate_off_prim_req_state][Up: sctag_arbctl ff_arbctl_inst_vld_c1_1][Up: sctag_csr ff_csr_l2_errinj_d1][Up: sctag_oqctl ff_inc_wr_ptr_d1][Up: sctag_oqctl ff_inc_wr_ptr_d1_1][Up: sctag_oqctl ff_inc_wr_ptr_d1_2][Up: sctag_oqctl ff_wr_ptr15to1_d1][Up: sctag_oqctl ff_wr_ptr0_d1][Up: sctag_oqctl ff_inc_rd_ptr_d1][Up: sctag_oqctl ff_inc_rd_ptr_d1_1][Up: sctag_oqctl ff_inc_rd_ptr_d1_2][Up: sctag_oqctl ff_rd_ptr15to1_d1][Up: sctag_oqctl ff_rd_ptr0_d1][Up: sctag_oqctl ff_oq_cnt_d1][Up: sctag_oqctl ff_rdma_req_state_0][Up: sctag_oqctl ff_rdma_state][Up: sctag_mbctl ff_mb_idx_count_full_c5]... (truncated)
module dffrlIndex (din, clk, rst_l, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk or scan clk
input			rst_l ;	// reset

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

`ifdef NO_SCAN
always @ (posedge clk)
	q[SIZE-1:0]  <= rst_l ? din[SIZE-1:0] : {SIZE{1'b0}};
`else

// Reset dominates
always @ (posedge clk)

	q[SIZE-1:0]  <= rst_l ? ((se) ? si[SIZE-1:0]  : din[SIZE-1:0] ) : {SIZE{1'b0}};

assign so[SIZE-1:0] = q[SIZE-1:0] ;
`endif

endmodule // dffr_l

// POSITIVE-EDGE TRIGGERED FLOP with RESET, without SCAN
module dffr_nsIndex (din, clk, rst, q);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk
input			rst ;	// reset

output	[SIZE-1:0]	q ;	// output

reg 	[SIZE-1:0]	q ;

// synopsys sync_set_reset "rst"
always @ (posedge clk)
  q[SIZE-1:0] <= rst ? {SIZE{1'b0}} : din[SIZE-1:0];
   
endmodule // dffr_ns

// POSITIVE-EDGE TRIGGERED FLOP with RESET_L, without SCAN
[Up: ctu_dft_bist u_dffrl_wake_thr_j][Up: ctu_dft_bist u_dffrl_abort_done_j][Up: ctu_dft_bist u_dffrl_mbist_done_j][Up: ctu_dft_bist u_dffrl_mbist_err_j][Up: ctu_dft_bist u_dffrl_bist_sm][Up: ctu_dft_bist u_dffrl_bist_spc_done][Up: ctu_dft_bist u_dffrl_bist_sctag_done][Up: ctu_dft_bist u_dffrl_bist_cnt][Up: ctu_dft_bist u_dffrl_bist_ctrl_cnt][Up: ctu_dft_bist u_dffrl_doing_rst_bist][Up: ctu_dft_bist u_dffrl_wake_thr][Up: ctu_dft_bist u_dffrl_abort_done][Up: ctu_dft_bist u_dffrl_ctu_mbisten][Up: ctu_dft_bist u_dffrl_abort_done_jreg][Up: jbi_sctrdq_fifo ram_wr_addr_m1_reg][Up: jbi_sctrdq_fifo ram_rd_addr_reg][Up: jbi_dbg_ctl_qctl u_dffrl_rptr][Up: jbi_dbg_ctl_qctl u_dffrl_wptr][Up: jbi_dbg_ctl_qctl u_dffrl_level][Up: jbi_dbg_ctl_qctl u_dffrl_prev_overflow][Up: ctu_clsp_ctrl u_de_dll_rst_dn][Up: ctu_clsp_ctrl u_do_bist_pin_ff][Up: ctu_clsp_ctrl u_do_bist_cnt_enable][Up: ctu_clsp_ctrl u_do_bist_cnt][Up: ctu_clsp_ctrl u_dram_rstcnt][Up: ctu_clsp_ctrl u_startclk_cnt][Up: ctu_clsp_ctrl u_efc_rdcnt][Up: i2c_fctrl cpx_iob_grant_ff][Up: i2c_fctrl int_buf_head_prev_ff][Up: i2c_fctrl int_buf_vld_ff][Up: i2c_fctrl io_buf_head_prev_ff][Up: i2c_fctrl io_buf_vld_ff]... (truncated)
module dffrl_nsIndex (din, clk, rst_l, q);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			clk ;	// clk
input			rst_l ;	// reset

output	[SIZE-1:0]	q ;	// output

reg 	[SIZE-1:0]	q ;

// synopsys sync_set_reset "rst_l"
always @ (posedge clk)
  q[SIZE-1:0] <= rst_l ? din[SIZE-1:0] : {SIZE{1'b0}};

endmodule // dffrl_ns

// POSITIVE-EDGE TRIGGERED FLOP with SCAN and FUNCTIONAL ENABLE
[Up: sctag_dirrep ff_tagdp_lkup_addr11_c5][Up: spu_lsurpt1 pcx_ff][Up: spu_lsurpt1 pcx_7170_ff][Up: sctag_fbctl ff_stinst_0][Up: sctag_fbctl ff_stinst_1][Up: sctag_fbctl ff_stinst_2][Up: sctag_fbctl ff_stinst_3][Up: sctag_fbctl ff_stinst_4][Up: sctag_fbctl ff_stinst_5][Up: sctag_fbctl ff_stinst_6][Up: sctag_fbctl ff_stinst_7][Up: sctag_fbctl ff_way0][Up: sctag_fbctl ff_way1][Up: sctag_fbctl ff_way2][Up: sctag_fbctl ff_way3][Up: sctag_fbctl ff_way4][Up: sctag_fbctl ff_way5][Up: sctag_fbctl ff_way6][Up: sctag_fbctl ff_way7][Up: sctag_fbctl ff_l2_entry_px2][Up: sctag_fbctl ff_l2_way_px2][Up: sctag_fbctl ff_ld64_fb_hit_c12][Up: tlu_misctl dffe_sscan_tt0_data][Up: tlu_misctl dffe_sscan_tt1_data][Up: tlu_misctl dffe_sscan_tt2_data][Up: tlu_misctl dffe_sscan_tt3_data][Up: lsu_dctl dtag_hold][Up: lsu_dctl asiv_thrd0_sec][Up: lsu_dctl asiv_thrd1_sec][Up: lsu_dctl asiv_thrd2_sec][Up: lsu_dctl asiv_thrd3_sec][Up: lsu_dctl asiq_fifo_0]... (truncated)
module dffeIndex (din, en, clk, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			en ;	// functional enable
input			clk ;	// clk or scan clk

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

// Enable Interpretation. Ultimate interpretation depends on design
// 
// en	se	out
//------------------
// x	1	sin ; scan dominates
// 1  	0	din
// 0 	0	q
//

`ifdef NO_SCAN
always @ (posedge clk)
	q[SIZE-1:0]  <= ((en) ? din[SIZE-1:0] : q[SIZE-1:0]) ;
`else

always @ (posedge clk)

	q[SIZE-1:0]  <= (se) ? si[SIZE-1:0]  : ((en) ? din[SIZE-1:0] : q[SIZE-1:0]) ;

assign so[SIZE-1:0] = q[SIZE-1:0] ;
`endif

endmodule // dffe

// POSITIVE-EDGE TRIGGERED FLOP with enable, without SCAN
[Up: jbi_sctrdq_fifo wr_addr_presync_reg][Up: ucb_flow_spi buf_empty_ff][Up: ucb_flow_spi buf0_ff][Up: ucb_flow_spi buf1_ff][Up: ucb_flow_spi ack_buf_is_nack_ff][Up: ucb_flow_spi ack_buf_is_data128_ff][Up: ucb_flow_spi ack_buf_ff][Up: ucb_flow_spi int_buf_ff][Up: jbi_j_pack_out_gen sctag_req_presync_reg][Up: jbi_sctrdq data_in_w0_reg][Up: jbi_sctrdq data_in_w1_reg][Up: jbi_sctrdq data_in_w2_reg][Up: c2i_sdp pcx_packet_ff][Up: ctu_clsp_clkgn_fstlog u_clk_stretch_trig][Up: iobdg_1r2w_vec dout_vec_ff][Up: jbi_csr jbi_config_reg_49_48][Up: jbi_csr jbi_config_reg_31_28][Up: jbi_csr jbi_config_reg_27_22][Up: jbi_csr jbi_log_enb_reg_28][Up: jbi_csr jbi_log_enb_reg_27][Up: jbi_csr jbi_log_enb_reg_26][Up: jbi_csr jbi_log_enb_reg_25][Up: jbi_csr jbi_log_enb_reg_24][Up: jbi_csr jbi_log_enb_reg_17][Up: jbi_csr jbi_log_enb_reg_16][Up: jbi_csr jbi_log_enb_reg_15][Up: jbi_csr jbi_log_enb_reg_14][Up: jbi_csr jbi_log_enb_reg_13][Up: jbi_csr jbi_log_enb_reg_12][Up: jbi_csr jbi_log_enb_reg_11][Up: jbi_csr jbi_log_enb_reg_10][Up: jbi_csr jbi_log_enb_reg_9]... (truncated)
module dffe_nsIndex (din, en, clk, q);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			en ;	// functional enable
input			clk ;	// clk

output	[SIZE-1:0]	q ;	// output

reg 	[SIZE-1:0]	q ;

always @ (posedge clk)
  q[SIZE-1:0] <= en ? din[SIZE-1:0] : q[SIZE-1:0];

endmodule // dffe_ns

// POSITIVE-EDGE TRIGGERED FLOP with RESET, FUNCTIONAL ENABLE, SCAN.
[Up: spu_maexp spu_maexp_done_ff][Up: sctag_fbctl ff_fb_count][Up: sctag_fbctl ff_nofill_0][Up: sctag_fbctl ff_nofill_1][Up: sctag_fbctl ff_nofill_2][Up: sctag_fbctl ff_nofill_3][Up: sctag_fbctl ff_nofill_4][Up: sctag_fbctl ff_nofill_5][Up: sctag_fbctl ff_nofill_6][Up: sctag_fbctl ff_nofill_7][Up: sctag_fbctl ff_dram_cnt][Up: sctag_snpctl ff_winv_rq_active_s2][Up: sctag_snpctl ff_snpiq_cnt][Up: sctag_snpctl ff_winv_rq_active_s2_1][Up: sctag_arbctl ff_tag_ecc_fsm_count][Up: sctag_arbctl ff_dir_addr_cnt][Up: sctag_arbctl ff_arbctl_inst_vld_c1][Up: lsu_dctl twr_stgd1][Up: lsu_dctl blderr_ff][Up: lsu_dctl asiv_thrd0][Up: lsu_dctl asiv_thrd1][Up: lsu_dctl asiv_thrd2][Up: lsu_dctl asiv_thrd3][Up: lsu_dctl asiqv_fifo_0][Up: lsu_dctl asiqv_fifo_1][Up: lsu_dctl asiqv_fifo_2][Up: lsu_dctl asiqv_fifo_3][Up: lsu_dctl tlbpnd][Up: lsu_dctl bsync_vld0][Up: lsu_dctl bsync_vld1][Up: lsu_dctl bsync_vld2][Up: lsu_dctl bsync_vld3]... (truncated)
module dffreIndex (din, rst, en, clk, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			en ;	// functional enable
input			rst ;	// reset
input			clk ;	// clk or scan clk

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

// Enable Interpretation. Ultimate interpretation depends on design
// 
// rst	en	se	out
//------------------
// 1	x	x	0   ; reset dominates
// 0	x	1	sin ; scan dominates
// 0	1  	0	din
// 0 	0 	0	q
//

`ifdef NO_SCAN
always @ (posedge clk)
	q[SIZE-1:0]  <= (rst ? {SIZE{1'b0}} : ((en) ? din[SIZE-1:0] : q[SIZE-1:0])) ;
`else

always @ (posedge clk)

//	q[SIZE-1:0]  <= rst ? {SIZE{1'b0}} : ((se) ? si[SIZE-1:0]  : ((en) ? din[SIZE-1:0] : q[SIZE-1:0])) ;
	q[SIZE-1:0]  <= se ? si[SIZE-1:0]  : (rst ? {SIZE{1'b0}} : ((en) ? din[SIZE-1:0] : q[SIZE-1:0])) ;

assign so[SIZE-1:0] = q[SIZE-1:0] ;

`endif

endmodule // dffre

// POSITIVE-EDGE TRIGGERED FLOP with RESET_L, FUNCTIONAL ENABLE, SCAN.
[Up: sctag_oqctl ff_xbar0][Up: sctag_oqctl ff_xbar1][Up: sctag_oqctl ff_xbar2][Up: sctag_oqctl ff_xbar3][Up: sctag_oqctl ff_xbar4][Up: sctag_oqctl ff_xbar5][Up: sctag_oqctl ff_xbar6][Up: sctag_oqctl ff_xbar7]
module dffrleIndex (din, rst_l, en, clk, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			en ;	// functional enable
input			rst_l ;	// reset
input			clk ;	// clk or scan clk

output	[SIZE-1:0]	q ;	// output

input			se ;	// scan-enable
input	[SIZE-1:0]	si ;	// scan-input
output	[SIZE-1:0]	so ;	// scan-output

reg 	[SIZE-1:0]	q ;

// Enable Interpretation. Ultimate interpretation depends on design
// 
// rst	en	se	out
//------------------
// 0	x	x	0   ; reset dominates
// 1	x	1	sin ; scan dominates
// 1	1  	0	din
// 1 	0 	0	q
//

`ifdef NO_SCAN
always @ (posedge clk)
	 q[SIZE-1:0]  <= (rst_l ? ((en) ? din[SIZE-1:0] : q[SIZE-1:0]) : {SIZE{1'b0}}) ;
`else

always @ (posedge clk)

//	q[SIZE-1:0]  <= rst_l ? ((se) ? si[SIZE-1:0]  : ((en) ? din[SIZE-1:0] : q[SIZE-1:0])) : {SIZE{1'b0}} ;
	q[SIZE-1:0]  <= se ? si[SIZE-1:0]  : (rst_l ? ((en) ? din[SIZE-1:0] : q[SIZE-1:0]) : {SIZE{1'b0}}) ;

assign so[SIZE-1:0] = q[SIZE-1:0] ;
`endif

endmodule // dffrle

// POSITIVE-EDGE TRIGGERED FLOP with RESET, ENABLE, without SCAN.
module dffre_nsIndex (din, rst, en, clk, q);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			en ;	// functional enable
input			rst ;	// reset
input			clk ;	// clk

output	[SIZE-1:0]	q ;	// output

reg 	[SIZE-1:0]	q ;

// Enable Interpretation. Ultimate interpretation depends on design
// 
// rst	en	out
//------------------
// 1	x	0   ; reset dominates
// 0	1  	din
// 0 	0 	q
//

// synopsys sync_set_reset "rst"
always @ (posedge clk)
  q[SIZE-1:0] <= rst ? {SIZE{1'b0}} : ((en) ? din[SIZE-1:0] : q[SIZE-1:0]);

endmodule // dffre_ns

// POSITIVE-EDGE TRIGGERED FLOP with RESET_L, ENABLE, without SCAN.
[Up: ctu_dft_bist u_dffrle_clsp_bist_dobist_c][Up: ctu_dft_bist u_dffrle_clsp_bist_type_c][Up: ctu_dft_bist u_dffrle_clsp_bist_ctrl_c][Up: ctu_dft_bist u_dffrle_wake_thr_tx][Up: ctu_dft_bist u_dffrle_abort_done_tx][Up: ctu_dft_bist u_dffrle_mbistdone_tx][Up: ctu_dft_bist u_dffrle_mbisterr_tx][Up: ctu_dft_bist u_dffrle_jtag_bist_serial_c][Up: ctu_dft_bist u_dffrle_jtag_bist_parallel_c][Up: ctu_dft_bist u_dffrle_jtag_bist_active_c][Up: ctu_dft_bist u_dffrle_jtag_bist_abort_c][Up: ctu_dft_bist u_dffrle_bist_ctrl][Up: ctu_clsp_ctrl u_do_bist_pin][Up: ctu_clsp_ctrl u_do_bist_type][Up: ctu_clsp_ctrl u_do_bist_ctrl_5][Up: ctu_clsp_ctrl u_do_bist_ctrl_4][Up: ctu_clsp_ctrl u_do_bist_ctrl_3][Up: ctu_clsp_ctrl u_do_bist_ctrl_2][Up: ctu_clsp_ctrl u_do_bist_ctrl_1][Up: ctu_clsp_ctrl u_do_bist_ctrl_0][Up: i2c_fctrl int_buf_tail_ff][Up: i2c_fctrl io_buf_head_f_ff][Up: i2c_fctrl io_buf_tail_ff][Up: jbi_jid_to_yid_pool used_jids_reg00][Up: jbi_jid_to_yid_pool used_jids_reg01][Up: jbi_jid_to_yid_pool used_jids_reg02][Up: jbi_jid_to_yid_pool used_jids_reg03][Up: jbi_jid_to_yid_pool used_jids_reg04][Up: jbi_jid_to_yid_pool used_jids_reg05][Up: jbi_jid_to_yid_pool used_jids_reg06][Up: jbi_jid_to_yid_pool used_jids_reg07][Up: jbi_jid_to_yid_pool used_jids_reg08]... (truncated)
module dffrle_nsIndex (din, rst_l, en, clk, q);
// synopsys template

parameter SIZE = 1;

input	[SIZE-1:0]	din ;	// data in
input			en ;	// functional enable
input			rst_l ;	// reset
input			clk ;	// clk

output	[SIZE-1:0]	q ;	// output

reg 	[SIZE-1:0]	q ;

// Enable Interpretation. Ultimate interpretation depends on design
// 
// rst	en	out
//------------------
// 0	x	0   ; reset dominates
// 1	1  	din
// 1 	0 	q
//

// synopsys sync_set_reset "rst_l"
always @ (posedge clk)
  q[SIZE-1:0] <= rst_l ? ((en) ? din[SIZE-1:0] : q[SIZE-1:0]) : {SIZE{1'b0}} ;

endmodule // dffrle_ns

// POSITIVE-EDGE TRIGGERED FLOP with SCAN, and ASYNC RESET
module dffr_asyncIndex (din, clk, rst, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   rst ;   // reset

output  [SIZE-1:0]      q ;     // output

input                   se ;    // scan-enable
input   [SIZE-1:0]      si ;    // scan-input
output  [SIZE-1:0]      so ;    // scan-output

reg     [SIZE-1:0]      q ;

`ifdef NO_SCAN
always @ (posedge clk or posedge rst)
	q[SIZE-1:0]  <= rst ? {SIZE{1'b0}} : din[SIZE-1:0];
`else

// Reset dominates
always @ (posedge clk or posedge rst)
  q[SIZE-1:0]  <= rst ? {SIZE{1'b0}} : ((se) ? si[SIZE-1:0]  : din[SIZE-1:0] );

assign so[SIZE-1:0] = q[SIZE-1:0] ;

`endif

endmodule // dffr_async

// POSITIVE-EDGE TRIGGERED FLOP with SCAN, and ASYNC RESET_L
[Up: sctag_tagdp_ctl reset_flop][Up: sctag_mbist reset_flop][Up: ccx_arbctl ff_rstl][Up: ccx_arbctl ff_rstl2][Up: sctag_fbctl reset_flop][Up: sctag_snpctl reset_flop][Up: sctag_arbctl reset_flop][Up: sparc_ifu_swl rstff][Up: lsu_dctl rstff][Up: sctag_csr reset_flop][Up: fpu_div_ctl dffrl_div_ctl][Up: sctag_oqctl reset_flop][Up: spu_mactl ma_enc_rst][Up: fpu_in_ctl dffrl_in_ctl][Up: fpu_mul_ctl dffrl_mul_ctl][Up: tlu_tcl dffrl_local_rst_l][Up: cmp_top flop_ddr0_oe][Up: cmp_top flop_ddr1_oe][Up: cmp_top flop_ddr2_oe][Up: cmp_top flop_ddr3_oe][Up: cmp_sram_redhdr dshift_dly1_reg][Up: cmp_sram_redhdr dshift_dly2_reg][Up: cmp_sram_redhdr wren_reg][Up: sparc_mul_top rstff][Up: tlu_pib dffrl_local_rst_l][Up: sctag_mbctl reset_flop][Up: lsu_qctl1 rstff][Up: sctag_iqctl reset_flop][Up: lsu_stb_ctl rstff][Up: tlu_hyperv dffrl_local_rst_l][Up: dram_pad_logic ff_cnt_en_d2][Up: dram_pad_logic ff_pos_cnt0]... (truncated)
module dffrl_asyncIndex (din, clk, rst_l, q, se, si, so);
// synopsys template

parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   rst_l ;   // reset

output  [SIZE-1:0]      q ;     // output

input                   se ;    // scan-enable
input   [SIZE-1:0]      si ;    // scan-input
output  [SIZE-1:0]      so ;    // scan-output

reg     [SIZE-1:0]      q ;

`ifdef NO_SCAN
always @ (posedge clk or negedge rst_l)
	q[SIZE-1:0]  <= (!rst_l) ? {SIZE{1'b0}} : din[SIZE-1:0];
`else

// Reset dominates
always @ (posedge clk or negedge rst_l)
  q[SIZE-1:0]  <= (!rst_l) ? {SIZE{1'b0}} : ((se) ? si[SIZE-1:0]  : din[SIZE-1:0] );

assign so[SIZE-1:0] = q[SIZE-1:0] ;

`endif

endmodule // dffrl_async

// POSITIVE-EDGE TRIGGERED FLOP with ASYNC RESET, without SCAN
//module dffr_async_ns (din, clk, rst, q);
//// synopsys template
//parameter SIZE = 1;
//input   [SIZE-1:0]      din ;   // data in
//input                   clk ;   // clk or scan clk
//input                   rst ;   // reset
//output  [SIZE-1:0]      q ;     // output
//reg     [SIZE-1:0]      q ;
// Reset dominates
//// synopsys async_set_reset "rst"
//always @ (posedge clk or posedge rst)
//        if(rst) q[SIZE-1:0]  <= {SIZE{1'b0}};
//        else if(clk) q[SIZE-1:0]  <= din[SIZE-1:0];
//endmodule // dffr_async_ns

// POSITIVE-EDGE TRIGGERED FLOP with ASYNC RESET_L, without SCAN
[Up: ctu_clsp_ctrl u_j_rst_l][Up: ctu_clsp_ctrl u_j_rst_l_1sht][Up: ctu_clsp_ctrl u_j_rst_l_1sht_dly][Up: ctu_clsp_ctrl u_ctrlsm_13_1][Up: ctu_clsp_ctrl u_start_early_2clk_jl][Up: ctu_clsp_ctrl u_start_early_clk_jl][Up: ctu_clsp_ctrl u_start_clk_jl][Up: ctu_clsp_ctrl u_creg_cken_vld_jl][Up: ctu_clsp_ctrl u_ssiclk_enable][Up: ctu_clsp_ctrl u_wrm_rst][Up: ctu_clsp_ctrl u_tst_rst][Up: ctu_clsp_ctrl u_wrm_rst_fc][Up: ctu_clsp_ctrl u_clsp_bist_dobist][Up: ctu_clsp_ctrl u_update_shadow_jl][Up: ctu_clsp_ctrl u_dll_rst_l][Up: ctu_clsp_ctrl u_ctu_tst_pre_grst_l][Up: ctu_clsp_ctrl u_a_grst_jl][Up: ctu_clsp_ctrl u_dram_a_grst_jl][Up: ctu_clsp_ctrl u_rstctrl_idle_jl][Up: ctu_clsp_ctrl u_frq_change][Up: ctu_clsp_ctrl u_freq_change_stat][Up: ctu_clsp_ctrl u_tst_stat][Up: ctu_clsp_ctrl u_wrmrst_stat][Up: ctu_clsp_ctrl u_ctu_iob_resetstat_wr_nxt][Up: ctu_clsp_ctrl u_ctu_dram_selfrsh_jl][Up: dram async_rst_flop][Up: ctu_clsp_synch_jlcl u_start_clk_tmp][Up: ctu_clsp_synch_jlcl u_start_clk_dly1][Up: ctu_clsp_synch_jlcl u_start_clk_dly2][Up: ctu_clsp_synch_jlcl u_start_clk_dly3][Up: ctu_clsp_synch_jlcl u_start_clk_dly4][Up: ctu_clsp_synch_jlcl u_start_clk_dly5]... (truncated)
module dffrl_async_nsIndex (din, clk, rst_l, q);
// synopsys template

parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   rst_l ;   // reset

output  [SIZE-1:0]      q ;     // output

// Reset dominates
// synopsys async_set_reset "rst_l"
 reg [SIZE-1:0] q;   
always @ (posedge clk or negedge rst_l)
  q[SIZE-1:0] <= ~rst_l ?  {SIZE{1'b0}} : ({SIZE{rst_l}} & din[SIZE-1:0]);

//   reg  [SIZE-1:0]   qm, qs, qm_l, qs_l, qm_f, qs_f;
//   wire              s_l;
//   assign            s_l = 1'b1;
//
//   always @ (rst_l or qm)   qm_l = ~(qm & {SIZE{rst_l}});
//   always @ (s_l or qs)   qs_l = ~(qs & {SIZE{s_l}});
//   always @ (s_l or qm_l) qm_f = ~(qm_l & {SIZE{s_l}});
//   always @ (rst_l or qs_l) qs_f = ~(qs_l & {SIZE{rst_l}});
//
//   always @ (clk or din or qm_f)
//      qm <= clk ? qm_f : din;
//
//   always @ (clk or qm_l or qs_f)
//      qs <= clk ? qm_l : qs_f;
//
//   assign q  = ~qs;

endmodule // dffrl_async_ns

// 2:1 MUX WITH DECODED SELECTS
[Up: sctag_tagdp_ctl mux_tag_triad0_muxsel_c2][Up: sctag_tagdp_ctl mux_tag_triad1_muxsel_c2][Up: sctag_tagdp_ctl mux_tag_triad2_muxsel_c2][Up: sctag_tagdp_ctl mux_tag_triad3_muxsel_c2][Up: sctag_tagdp_ctl mux_used_lru_triad0][Up: sctag_tagdp_ctl mux_used_lru_triad1][Up: sctag_tagdp_ctl mux_used_lru_triad2][Up: sctag_tagdp_ctl mux_used_lru_triad3][Up: sctag_tagdp_ctl mux_used_lru_quad][Up: sctag_tagdp_ctl mux_evict_way_sel_c2][Up: sparc_exu_rml_cwp irf_thr_mux][Up: sctag_fbctl mux_fb_count][Up: sctag_fbctl mux3_rtn_mbid][Up: sctag_fbctl l2_way_mux][Up: sctag_fbctl mux3_dep_mbid][Up: sctag_fbctl mux_fbwr_entry_c2][Up: sctag_fbctl mux2_fb_entry_c2][Up: sctag_vuaddp_ctl mux_idx_c3][Up: sctag_snpctl mux_snpiq_cnt][Up: sctag_snpctl mux_rdmad_wr_entry_s2][Up: sctag_vuadcol_dp mux_2to1][Up: tlu_misctl mx_trap_pc_w1][Up: tlu_misctl mx_trap_npc_w1][Up: tlu_misctl mux_npc_new_w][Up: sctag_arbctl mux1_tag_way_px][Up: sctag_arbctl mux2_tag_way_px][Up: sctag_arbctl mux3_tag_way_px][Up: sctag_arbctl mux_cpuid_c3][Up: sctag_arbctl mux1_inval_mask_c3][Up: sctag_arbctl mux2_inval_mask_c3][Up: sctag_arbctl mux1_ic_inval_mask_c3][Up: sctag_arbctl mux_dir_entry_c3]... (truncated)
module mux2dsIndex (dout, in0, in1, sel0, sel1) ;
// synopsys template

parameter SIZE = 1;

output 	[SIZE-1:0] 	dout;
input	[SIZE-1:0]	in0;
input	[SIZE-1:0]	in1;
input			sel0;
input			sel1;

// reg declaration does not imply state being maintained
// across cycles. Used to construct case statement and
// always updated by inputs every cycle.
reg	[SIZE-1:0]	dout ;

// priority encoding takes care of mutex'ing selects.
`ifdef VERPLEX
   $constraint cl_1h_chk2 ($one_hot ({sel1,sel0}));
`endif

wire [1:0] sel = {sel1, sel0}; // 0in one_hot
   
always @ (sel0 or sel1 or in0 or in1)

	case ({sel1,sel0}) // synopsys infer_mux
		2'b01 :	dout = in0 ;
		2'b10 : dout = in1 ;
		2'b11 : dout = {SIZE{1'bx}} ;
		2'b00 : dout = {SIZE{1'bx}} ;
			// 2'b00 : // E.g. 4state vs. 2state modelling.
			// begin
			//	`ifdef FOUR_STATE
			//		dout = {SIZE{1'bx}};
			//	`else
			//		begin
			//		dout = {SIZE{1'b0}};
			//		$error();
			//		end
			//	`endif
			// end
		default : dout = {SIZE{1'bx}};
	endcase

endmodule // mux2ds

// 3:1 MUX WITH DECODED SELECTS
[Up: sctag_tagdp_ctl mux_lru_st][Up: sctag_tagdp_ctl mux_lru_st_triad0][Up: sctag_tagdp_ctl mux_lru_st_triad1][Up: sctag_tagdp_ctl mux_lru_st_triad2][Up: sctag_tagdp_ctl mux_lru_st_triad3][Up: sctag_tagl_dp mux_tag_triad0][Up: sctag_tagl_dp mux_tag_triad1][Up: sparc_exu_rml_cwp slot0_data_mux][Up: sparc_exu_rml_cwp slot1_data_mux][Up: sparc_exu_rml_cwp slot2_data_mux][Up: sparc_exu_rml_cwp slot3_data_mux][Up: sctag_fbctl mux1_fb_entry_c2][Up: sctag_fbctl mux_l2_rd_state][Up: sctag_fbctl mux_l2_rd_state_quad0][Up: sctag_fbctl mux_l2_rd_state_quad1][Up: tlu_misctl mux_pc_new_w][Up: sparc_ifu_swl fprs_mx0][Up: sparc_ifu_swl fprs_mx1][Up: sparc_ifu_swl fprs_mx2][Up: sparc_ifu_swl fprs_mx3][Up: lsu_dctl err_tid_mx][Up: sctag_csr addr_c9_mux2][Up: sctag_csr mux_mux2_data_out_c7][Up: sctag_oqctl mux_imiss_err_or_intreq_c5][Up: sctag_oqctl mux_oq_count][Up: sparc_exu_byp sr_out_mux][Up: sparc_exu_byp rs1_w2_mux][Up: sparc_exu_byp rs2_w2_mux][Up: sparc_exu_byp rs3_w2_mux][Up: sparc_exu_byp rs3h_w2_mux][Up: sparc_exu_byp mux_w2_data][Up: lsu_stb_rwdp swap_byte2_mx]... (truncated)
module mux3dsIndex (dout, in0, in1, in2, sel0, sel1, sel2) ;
// synopsys template

parameter SIZE = 1;

output 	[SIZE-1:0] 	dout;
input	[SIZE-1:0]	in0;
input	[SIZE-1:0]	in1;
input	[SIZE-1:0]	in2;
input			sel0;
input			sel1;
input			sel2;

// reg declaration does not imply state being maintained
// across cycles. Used to construct case statement and
// always updated by inputs every cycle.
reg	[SIZE-1:0]	dout ;

`ifdef VERPLEX
   $constraint cl_1h_chk3 ($one_hot ({sel2,sel1,sel0}));
`endif

wire [2:0] sel = {sel2,sel1,sel0}; // 0in one_hot
   
// priority encoding takes care of mutex'ing selects.
always @ (sel0 or sel1 or sel2 or in0 or in1 or in2)

	case ({sel2,sel1,sel0}) 
		3'b001 : dout = in0 ;
		3'b010 : dout = in1 ;
		3'b100 : dout = in2 ;
		3'b000 : dout = {SIZE{1'bx}} ;
		3'b011 : dout = {SIZE{1'bx}} ;
		3'b101 : dout = {SIZE{1'bx}} ;
		3'b110 : dout = {SIZE{1'bx}} ;
		3'b111 : dout = {SIZE{1'bx}} ;
		default : dout = {SIZE{1'bx}};
			// two state vs four state modelling will be added.
	endcase

endmodule // mux3ds

// 4:1 MUX WITH DECODED SELECTS
[Up: sctag_tagdp_ctl mux_way_low][Up: sctag_tagdp_ctl mux_way_high][Up: sparc_exu_rml_cwp mux_cwp_old_w][Up: sparc_exu_rml_cwp mux_cwp_out_d][Up: sparc_exu_rml_cwp mux_cwp_out_e][Up: sparc_exu_rml_cwp mux_cwp_trap][Up: sparc_exu_rml_cwp cwp_next0_mux][Up: sparc_exu_rml_cwp cwp_next1_mux][Up: sparc_exu_rml_cwp cwp_next2_mux][Up: sparc_exu_rml_cwp cwp_next3_mux][Up: sparc_exu_rml_cwp slot0_state_mux][Up: sparc_exu_rml_cwp slot1_state_mux][Up: sparc_exu_rml_cwp slot2_state_mux][Up: sparc_exu_rml_cwp slot3_state_mux][Up: sparc_exu_rml_cwp cwp_output_mux][Up: sctag_fbctl mux1_rtn_mbid][Up: sctag_fbctl mux2_rtn_mbid][Up: sctag_fbctl l2_way_mux1][Up: sctag_fbctl l2_way_mux2][Up: sctag_fbctl mux_mbid0][Up: sctag_fbctl mux_mbid1][Up: sctag_fbctl mux_mbid2][Up: sctag_fbctl mux_mbid3][Up: sctag_fbctl mux_mbid4][Up: sctag_fbctl mux_mbid5][Up: sctag_fbctl mux_mbid6][Up: sctag_fbctl mux_mbid7][Up: sctag_fbctl mux1_dep_mbid][Up: sctag_fbctl mux2_dep_mbid][Up: sctag_vuad_io mux_data_out_io][Up: sctag_vuadcol_dp mux_h_4to1][Up: sctag_vuadcol_dp mux_l_4to1]... (truncated)
module mux4dsIndex (dout, in0, in1, in2, in3, sel0, sel1, sel2, sel3) ;
// synopsys template

parameter SIZE = 1;

output 	[SIZE-1:0] 	dout;
input	[SIZE-1:0]	in0;
input	[SIZE-1:0]	in1;
input	[SIZE-1:0]	in2;
input	[SIZE-1:0]	in3;
input			sel0;
input			sel1;
input			sel2;
input			sel3;

// reg declaration does not imply state being maintained
// across cycles. Used to construct case statement and
// always updated by inputs every cycle.
reg	[SIZE-1:0]	dout ;

`ifdef VERPLEX
   $constraint cl_1h_chk4 ($one_hot ({sel3,sel2,sel1,sel0}));
`endif
   
wire [3:0] sel = {sel3,sel2,sel1,sel0}; // 0in one_hot
   
// priority encoding takes care of mutex'ing selects.
always @ (sel0 or sel1 or sel2 or sel3 or in0 or in1 or in2 or in3)

	case ({sel3,sel2,sel1,sel0}) 
		4'b0001 : dout = in0 ;
		4'b0010 : dout = in1 ;
		4'b0100 : dout = in2 ;
		4'b1000 : dout = in3 ;
		4'b0000 : dout = {SIZE{1'bx}} ;
		4'b0011 : dout = {SIZE{1'bx}} ;
		4'b0101 : dout = {SIZE{1'bx}} ;
		4'b0110 : dout = {SIZE{1'bx}} ;
		4'b0111 : dout = {SIZE{1'bx}} ;
		4'b1001 : dout = {SIZE{1'bx}} ;
		4'b1010 : dout = {SIZE{1'bx}} ;
		4'b1011 : dout = {SIZE{1'bx}} ;
		4'b1100 : dout = {SIZE{1'bx}} ;
		4'b1101 : dout = {SIZE{1'bx}} ;
		4'b1110 : dout = {SIZE{1'bx}} ;
		4'b1111 : dout = {SIZE{1'bx}} ;
		default : dout = {SIZE{1'bx}};
			// two state vs four state modelling will be added.
	endcase

endmodule // mux4ds

// SINK FOR UNLOADED INPUT PORTS
[Up: sparc_ifu_swl s0][Up: sparc_ifu s0][Up: sparc_ifu s1][Up: sparc_ifu s2][Up: sparc_ifu s3][Up: sparc_ifu s4][Up: sparc_ifu_errctl s0][Up: sparc_ifu_errctl s1][Up: sparc_ifu_sscan s0][Up: sparc_ifu_invctl s0][Up: sparc_ifu_fcl s0][Up: sparc_tlu_intctl s1][Up: sparc_ifu_ifqdp s0][Up: sparc_ifu_ifqdp s1][Up: sparc_ifu_ifqdp s2][Up: sparc_ifu_swpla s0][Up: sparc_ifu_errdp s0]
module sinkIndex (in);
// synopsys template

parameter SIZE = 1;

input [SIZE-1:0] in;

`ifdef FPGA_SYN
   // As of version 8.2 XST does not remove this module without the
   // following additional dead code

   wire    a;

   assign		a = | in;

`endif

endmodule //sink

// SOURCE FOR UNDRIVEN OUTPUT PORTS
module sourceIndex (out) ;
// synopsys template

parameter SIZE = 1;

output  [SIZE-1:0] out;
// 
// Once 4state/2state model established
// then enable check.
// `ifdef FOUR_STATE
// leda check for x_or_z_in rhs_of assign turned off
// assign  out = {SIZE{1'bx}};
//`else
assign  out = {SIZE{1'b0}};
//`endif

endmodule //source

// 2:1 MUX WITH PRIORITY ENCODED SELECTS
//module mux2es (dout, in0, in1, sel0, sel1) ;
//
//parameter SIZE = 1;
//
//output 	[SIZE-1:0] 	dout;
//input	[SIZE-1:0]	in0;
//input	[SIZE-1:0]	in1;
//input			sel0;
//input			sel1;
//
//// reg declaration does not imply state being maintained
//// across cycles. Used to construct case statement and
//// always updated by inputs every cycle.
//reg	[SIZE-1:0]	dout ;
//
//// must take into account lack of mutex selects.
//// there is no reason for handling of x and z conditions.
//// This will be dictated by design.
//always @ (sel0 or sel1 or in0 or in1)
//
//	case ({sel1,sel0})
//		2'b1x : dout = in1 ; // 10(in1),11(z) 
//		2'b0x :	dout = in0 ; // 01(in0),00(x)
//	endcase
//
//endmodule // mux2es

// CLK Header for gating off the clock of
// a FF.
// clk - output of the clk header
// rclk - input clk
// enb_l - Active low clock enable
// tmb_l  - Active low clock enable ( in scan mode, this input is !se )

[Up: cpx_dp_maca_l ck0][Up: cpx_dp_maca_l ck1][Up: pcx_dp_maca_r ck0][Up: pcx_dp_maca_r ck1][Up: sparc_exu_byp irf_write_clkbuf][Up: cpx_dp_maca_r ck0][Up: cpx_dp_maca_r ck1][Up: sctag_snpdp ckbuf_1][Up: sctag_snpdp ckbuf_2][Up: sctag_snpdp ckbuf_4][Up: sctag_snpdp ckbuf_5][Up: sctag_snpdp ckbuf_6][Up: sctag_snpdp ckbuf_7][Up: sctag_snpdp ckbuf_8][Up: sctag_snpdp ckbuf_10][Up: sctag_snpdp ckbuf_11][Up: sctag_snpdp ckbuf_12][Up: fpu_div_frac_dp ckbuf_div_frac_dp][Up: spu_madp mem_rddata_lcd][Up: spu_madp oprnd2_lcd][Up: spu_madp mpa_lcd][Up: spu_madp modulus_lcd][Up: spu_madp exp_e_data_lcd][Up: spu_madp mulorred_data_lcd][Up: spu_madp mampa_reg_lcd][Up: spu_madp maaddr_reg_lcd][Up: spu_madp manp_reg_lcd][Up: spu_madp lnupper_data_lcd][Up: spu_madp lnlower_data_lcd][Up: sctag_arbdecdp ckbuf_0][Up: fpu_mul_frac_dp ckbuf_mul_frac_dp][Up: tlu_tdp clkbf_st0]... (truncated)
module clken_bufIndex (clk, rclk, enb_l, tmb_l);
output clk;
input  rclk, enb_l, tmb_l;
reg    clken;

  always @ (rclk or enb_l or tmb_l)
    if (!rclk)  //latch opens on rclk low phase
      clken = !enb_l | !tmb_l;
  assign clk = clken & rclk;

endmodule



// The following flops are maintained and used in ENET , MAC IP  ONLY
// -- Mimi X61467

// POSITIVE-EDGE TRIGGERED FLOP with SET_L, without SCAN.

[Up: jbi_jbus_arb grants_p1_reg0][Up: jbi_dbg_ctl u_dffrl_alternate_hi][Up: jbi_ncio_mrqq_ctl u_dffrl_pop_sm0][Up: ctu_clsp_creg u_cnt_ld][Up: ctu_clsp_clkctrl u_cctrl_start_state_0][Up: jbi_min u_dffrl_0_csr_16x65array_margin_ff][Up: jbi_min u_dffrl_2_csr_16x65array_margin_ff][Up: jbi_min u_dffrl_4_csr_16x65array_margin_ff][Up: jbi_min_rq_issue u_dff_pop_sm0]
module dffsl_nsIndex (din, clk, set_l, q);
// synopsys template
parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   set_l ; // set

output  [SIZE-1:0]      q ;     // output

reg     [SIZE-1:0]      q ;

// synopsys sync_set_reset "set_l"
always @ (posedge clk)
  q[SIZE-1:0] <= set_l ? din[SIZE-1:0] : {SIZE{1'b1}};

endmodule // dffsl_ns

// POSITIVE-EDGE TRIGGERED FLOP with SET_L, without SCAN.

[Up: ctu_clsp_ctrl u_ctrlsm_0][Up: ctu_clsp_ctrl u_powron_stat][Up: iobdg_efuse_reg fuse_reg_ff][Up: ctu_clsp_synch_jlcl u_ctu_jbusl_cken_jl][Up: ctu_clsp_synch_jlcl u_ctu_jbusr_cken_jl][Up: ctu_clsp_synch_jlcl u_ctu_dbg_cken_jl][Up: ctu_clsp_synch_jlcl u_ctu_misc_cken_jl][Up: ctu_dft_jtag_tap u_dffsl_tap_state0][Up: ctu_dft_jtag_tap u_dffsl_new_instructions0][Up: ctu_dft_jtag_tap u_dffsl_instructions0][Up: ctu_clsp_pllcnt u_rstsm_0][Up: ctu_clsp_pllcnt u_pll_reset_dly1_l][Up: ctu_clsp_pllcnt u_pll_reset_dly2_l][Up: ctu_clsp_pllcnt u_pll_reset_short][Up: ctu_clsp_pllcnt u_pll_reset_ref_l][Up: ctu_clsp_pllcnt u_pll_reset_ref_dly1_l][Up: ctu_clsp_clkgn_shadreg u_cnt_ld][Up: ctu_clsp_clkgn_shadreg u_jsync_shadreg_rx2_0_ff_async][Up: ctu_clsp_clkgn_shadreg u_jsync_shadreg_rx1_0_ff_async][Up: ctu_clsp_clkgn_shadreg u_jsync_shadreg_rx0_0_ff_async][Up: ctu_clsp_clkgn_shadreg jsync_shadreg_period_1_0_ff][Up: ctu_clsp_clkgn_shadreg jsync_shadreg_init_1_ff][Up: ctu_clsp_clkgn_shadreg u_dsync_shadreg_rx2_0_ff_async][Up: ctu_clsp_clkgn_shadreg u_dsync_shadreg_rx1_0_ff_async][Up: ctu_clsp_clkgn_shadreg u_dsync_shadreg_rx0_0_ff_async][Up: ctu_clsp_clkgn_shadreg dsync_shadreg_period_1_0_ff][Up: ctu_clsp_clkgn_shadreg dsync_shadreg_init_1_ff][Up: ctu_clsp_clkgn_shadreg u_shadreg_div_cmult_5_ff][Up: ctu_clsp_clkgn_shadreg u_shadreg_div_dmult_3_ff][Up: ctu_clsp_clkgn_shadreg u_shadreg_div_jmult_3_ff][Up: ctu_clsp_clkgn_shadreg u_shadreg_cdiv_vec_9][Up: ctu_clsp_clkgn_shadreg u_shadreg_cdiv_vec_7]... (truncated)
module dffsl_async_nsIndex (din, clk, set_l, q);
// synopsys template
parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   set_l ; // set

output  [SIZE-1:0]      q ;     // output

reg     [SIZE-1:0]      q ;

// synopsys async_set_reset "set_l"
always @ (posedge clk or negedge set_l)
  q[SIZE-1:0] <= ~set_l ? {SIZE{1'b1}} : ({SIZE{~set_l}} | din[SIZE-1:0]);

endmodule // dffsl_async_ns

// POSITIVE-EDGE TRIGGERED FLOP WITH SET_H , without SCAN.

module dffr_ns_r1Index (din, clk, rst, q);
// synopsys template
parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   rst ;   // reset

output  [SIZE-1:0]      q ;     // output

reg     [SIZE-1:0]      q ;

// Set to 1
// synopsys sync_set_reset "rst"
always @ (posedge clk)
  q[SIZE-1:0] <= rst ? {SIZE{1'b1}} : din[SIZE-1:0];

endmodule // dffr_ns_r1

// POSITIVE-EDGE TRIGGERED ASYNC RESET_H FLOP , without SCAN.

module dffr_async_nsIndex (din, clk, rst, q);
// synopsys template

parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   rst;   // reset

output  [SIZE-1:0]      q ;     // output

reg     [SIZE-1:0]      q ;

// Reset dominates
// synopsys async_set_reset "rst"
always @ (posedge clk or posedge rst)
  q[SIZE-1:0] <= rst ? {SIZE{1'b0}} : din[SIZE-1:0];

endmodule // dffr_async_ns

// POSITIVE-EDGE TRIGGERED ASYNC SET_H FLOP , without SCAN.

module dffr_async_ns_r1Index (din, clk, rst, q);
// synopsys template

parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clk ;   // clk or scan clk
input                   rst;   // reset

output  [SIZE-1:0]      q ;     // output

reg     [SIZE-1:0]      q ;

// Reset to 1
// synopsys async_set_reset "rst"
always @ (posedge clk or posedge rst)
  q[SIZE-1:0] <= rst ? {SIZE{1'b1}} : din[SIZE-1:0];

endmodule // dffr_async_ns_r1


// NEGATIVE-EDGE TRIGGERED ASYNC SET_H FLOP , without SCAN.

module dffr_async_ns_cl_r1Index (din, clkl, rst, q);
// synopsys template
parameter SIZE = 1;

input   [SIZE-1:0]      din ;   // data in
input                   clkl ;  // clk or scan clk
input                   rst ;   // reset

output  [SIZE-1:0]      q ;     // output

reg     [SIZE-1:0]      q ;

// Set to 1
// synopsys sync_set_reset "rst"
always @ (negedge clkl or posedge rst)
  q[SIZE-1:0] <= rst ? {SIZE{1'b1}} : din[SIZE-1:0];

endmodule // dffr_async_ns_cl_r1



This page: Created:Mon Jul 14 12:50:20 2008
From: ../src/swrvr_clib.v

Verilog converted to html by v2html 7.30 (written by Costas Calamvokis).Help