//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014 PANGO MICROSYSTEMS, INC
// ALL RIGHTS REVERVED.
//
// THE SOURCE CODE CONTAINED HEREIN IS PROPRIETARY TO PANGO MICROSYSTEMS, INC.
// IT SHALL NOT BE REPRODUCED OR DISCLOSED IN WHOLE OR IN PART OR USED BY
// PARTIES WITHOUT WRITTEN AUTHORIZATION FROM THE OWNER.
//
//////////////////////////////////////////////////////////////////////////////
//the debug_core module, which is one kind userapp 
//submodule list
//trig_unit
//trigger_condition
//trigger_out
//storage_condition
//storage_qualification
//data_capture_memory
//
module ips_dbc_debug_core_v1_3
 #(
  parameter FLA_VERSION       = 32'h9001F002,
  parameter AREA_SPEED        = 0,	//@IPC int 0,3
  parameter TRIG_PORT_NUM     = 1,	//@IPC int 1,16
  parameter MAX_SEQ_LEVEL     = 1,	//@IPC int 1,16
  parameter EN_TRIG_OUT       = 0,	//@IPC bool
  parameter EN_WINDOWS        = 0,	//@IPC bool
  parameter CLK_EDGE          = 1,	//@IPC enum 0,1
  parameter DATA_DEPTH        = 9,	//@IPC enum 6,7,8,9,10,11,12,13,14,15,16,17
  parameter EN_STOR_QUAL      = 0,	//@IPC bool
  parameter DATA_SAME_AS_TRIG = 1,	//@IPC bool
  parameter DATA_WIDTH        = 1,	//@IPC int 1,4096
  parameter TRIG0_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG0_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG0_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG0_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG0_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG1_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG1_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG1_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG1_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG1_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG2_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG2_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG2_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG2_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG2_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG3_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG3_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG3_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG3_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG3_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG4_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG4_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG4_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG4_MATCH_TYPE  = 0,	//@IPC  enum 0,1,2,3,4,5
  parameter TRIG4_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG5_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG5_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG5_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG5_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG5_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG6_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG6_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG6_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG6_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG6_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG7_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG7_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG7_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG7_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG7_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG8_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG8_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG8_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG8_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG8_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG9_PORT_WIDTH  = 8,	//@IPC int 1,256
  parameter TRIG9_MATCH_UNIT  = 1,	//@IPC int 1,16
  parameter TRIG9_CNT_WIDTH   = 0,	//@IPC int 0,32
  parameter TRIG9_MATCH_TYPE  = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG9_EXCLUDE     = 0,	//@IPC bool
  parameter TRIG10_PORT_WIDTH = 8,	//@IPC int 1,256
  parameter TRIG10_MATCH_UNIT = 1,	//@IPC int 1,16
  parameter TRIG10_CNT_WIDTH  = 0,	//@IPC int 0,32
  parameter TRIG10_MATCH_TYPE = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG10_EXCLUDE    = 0,	//@IPC bool
  parameter TRIG11_PORT_WIDTH = 8,	//@IPC int 1,256
  parameter TRIG11_MATCH_UNIT = 1,	//@IPC int 1,16
  parameter TRIG11_CNT_WIDTH  = 0,	//@IPC int 0,32
  parameter TRIG11_MATCH_TYPE = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG11_EXCLUDE    = 0,	//@IPC bool
  parameter TRIG12_PORT_WIDTH = 8,	//@IPC int 1,256
  parameter TRIG12_MATCH_UNIT = 1,	//@IPC int 1,16
  parameter TRIG12_CNT_WIDTH  = 0,	//@IPC int 0,32
  parameter TRIG12_MATCH_TYPE = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG12_EXCLUDE    = 0,	//@IPC bool
  parameter TRIG13_PORT_WIDTH = 8,	//@IPC int 1,256
  parameter TRIG13_MATCH_UNIT = 1,	//@IPC int 1,16
  parameter TRIG13_CNT_WIDTH  = 0,	//@IPC int 0,32
  parameter TRIG13_MATCH_TYPE = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG13_EXCLUDE    = 0,	//@IPC bool
  parameter TRIG14_PORT_WIDTH = 8,	//@IPC int 1,256
  parameter TRIG14_MATCH_UNIT = 1,	//@IPC int 1,16
  parameter TRIG14_CNT_WIDTH  = 0,	//@IPC int 0,32
  parameter TRIG14_MATCH_TYPE = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG14_EXCLUDE    = 0,	//@IPC bool
  parameter TRIG15_PORT_WIDTH = 8,	//@IPC int 1,256
  parameter TRIG15_MATCH_UNIT = 1,	//@IPC int 1,16
  parameter TRIG15_CNT_WIDTH  = 0,	//@IPC int 0,32
  parameter TRIG15_MATCH_TYPE = 0,	//@IPC enum 0,1,2,3,4,5
  parameter TRIG15_EXCLUDE    = 0,	//@IPC bool

  //   Initial Configuration
  parameter INIT_ENABLE       = 0,  //@IPC int 0,1
  parameter INIT_TRIG_COND    = 0,  //@IPC string @H trigger condition
  parameter INIT_TRIG_OUT     = "3'b000",  //@IPC enum 3'b000,3'b001,3'b010,3'b011,3'b100
  parameter INIT_STOR_TYPE    = 0,  //@IPC string @H
  parameter INIT_STOR_QUAL    = 0,  //@IPC string @H
  parameter INIT_M0_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M1_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M2_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M3_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M4_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M5_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M6_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M7_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M8_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M9_CONFIG    = 0,  //@IPC string @H
  parameter INIT_M10_CONFIG   = 0,  //@IPC string @H
  parameter INIT_M11_CONFIG   = 0,  //@IPC string @H
  parameter INIT_M12_CONFIG   = 0,  //@IPC string @H
  parameter INIT_M13_CONFIG   = 0,  //@IPC string @H
  parameter INIT_M14_CONFIG   = 0,  //@IPC string @H
  parameter INIT_M15_CONFIG   = 0   //@IPC string @H
  
  )(
  //interface with jtag_hub
   input                         drck_in,                  //jtag clock from jtag_hub module.
   input                         hub_tdi,                  //tdi from jtag_hub module.
   input                   [4:0] id_i,                     //identify number from jtag_hub module,indicate select which sub module.    
   input                         capt_i,
   input                         shift_i,
   input                         conf_sel,                 //indicate this debug_core is selected, from jtag_hub module.
   output                        hub_tdo,                  //tdo to jtag_hub module.
  //interface with user logic                          
   input                         clk,                      //the clock from user logic for trigger.
   input                         resetn_i,                 //the hw reset from user logic, it would be used for powerup trig.
   input  [DATA_WIDTH-1:0]       data_i,                   //the sample data from user logic.
   input  [TRIG0_PORT_WIDTH-1:0] trig0_i,                  //the trigger data for path 0, from user logic.
   input  [TRIG1_PORT_WIDTH-1:0] trig1_i,                  //the trigger data for path 1, from user logic.
   input  [TRIG2_PORT_WIDTH-1:0] trig2_i,                  //the trigger data for path 2, from user logic.
   input  [TRIG3_PORT_WIDTH-1:0] trig3_i,                  //the trigger data for path 3, from user logic.
   input  [TRIG4_PORT_WIDTH-1:0] trig4_i,                  //the trigger data for path 4, from user logic.
   input  [TRIG5_PORT_WIDTH-1:0] trig5_i,                  //the trigger data for path 5, from user logic.
   input  [TRIG6_PORT_WIDTH-1:0] trig6_i,                  //the trigger data for path 6, from user logic.   
   input  [TRIG7_PORT_WIDTH-1:0] trig7_i,                  //the trigger data for path 7, from user logic.   
   input  [TRIG8_PORT_WIDTH-1:0] trig8_i,                  //the trigger data for path 8, from user logic.   
   input  [TRIG9_PORT_WIDTH-1:0] trig9_i,                  //the trigger data for path 9, from user logic.
   input [TRIG10_PORT_WIDTH-1:0] trig10_i,                 //the trigger data for path 10, from user logic.
   input [TRIG11_PORT_WIDTH-1:0] trig11_i,                 //the trigger data for path 11, from user logic.
   input [TRIG12_PORT_WIDTH-1:0] trig12_i,                 //the trigger data for path 12, from user logic.
   input [TRIG13_PORT_WIDTH-1:0] trig13_i,                 //the trigger data for path 13, from user logic.
   input [TRIG14_PORT_WIDTH-1:0] trig14_i,                 //the trigger data for path 14, from user logic.   
   input [TRIG15_PORT_WIDTH-1:0] trig15_i,                 //the trigger data for path 15, from user logic.   
   output                        trig_out                  //trigger out signal, to user logic. 
  );
