data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp
 line:116: before: "("
1: b"%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:115: Define or directive not defined: '`mname'\nmodule `mname`\n       ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:115: syntax error, unexpected $undefined, expecting IDENTIFIER or PACKAGE-IDENTIFIER or TYPE-IDENTIFIER\nmodule `mname`\n             ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:136: Unsupported or unknown PLI call: $tc_cfg_req_ifc\n   `$tc_cfg_req_ifc->get_module_name()`.cfgOut tc_cfgReq,\n    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:137: Unsupported or unknown PLI call: $tc_cfg_rep_ifc\n   `$tc_cfg_rep_ifc->get_module_name()`.cfgIn tc_cfgRep,\n    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:143: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_tdi,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:144: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_sample,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:145: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_intest,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:146: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_extest,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:147: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_update_en,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:148: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_capture_en,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:149: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output     logic bsr_shift_dr,\n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:150: syntax error, unexpected input, expecting IDENTIFIER or '=' or do or final\n    input     bsr_tdo,\n    ^~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:161: syntax error, unexpected output, expecting IDENTIFIER or '=' or do or final\n    output       logic  tdo_en          \n    ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:229: syntax error, unexpected $undefined\n   `$tap->get_module_name()` `$tap->get_instance_name()` \n   ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:229: Unsupported or unknown PLI call: $tap\n   `$tap->get_module_name()` `$tap->get_instance_name()` \n    ^~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:229: Unsupported or unknown PLI call: $tap\n   `$tap->get_module_name()` `$tap->get_instance_name()` \n                              ^~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:309: syntax error, unexpected $undefined, expecting TYPE-IDENTIFIER\n   logic [`$sc_cfg_op_width-1`:0] sc_inst;\n          ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:309: Unsupported or unknown PLI call: $sc_cfg_op_width\n   logic [`$sc_cfg_op_width-1`:0] sc_inst;\n           ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:310: Unsupported or unknown PLI call: $sc_inst_reg\n   `$sc_inst_reg->get_module_name()` `$sc_inst_reg->get_instance_name()` \n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:310: Unsupported or unknown PLI call: $sc_inst_reg\n   `$sc_inst_reg->get_module_name()` `$sc_inst_reg->get_instance_name()` \n                                      ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:311: Unsupported or unknown PLI call: $sc_cfg_op_width\n     (.dout(sc_inst), .din({tdi, sc_inst[`$sc_cfg_op_width-1`:1]}),\n                                          ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:317: syntax error, unexpected assign\n   assign inst_update_qualified = ((sys_clk_activated & inst_update_qual==4'b1110) | (!sys_clk_activated & inst_update_qual[3]==1)) ? 1'b1:1'b0;\n   ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:322: Unsupported or unknown PLI call: $inst_update_reg\n   `$inst_update_reg->get_module_name()` `$inst_update_reg->get_instance_name()` \n    ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:322: Unsupported or unknown PLI call: $inst_update_reg\n   `$inst_update_reg->get_module_name()` `$inst_update_reg->get_instance_name()` \n                                          ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:329: Unsupported or unknown PLI call: $sc_cfg_op_width\n         sc_inst : `$sc_cfg_op_width`'d`$sc_nop`;\n                    ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:329: Number is missing value digits: 'd\n         sc_inst : `$sc_cfg_op_width`'d`$sc_nop`;\n                                     ^~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:329: Unsupported or unknown PLI call: $sc_nop\n         sc_inst : `$sc_cfg_op_width`'d`$sc_nop`;\n                                        ^~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:341: syntax error, unexpected $undefined, expecting TYPE-IDENTIFIER\n   logic [`$sc_cfg_addr_width-1`:0] sc_addr;\n          ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:341: Unsupported or unknown PLI call: $sc_cfg_addr_width\n   logic [`$sc_cfg_addr_width-1`:0] sc_addr;\n           ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:342: Unsupported or unknown PLI call: $sc_addr_reg\n   `$sc_addr_reg->instantiate` \n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:343: Unsupported or unknown PLI call: $sc_cfg_addr_width\n     (.dout(sc_addr), .din({tdi, sc_addr[`$sc_cfg_addr_width-1`:1]}),\n                                          ^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:358: syntax error, unexpected $undefined, expecting TYPE-IDENTIFIER\n   logic [`$sc_cfg_bus_width-1`:0] sc_data_rd;\n          ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:358: Unsupported or unknown PLI call: $sc_cfg_bus_width\n   logic [`$sc_cfg_bus_width-1`:0] sc_data_rd;\n           ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:360: syntax error, unexpected assign\n   assign       sc_data_rd_en = (sc_cfgRep_op == `$sc_cfg_op_width`'d`$sc_bypassop`)? \n   ^~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:360: Unsupported or unknown PLI call: $sc_cfg_op_width\n   assign       sc_data_rd_en = (sc_cfgRep_op == `$sc_cfg_op_width`'d`$sc_bypassop`)? \n                                                  ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:360: Number is missing value digits: 'd\n   assign       sc_data_rd_en = (sc_cfgRep_op == `$sc_cfg_op_width`'d`$sc_bypassop`)? \n                                                                   ^~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:360: Unsupported or unknown PLI call: $sc_bypassop\n   assign       sc_data_rd_en = (sc_cfgRep_op == `$sc_cfg_op_width`'d`$sc_bypassop`)? \n                                                                      ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:362: Unsupported or unknown PLI call: $sc_data_rd_reg\n   `$sc_data_rd_reg->get_module_name()` `$sc_data_rd_reg->get_instance_name()` \n    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:362: Unsupported or unknown PLI call: $sc_data_rd_reg\n   `$sc_data_rd_reg->get_module_name()` `$sc_data_rd_reg->get_instance_name()` \n                                         ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:375: syntax error, unexpected $undefined, expecting TYPE-IDENTIFIER\n   logic [`$sc_cfg_bus_width-1`:0] sc_data;\n          ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:375: Unsupported or unknown PLI call: $sc_cfg_bus_width\n   logic [`$sc_cfg_bus_width-1`:0] sc_data;\n           ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:376: syntax error, unexpected $undefined, expecting TYPE-IDENTIFIER\n   logic [`$sc_cfg_bus_width-1`:0] sc_data_nxt;\n          ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:376: Unsupported or unknown PLI call: $sc_cfg_bus_width\n   logic [`$sc_cfg_bus_width-1`:0] sc_data_nxt;\n           ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:378: Unsupported or unknown PLI call: $sc_cfg_bus_width\n          sc_data_rd : {tdi, sc_data[`$sc_cfg_bus_width-1`:1]};\n                                      ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:380: Unsupported or unknown PLI call: $sc_data_reg\n   `$sc_data_reg->get_module_name()` `$sc_data_reg->get_instance_name()` \n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:380: Unsupported or unknown PLI call: $sc_data_reg\n   `$sc_data_reg->get_module_name()` `$sc_data_reg->get_instance_name()` \n                                      ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:406: syntax error, unexpected $undefined, expecting TYPE-IDENTIFIER\n   logic [`$tc_cfg_op_width-1`:0] tc_inst;\n          ^\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:406: Unsupported or unknown PLI call: $tc_cfg_op_width\n   logic [`$tc_cfg_op_width-1`:0] tc_inst;\n           ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:407: Unsupported or unknown PLI call: $tc_inst_reg\n   `$tc_inst_reg->get_module_name()` `$tc_inst_reg->get_instance_name()` \n    ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/209644662/hardware/generator_z/jtag/Template/src/digital/cfg_and_dbg.svp:407: Unsupported or unknown PLI call: $tc_inst_reg\n   `$tc_inst_reg->get_module_name()` `$tc_inst_reg->get_instance_name()` \n                                      ^~~~~~~~~~~~\n%Error: Exiting due to too many errors encountered; --error-limit=50\n"
module `mname`
  (



   output [31:0] sc_cfgReq_addr,
   output [31:0] sc_cfgReq_data,
   output [4:0] sc_cfgReq_op,
   

   input [31:0] sc_cfgRep_addr,
   input [31:0] sc_cfgRep_data,
   input [4:0] sc_cfgRep_op,


   input                                Clk,
   input             	                Reset,

   


   `$tc_cfg_req_ifc->get_module_name()`.cfgOut tc_cfgReq,
   `$tc_cfg_rep_ifc->get_module_name()`.cfgIn tc_cfgRep,
					   
    output 				logic test_logic_reset,

 

    output 				logic bsr_tdi,
    output 				logic bsr_sample,
    output 				logic bsr_intest,
    output 				logic bsr_extest,
    output 				logic bsr_update_en,
    output 				logic bsr_capture_en,
    output 				logic bsr_shift_dr,
    input 				bsr_tdo,


    input	 sys_clk_activated,


    input        tms,
    input        tck,
    input        trst_n,
    input        tdi,
    output       logic  tdo,
    output       logic  tdo_en
    );




   logic 	  test_logic_reset;

   






















   logic 	  sc_cfg_data_capture_dr;		
   logic 	  sc_cfg_data_shift_dr;			
   logic 	  sc_cfg_data_update_dr;		
   logic 	  sc_cfg_data_tdo;

   logic 	  sc_cfg_inst_capture_dr;		
   logic 	  sc_cfg_inst_shift_dr;			
   logic 	  sc_cfg_inst_update_dr;		
   logic 	  sc_cfg_inst_tdo;

   logic 	  sc_cfg_addr_capture_dr;		
   logic 	  sc_cfg_addr_shift_dr;			
   logic 	  sc_cfg_addr_update_dr;		
   logic 	  sc_cfg_addr_tdo;





   logic 	  tc_cfg_data_capture_dr;		
   logic 	  tc_cfg_data_shift_dr;			
   logic 	  tc_cfg_data_update_dr;		
   logic 	  tc_cfg_data_tdo;

   logic 	  tc_cfg_inst_capture_dr;		
   logic 	  tc_cfg_inst_shift_dr;			
   logic 	  tc_cfg_inst_update_dr;		
   logic 	  tc_cfg_inst_tdo;

   logic 	  tc_cfg_addr_capture_dr;		
   logic 	  tc_cfg_addr_shift_dr;			
   logic 	  tc_cfg_addr_update_dr;		
   logic 	  tc_cfg_addr_tdo;




   `$tap->get_module_name()` `$tap->get_instance_name()` 
     (

      .tms(tms),
      .tck(tck),
      .trst_n(trst_n),
      .tdi(tdi),
      .tdo(tdo),
      .tdo_en(tdo_en),
      


      .sc_cfg_data_capture_dr(sc_cfg_data_capture_dr),		
      .sc_cfg_data_shift_dr(sc_cfg_data_shift_dr),			
      .sc_cfg_data_update_dr(sc_cfg_data_update_dr),		
      .sc_cfg_data_tdo(sc_cfg_data_tdo),
				

      .sc_cfg_inst_capture_dr(sc_cfg_inst_capture_dr),		
      .sc_cfg_inst_shift_dr(sc_cfg_inst_shift_dr),			
      .sc_cfg_inst_update_dr(sc_cfg_inst_update_dr),		
      .sc_cfg_inst_tdo(sc_cfg_inst_tdo),
      						

      .sc_cfg_addr_capture_dr(sc_cfg_addr_capture_dr),		
      .sc_cfg_addr_shift_dr(sc_cfg_addr_shift_dr),			
      .sc_cfg_addr_update_dr(sc_cfg_addr_update_dr),		
      .sc_cfg_addr_tdo(sc_cfg_addr_tdo),

      						


      .tc_cfg_data_capture_dr(tc_cfg_data_capture_dr),		
      .tc_cfg_data_shift_dr(tc_cfg_data_shift_dr),			
      .tc_cfg_data_update_dr(tc_cfg_data_update_dr),		
      .tc_cfg_data_tdo(tc_cfg_data_tdo),
      						

      .tc_cfg_inst_capture_dr(tc_cfg_inst_capture_dr),		
      .tc_cfg_inst_shift_dr(tc_cfg_inst_shift_dr),			
      .tc_cfg_inst_update_dr(tc_cfg_inst_update_dr),		
      .tc_cfg_inst_tdo(tc_cfg_inst_tdo),
      						

      .tc_cfg_addr_capture_dr(tc_cfg_addr_capture_dr),		
      .tc_cfg_addr_shift_dr(tc_cfg_addr_shift_dr),			
      .tc_cfg_addr_update_dr(tc_cfg_addr_update_dr),
      .tc_cfg_addr_tdo(tc_cfg_addr_tdo),


      .test_logic_reset(test_logic_reset),

      

      .bsr_extest(bsr_extest),
      .bsr_intest(bsr_intest),
      .bsr_sample(bsr_sample),
      .bsr_capture_en(bsr_capture_en),
      .bsr_shift_dr(bsr_shift_dr),
      .bsr_update_en(bsr_update_en),
      .bsr_tdo(bsr_tdo)
      );
   

















   logic [`$sc_cfg_op_width-1`:0] sc_inst;
   `$sc_inst_reg->get_module_name()` `$sc_inst_reg->get_instance_name()` 
     (.dout(sc_inst),	.din({tdi, sc_inst[`$sc_cfg_op_width-1`:1]}),
      .Clk(tck),	.en(sc_cfg_inst_shift_dr),      .Reset(test_logic_reset));


   logic [3:0] inst_update_qual;
   logic       inst_update_qualified;
   assign inst_update_qualified = ((sys_clk_activated & inst_update_qual==4'b1110) | (!sys_clk_activated & inst_update_qual[3]==1)) ? 1'b1:1'b0;




   `$inst_update_reg->get_module_name()` `$inst_update_reg->get_instance_name()` 
     (.dout(inst_update_qual),	.din({sc_cfg_inst_update_dr, inst_update_qual[3:1]}),
      .Clk(Clk),	.Reset(Reset));
   


   assign 			   sc_cfgReq_op = (inst_update_qualified) ? 
						   sc_inst : `$sc_cfg_op_width`'d`$sc_nop`;

   assign 			   sc_cfg_inst_tdo = sc_inst[0];
   /

   











   logic [`$tc_cfg_op_width-1`:0] tc_inst;
   `$tc_inst_reg->get_module_name()` `$tc_inst_reg->get_instance_name()` 
     (.dout(tc_inst),	.din({tdi, tc_inst[`$tc_cfg_op_width-1`:1]}),
      .Clk(tck),	.en(tc_cfg_inst_shift_dr),      .Reset(test_logic_reset));


   assign 			   tc_cfgReq.op = (tc_cfg_inst_update_dr) ? 
						   tc_inst : `$tc_cfg_op_width`'d`$tc_nop`;

   assign 			   tc_cfg_inst_tdo = tc_inst[0];


   






   logic [`$tc_cfg_addr_width-1`:0] tc_addr;
   `$tc_addr_reg->get_module_name()` `$tc_addr_reg->get_instance_name()` 
     (.dout(tc_addr),	.din({tdi, tc_addr[`$tc_cfg_addr_width-1`:1]}),
      .Clk(tck),	.en(tc_cfg_addr_shift_dr),      .Reset(test_logic_reset));


   assign 			     tc_cfgReq.addr = tc_addr;
   assign 			     tc_cfg_addr_tdo = tc_addr[0];









   logic [`$tc_cfg_bus_width-1`:0] tc_data_rd;
   logic 			   tc_data_rd_en;
   assign 			   tc_data_rd_en = (tc_cfgRep.op == `$tc_cfg_op_width`'d`$tc_bypassop`)? 
						   1'b1: 1'b0;
   `$tc_data_rd_reg->get_module_name()` `$tc_data_rd_reg->get_instance_name()` 
     (.dout(tc_data_rd),	.din(tc_cfgRep.data),
      .Clk(tck),	.en(tc_data_rd_en),      
      .Reset(test_logic_reset));


   






   logic [`$tc_cfg_bus_width-1`:0] tc_data;
   logic [`$tc_cfg_bus_width-1`:0] tc_data_nxt;
   assign 			     tc_data_nxt = (tc_cfg_data_capture_dr) ? 
						    tc_data_rd : {tdi, tc_data[`$tc_cfg_bus_width-1`:1]};
   
   `$tc_data_reg->get_module_name()` `$tc_data_reg->get_instance_name()` 
     (.dout(tc_data),	.din(tc_data_nxt),
      .Clk(tck),	.en(tc_cfg_data_shift_dr | tc_cfg_data_capture_dr),      
      .Reset(test_logic_reset));


   assign 			     tc_cfgReq.data = tc_data;
   assign 			     tc_cfg_data_tdo = tc_data[0];



endmodule
module `mname`
  (



   output [31:0] sc_cfgReq_addr,
   output [31:0] sc_cfgReq_data,
   output [4:0] sc_cfgReq_op,
   

   input [31:0] sc_cfgRep_addr,
   input [31:0] sc_cfgRep_data,
   input [4:0] sc_cfgRep_op,


   input                                Clk,
   input             	                Reset,

   


   `$tc_cfg_req_ifc->get_module_name()`.cfgOut tc_cfgReq,
   `$tc_cfg_rep_ifc->get_module_name()`.cfgIn tc_cfgRep,
					   
    output 				logic test_logic_reset,

 

    output 				logic bsr_tdi,
    output 				logic bsr_sample,
    output 				logic bsr_intest,
    output 				logic bsr_extest,
    output 				logic bsr_update_en,
    output 				logic bsr_capture_en,
    output 				logic bsr_shift_dr,
    input 				bsr_tdo,


    input	 sys_clk_activated,


    input        tms,
    input        tck,
    input        trst_n,
    input        tdi,
    output       logic  tdo,
    output       logic  tdo_en
    );





   logic 	  test_logic_reset;

   






















   logic 	  sc_cfg_data_capture_dr;		
   logic 	  sc_cfg_data_shift_dr;			
   logic 	  sc_cfg_data_update_dr;		
   logic 	  sc_cfg_data_tdo;

   logic 	  sc_cfg_inst_capture_dr;		
   logic 	  sc_cfg_inst_shift_dr;			
   logic 	  sc_cfg_inst_update_dr;		
   logic 	  sc_cfg_inst_tdo;

   logic 	  sc_cfg_addr_capture_dr;		
   logic 	  sc_cfg_addr_shift_dr;			
   logic 	  sc_cfg_addr_update_dr;		
   logic 	  sc_cfg_addr_tdo;





   logic 	  tc_cfg_data_capture_dr;		
   logic 	  tc_cfg_data_shift_dr;			
   logic 	  tc_cfg_data_update_dr;		
   logic 	  tc_cfg_data_tdo;

   logic 	  tc_cfg_inst_capture_dr;		
   logic 	  tc_cfg_inst_shift_dr;			
   logic 	  tc_cfg_inst_update_dr;		
   logic 	  tc_cfg_inst_tdo;

   logic 	  tc_cfg_addr_capture_dr;		
   logic 	  tc_cfg_addr_shift_dr;			
   logic 	  tc_cfg_addr_update_dr;		
   logic 	  tc_cfg_addr_tdo;




   `$tap->get_module_name()` `$tap->get_instance_name()` 
     (

      .tms(tms),
      .tck(tck),
      .trst_n(trst_n),
      .tdi(tdi),
      .tdo(tdo),
      .tdo_en(tdo_en),
      


      .sc_cfg_data_capture_dr(sc_cfg_data_capture_dr),		
      .sc_cfg_data_shift_dr(sc_cfg_data_shift_dr),			
      .sc_cfg_data_update_dr(sc_cfg_data_update_dr),		
      .sc_cfg_data_tdo(sc_cfg_data_tdo),
				

      .sc_cfg_inst_capture_dr(sc_cfg_inst_capture_dr),		
      .sc_cfg_inst_shift_dr(sc_cfg_inst_shift_dr),			
      .sc_cfg_inst_update_dr(sc_cfg_inst_update_dr),		
      .sc_cfg_inst_tdo(sc_cfg_inst_tdo),
      						

      .sc_cfg_addr_capture_dr(sc_cfg_addr_capture_dr),		
      .sc_cfg_addr_shift_dr(sc_cfg_addr_shift_dr),			
      .sc_cfg_addr_update_dr(sc_cfg_addr_update_dr),		
      .sc_cfg_addr_tdo(sc_cfg_addr_tdo),

      						


      .tc_cfg_data_capture_dr(tc_cfg_data_capture_dr),		
      .tc_cfg_data_shift_dr(tc_cfg_data_shift_dr),			
      .tc_cfg_data_update_dr(tc_cfg_data_update_dr),		
      .tc_cfg_data_tdo(tc_cfg_data_tdo),
      						

      .tc_cfg_inst_capture_dr(tc_cfg_inst_capture_dr),		
      .tc_cfg_inst_shift_dr(tc_cfg_inst_shift_dr),			
      .tc_cfg_inst_update_dr(tc_cfg_inst_update_dr),		
      .tc_cfg_inst_tdo(tc_cfg_inst_tdo),
      						

      .tc_cfg_addr_capture_dr(tc_cfg_addr_capture_dr),		
      .tc_cfg_addr_shift_dr(tc_cfg_addr_shift_dr),			
      .tc_cfg_addr_update_dr(tc_cfg_addr_update_dr),
      .tc_cfg_addr_tdo(tc_cfg_addr_tdo),


      .test_logic_reset(test_logic_reset),

      

      .bsr_extest(bsr_extest),
      .bsr_intest(bsr_intest),
      .bsr_sample(bsr_sample),
      .bsr_capture_en(bsr_capture_en),
      .bsr_shift_dr(bsr_shift_dr),
      .bsr_update_en(bsr_update_en),
      .bsr_tdo(bsr_tdo)
      );
   

















   logic [`$sc_cfg_op_width-1`:0] sc_inst;
   `$sc_inst_reg->get_module_name()` `$sc_inst_reg->get_instance_name()` 
     (.dout(sc_inst),	.din({tdi, sc_inst[`$sc_cfg_op_width-1`:1]}),
      .Clk(tck),	.en(sc_cfg_inst_shift_dr),      .Reset(test_logic_reset));


   logic [3:0] inst_update_qual;
   logic       inst_update_qualified;
   assign inst_update_qualified = ((sys_clk_activated & inst_update_qual==4'b1110) | (!sys_clk_activated & inst_update_qual[3]==1)) ? 1'b1:1'b0;




   `$inst_update_reg->get_module_name()` `$inst_update_reg->get_instance_name()` 
     (.dout(inst_update_qual),	.din({sc_cfg_inst_update_dr, inst_update_qual[3:1]}),
      .Clk(Clk),	.Reset(Reset));
   


   assign 			   sc_cfgReq_op = (inst_update_qualified) ? 
						   sc_inst : `$sc_cfg_op_width`'d`$sc_nop`;

   assign 			   sc_cfg_inst_tdo = sc_inst[0];
   /

   











   logic [`$tc_cfg_op_width-1`:0] tc_inst;
   `$tc_inst_reg->get_module_name()` `$tc_inst_reg->get_instance_name()` 
     (.dout(tc_inst),	.din({tdi, tc_inst[`$tc_cfg_op_width-1`:1]}),
      .Clk(tck),	.en(tc_cfg_inst_shift_dr),      .Reset(test_logic_reset));


   assign 			   tc_cfgReq.op = (tc_cfg_inst_update_dr) ? 
						   tc_inst : `$tc_cfg_op_width`'d`$tc_nop`;

   assign 			   tc_cfg_inst_tdo = tc_inst[0];


   






   logic [`$tc_cfg_addr_width-1`:0] tc_addr;
   `$tc_addr_reg->get_module_name()` `$tc_addr_reg->get_instance_name()` 
     (.dout(tc_addr),	.din({tdi, tc_addr[`$tc_cfg_addr_width-1`:1]}),
      .Clk(tck),	.en(tc_cfg_addr_shift_dr),      .Reset(test_logic_reset));


   assign 			     tc_cfgReq.addr = tc_addr;
   assign 			     tc_cfg_addr_tdo = tc_addr[0];









   logic [`$tc_cfg_bus_width-1`:0] tc_data_rd;
   logic 			   tc_data_rd_en;
   assign 			   tc_data_rd_en = (tc_cfgRep.op == `$tc_cfg_op_width`'d`$tc_bypassop`)? 
						   1'b1: 1'b0;
   `$tc_data_rd_reg->get_module_name()` `$tc_data_rd_reg->get_instance_name()` 
     (.dout(tc_data_rd),	.din(tc_cfgRep.data),
      .Clk(tck),	.en(tc_data_rd_en),      
      .Reset(test_logic_reset));


   






   logic [`$tc_cfg_bus_width-1`:0] tc_data;
   logic [`$tc_cfg_bus_width-1`:0] tc_data_nxt;
   assign 			     tc_data_nxt = (tc_cfg_data_capture_dr) ? 
						    tc_data_rd : {tdi, tc_data[`$tc_cfg_bus_width-1`:1]};
   
   `$tc_data_reg->get_module_name()` `$tc_data_reg->get_instance_name()` 
     (.dout(tc_data),	.din(tc_data_nxt),
      .Clk(tck),	.en(tc_cfg_data_shift_dr | tc_cfg_data_capture_dr),      
      .Reset(test_logic_reset));


   assign 			     tc_cfgReq.data = tc_data;
   assign 			     tc_cfg_data_tdo = tc_data[0];



endmodule