nios2_uc_nios2_cpu_debug_slave_wrapper.v 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. //Legal Notice: (C)2020 Altera Corporation. All rights reserved. Your
  2. //use of Altera Corporation's design tools, logic functions and other
  3. //software and tools, and its AMPP partner logic functions, and any
  4. //output files any of the foregoing (including device programming or
  5. //simulation files), and any associated documentation or information are
  6. //expressly subject to the terms and conditions of the Altera Program
  7. //License Subscription Agreement or other applicable license agreement,
  8. //including, without limitation, that your use is for the sole purpose
  9. //of programming logic devices manufactured by Altera and sold by Altera
  10. //or its authorized distributors. Please refer to the applicable
  11. //agreement for further details.
  12. // synthesis translate_off
  13. `timescale 1ns / 1ps
  14. // synthesis translate_on
  15. // turn off superfluous verilog processor warnings
  16. // altera message_level Level1
  17. // altera message_off 10034 10035 10036 10037 10230 10240 10030
  18. module nios2_uc_nios2_cpu_debug_slave_wrapper (
  19. // inputs:
  20. MonDReg,
  21. break_readreg,
  22. clk,
  23. dbrk_hit0_latch,
  24. dbrk_hit1_latch,
  25. dbrk_hit2_latch,
  26. dbrk_hit3_latch,
  27. debugack,
  28. monitor_error,
  29. monitor_ready,
  30. reset_n,
  31. resetlatch,
  32. tracemem_on,
  33. tracemem_trcdata,
  34. tracemem_tw,
  35. trc_im_addr,
  36. trc_on,
  37. trc_wrap,
  38. trigbrktype,
  39. trigger_state_1,
  40. // outputs:
  41. jdo,
  42. jrst_n,
  43. st_ready_test_idle,
  44. take_action_break_a,
  45. take_action_break_b,
  46. take_action_break_c,
  47. take_action_ocimem_a,
  48. take_action_ocimem_b,
  49. take_action_tracectrl,
  50. take_no_action_break_a,
  51. take_no_action_break_b,
  52. take_no_action_break_c,
  53. take_no_action_ocimem_a
  54. )
  55. ;
  56. output [ 37: 0] jdo;
  57. output jrst_n;
  58. output st_ready_test_idle;
  59. output take_action_break_a;
  60. output take_action_break_b;
  61. output take_action_break_c;
  62. output take_action_ocimem_a;
  63. output take_action_ocimem_b;
  64. output take_action_tracectrl;
  65. output take_no_action_break_a;
  66. output take_no_action_break_b;
  67. output take_no_action_break_c;
  68. output take_no_action_ocimem_a;
  69. input [ 31: 0] MonDReg;
  70. input [ 31: 0] break_readreg;
  71. input clk;
  72. input dbrk_hit0_latch;
  73. input dbrk_hit1_latch;
  74. input dbrk_hit2_latch;
  75. input dbrk_hit3_latch;
  76. input debugack;
  77. input monitor_error;
  78. input monitor_ready;
  79. input reset_n;
  80. input resetlatch;
  81. input tracemem_on;
  82. input [ 35: 0] tracemem_trcdata;
  83. input tracemem_tw;
  84. input [ 6: 0] trc_im_addr;
  85. input trc_on;
  86. input trc_wrap;
  87. input trigbrktype;
  88. input trigger_state_1;
  89. wire [ 37: 0] jdo;
  90. wire jrst_n;
  91. wire [ 37: 0] sr;
  92. wire st_ready_test_idle;
  93. wire take_action_break_a;
  94. wire take_action_break_b;
  95. wire take_action_break_c;
  96. wire take_action_ocimem_a;
  97. wire take_action_ocimem_b;
  98. wire take_action_tracectrl;
  99. wire take_no_action_break_a;
  100. wire take_no_action_break_b;
  101. wire take_no_action_break_c;
  102. wire take_no_action_ocimem_a;
  103. wire vji_cdr;
  104. wire [ 1: 0] vji_ir_in;
  105. wire [ 1: 0] vji_ir_out;
  106. wire vji_rti;
  107. wire vji_sdr;
  108. wire vji_tck;
  109. wire vji_tdi;
  110. wire vji_tdo;
  111. wire vji_udr;
  112. wire vji_uir;
  113. //Change the sld_virtual_jtag_basic's defparams to
  114. //switch between a regular Nios II or an internally embedded Nios II.
  115. //For a regular Nios II, sld_mfg_id = 70, sld_type_id = 34.
  116. //For an internally embedded Nios II, slf_mfg_id = 110, sld_type_id = 135.
  117. nios2_uc_nios2_cpu_debug_slave_tck the_nios2_uc_nios2_cpu_debug_slave_tck
  118. (
  119. .MonDReg (MonDReg),
  120. .break_readreg (break_readreg),
  121. .dbrk_hit0_latch (dbrk_hit0_latch),
  122. .dbrk_hit1_latch (dbrk_hit1_latch),
  123. .dbrk_hit2_latch (dbrk_hit2_latch),
  124. .dbrk_hit3_latch (dbrk_hit3_latch),
  125. .debugack (debugack),
  126. .ir_in (vji_ir_in),
  127. .ir_out (vji_ir_out),
  128. .jrst_n (jrst_n),
  129. .jtag_state_rti (vji_rti),
  130. .monitor_error (monitor_error),
  131. .monitor_ready (monitor_ready),
  132. .reset_n (reset_n),
  133. .resetlatch (resetlatch),
  134. .sr (sr),
  135. .st_ready_test_idle (st_ready_test_idle),
  136. .tck (vji_tck),
  137. .tdi (vji_tdi),
  138. .tdo (vji_tdo),
  139. .tracemem_on (tracemem_on),
  140. .tracemem_trcdata (tracemem_trcdata),
  141. .tracemem_tw (tracemem_tw),
  142. .trc_im_addr (trc_im_addr),
  143. .trc_on (trc_on),
  144. .trc_wrap (trc_wrap),
  145. .trigbrktype (trigbrktype),
  146. .trigger_state_1 (trigger_state_1),
  147. .vs_cdr (vji_cdr),
  148. .vs_sdr (vji_sdr),
  149. .vs_uir (vji_uir)
  150. );
  151. nios2_uc_nios2_cpu_debug_slave_sysclk the_nios2_uc_nios2_cpu_debug_slave_sysclk
  152. (
  153. .clk (clk),
  154. .ir_in (vji_ir_in),
  155. .jdo (jdo),
  156. .sr (sr),
  157. .take_action_break_a (take_action_break_a),
  158. .take_action_break_b (take_action_break_b),
  159. .take_action_break_c (take_action_break_c),
  160. .take_action_ocimem_a (take_action_ocimem_a),
  161. .take_action_ocimem_b (take_action_ocimem_b),
  162. .take_action_tracectrl (take_action_tracectrl),
  163. .take_no_action_break_a (take_no_action_break_a),
  164. .take_no_action_break_b (take_no_action_break_b),
  165. .take_no_action_break_c (take_no_action_break_c),
  166. .take_no_action_ocimem_a (take_no_action_ocimem_a),
  167. .vs_udr (vji_udr),
  168. .vs_uir (vji_uir)
  169. );
  170. //synthesis translate_off
  171. //////////////// SIMULATION-ONLY CONTENTS
  172. assign vji_tck = 1'b0;
  173. assign vji_tdi = 1'b0;
  174. assign vji_sdr = 1'b0;
  175. assign vji_cdr = 1'b0;
  176. assign vji_rti = 1'b0;
  177. assign vji_uir = 1'b0;
  178. assign vji_udr = 1'b0;
  179. assign vji_ir_in = 2'b0;
  180. //////////////// END SIMULATION-ONLY CONTENTS
  181. //synthesis translate_on
  182. //synthesis read_comments_as_HDL on
  183. // sld_virtual_jtag_basic nios2_uc_nios2_cpu_debug_slave_phy
  184. // (
  185. // .ir_in (vji_ir_in),
  186. // .ir_out (vji_ir_out),
  187. // .jtag_state_rti (vji_rti),
  188. // .tck (vji_tck),
  189. // .tdi (vji_tdi),
  190. // .tdo (vji_tdo),
  191. // .virtual_state_cdr (vji_cdr),
  192. // .virtual_state_sdr (vji_sdr),
  193. // .virtual_state_udr (vji_udr),
  194. // .virtual_state_uir (vji_uir)
  195. // );
  196. //
  197. // defparam nios2_uc_nios2_cpu_debug_slave_phy.sld_auto_instance_index = "YES",
  198. // nios2_uc_nios2_cpu_debug_slave_phy.sld_instance_index = 0,
  199. // nios2_uc_nios2_cpu_debug_slave_phy.sld_ir_width = 2,
  200. // nios2_uc_nios2_cpu_debug_slave_phy.sld_mfg_id = 70,
  201. // nios2_uc_nios2_cpu_debug_slave_phy.sld_sim_action = "",
  202. // nios2_uc_nios2_cpu_debug_slave_phy.sld_sim_n_scan = 0,
  203. // nios2_uc_nios2_cpu_debug_slave_phy.sld_sim_total_length = 0,
  204. // nios2_uc_nios2_cpu_debug_slave_phy.sld_type_id = 34,
  205. // nios2_uc_nios2_cpu_debug_slave_phy.sld_version = 3;
  206. //
  207. //synthesis read_comments_as_HDL off
  208. endmodule