`pragma protect begin_protected
`pragma protect version=1
`pragma protect author="default"
`pragma protect author_info="default"
`pragma protect encrypt_agent="Synplify encryptP1735.pl"
`pragma protect encrypt_agent_info="Synplify encryptP1735.pl Version 1.1"

`pragma protect encoding=(enctype="base64", line_length=76, bytes=256)
`pragma protect key_keyowner="Synplicity", key_keyname="SYNP15_1", key_method="rsa"
`pragma protect key_block
MgwOcYUhqg1xrBrWHpmcgwKW+AVnXzdY3NbyE2GEc/+wi4ncfSv8mvFDMP/GYWzzVg6BxAvPF1Uz
ImvKSz/FjrPUtrsDDwsxKDEpspTyCytlk0Dkt44X/c2HdDXx8HSPi0jSNf0fJ3XNYsNZJvxs3jc+
UBvi7HYKkvmb7VvsF/arMR6eUZZLfjjmK5CDHjm3e806P9xBlqgKq7RububcXXXcHTJ2NpvZpVvc
VYHctCrDKtMfeSTZ1nQF7mqaKYRTkL8T5RWA43GwAt7+A699oQSYClGGUnbYLSLWBu9sajVDi1hj
8EvdlD3lXh1DVWcal7m2OIy96XCQAGKhSDVWsA==

`pragma protect encoding=(enctype="base64", line_length=76, bytes=256)
`pragma protect key_keyowner="Pango Microsystems", key_keyname="PANGO_18", key_method="rsa"
`pragma protect key_block
tUCLctAf7pOA+YA3H8WxJuXocMvAOmM1ug/CWp6jW8S9/zcYjk7MR1atSrdKL2RsDh4H5k8XScJW
7fQYNwKlPTIc/H2eUqAgW6yeG75bRkIljoYKady08xr6ry+wnx6qmhKQ5g/n39/hFJiETAawgH9n
r/vFp7z4/FGmskHoIu8vajkAndWTR0qURmlG1ClKlR6fQ18mHuDjgMm0uStu2F7Yvi+ookvYbtC+
u0cXdul4NRvmg0PzgmIe76LVfNGrai+FyzXGQFrAsXO7UpIzAzNoTiVVSLOnd8pAPnY+LkGhDwQ5
b3x9ro2ebX4IkE4VIs3iNVYk1sQCzE3raWJM+A==

`pragma protect data_method="aes128-cbc"
`pragma protect encoding=(enctype="base64", line_length=76, bytes=148256)
`pragma protect data_block
[encoded data, 197676 characters]

`pragma protect end_protected
endmodule
