1 |
221 |
olivier.gi |
//Legal Notice: (C)2014 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 |
|
|
|
13 |
|
|
// synthesis translate_off
|
14 |
|
|
`timescale 1ns / 1ps
|
15 |
|
|
// synthesis translate_on
|
16 |
|
|
|
17 |
|
|
// turn off superfluous verilog processor warnings
|
18 |
|
|
// altera message_level Level1
|
19 |
|
|
// altera message_off 10034 10035 10036 10037 10230 10240 10030
|
20 |
|
|
|
21 |
|
|
module DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_wrapper (
|
22 |
|
|
// inputs:
|
23 |
|
|
MonDReg,
|
24 |
|
|
break_readreg,
|
25 |
|
|
clk,
|
26 |
|
|
dbrk_hit0_latch,
|
27 |
|
|
dbrk_hit1_latch,
|
28 |
|
|
dbrk_hit2_latch,
|
29 |
|
|
dbrk_hit3_latch,
|
30 |
|
|
debugack,
|
31 |
|
|
monitor_error,
|
32 |
|
|
monitor_ready,
|
33 |
|
|
reset_n,
|
34 |
|
|
resetlatch,
|
35 |
|
|
tracemem_on,
|
36 |
|
|
tracemem_trcdata,
|
37 |
|
|
tracemem_tw,
|
38 |
|
|
trc_im_addr,
|
39 |
|
|
trc_on,
|
40 |
|
|
trc_wrap,
|
41 |
|
|
trigbrktype,
|
42 |
|
|
trigger_state_1,
|
43 |
|
|
|
44 |
|
|
// outputs:
|
45 |
|
|
jdo,
|
46 |
|
|
jrst_n,
|
47 |
|
|
st_ready_test_idle,
|
48 |
|
|
take_action_break_a,
|
49 |
|
|
take_action_break_b,
|
50 |
|
|
take_action_break_c,
|
51 |
|
|
take_action_ocimem_a,
|
52 |
|
|
take_action_ocimem_b,
|
53 |
|
|
take_action_tracectrl,
|
54 |
|
|
take_action_tracemem_a,
|
55 |
|
|
take_action_tracemem_b,
|
56 |
|
|
take_no_action_break_a,
|
57 |
|
|
take_no_action_break_b,
|
58 |
|
|
take_no_action_break_c,
|
59 |
|
|
take_no_action_ocimem_a,
|
60 |
|
|
take_no_action_tracemem_a
|
61 |
|
|
)
|
62 |
|
|
;
|
63 |
|
|
|
64 |
|
|
output [ 37: 0] jdo;
|
65 |
|
|
output jrst_n;
|
66 |
|
|
output st_ready_test_idle;
|
67 |
|
|
output take_action_break_a;
|
68 |
|
|
output take_action_break_b;
|
69 |
|
|
output take_action_break_c;
|
70 |
|
|
output take_action_ocimem_a;
|
71 |
|
|
output take_action_ocimem_b;
|
72 |
|
|
output take_action_tracectrl;
|
73 |
|
|
output take_action_tracemem_a;
|
74 |
|
|
output take_action_tracemem_b;
|
75 |
|
|
output take_no_action_break_a;
|
76 |
|
|
output take_no_action_break_b;
|
77 |
|
|
output take_no_action_break_c;
|
78 |
|
|
output take_no_action_ocimem_a;
|
79 |
|
|
output take_no_action_tracemem_a;
|
80 |
|
|
input [ 31: 0] MonDReg;
|
81 |
|
|
input [ 31: 0] break_readreg;
|
82 |
|
|
input clk;
|
83 |
|
|
input dbrk_hit0_latch;
|
84 |
|
|
input dbrk_hit1_latch;
|
85 |
|
|
input dbrk_hit2_latch;
|
86 |
|
|
input dbrk_hit3_latch;
|
87 |
|
|
input debugack;
|
88 |
|
|
input monitor_error;
|
89 |
|
|
input monitor_ready;
|
90 |
|
|
input reset_n;
|
91 |
|
|
input resetlatch;
|
92 |
|
|
input tracemem_on;
|
93 |
|
|
input [ 35: 0] tracemem_trcdata;
|
94 |
|
|
input tracemem_tw;
|
95 |
|
|
input [ 6: 0] trc_im_addr;
|
96 |
|
|
input trc_on;
|
97 |
|
|
input trc_wrap;
|
98 |
|
|
input trigbrktype;
|
99 |
|
|
input trigger_state_1;
|
100 |
|
|
|
101 |
|
|
wire [ 37: 0] jdo;
|
102 |
|
|
wire jrst_n;
|
103 |
|
|
wire [ 37: 0] sr;
|
104 |
|
|
wire st_ready_test_idle;
|
105 |
|
|
wire take_action_break_a;
|
106 |
|
|
wire take_action_break_b;
|
107 |
|
|
wire take_action_break_c;
|
108 |
|
|
wire take_action_ocimem_a;
|
109 |
|
|
wire take_action_ocimem_b;
|
110 |
|
|
wire take_action_tracectrl;
|
111 |
|
|
wire take_action_tracemem_a;
|
112 |
|
|
wire take_action_tracemem_b;
|
113 |
|
|
wire take_no_action_break_a;
|
114 |
|
|
wire take_no_action_break_b;
|
115 |
|
|
wire take_no_action_break_c;
|
116 |
|
|
wire take_no_action_ocimem_a;
|
117 |
|
|
wire take_no_action_tracemem_a;
|
118 |
|
|
wire vji_cdr;
|
119 |
|
|
wire [ 1: 0] vji_ir_in;
|
120 |
|
|
wire [ 1: 0] vji_ir_out;
|
121 |
|
|
wire vji_rti;
|
122 |
|
|
wire vji_sdr;
|
123 |
|
|
wire vji_tck;
|
124 |
|
|
wire vji_tdi;
|
125 |
|
|
wire vji_tdo;
|
126 |
|
|
wire vji_udr;
|
127 |
|
|
wire vji_uir;
|
128 |
|
|
//Change the sld_virtual_jtag_basic's defparams to
|
129 |
|
|
//switch between a regular Nios II or an internally embedded Nios II.
|
130 |
|
|
//For a regular Nios II, sld_mfg_id = 70, sld_type_id = 34.
|
131 |
|
|
//For an internally embedded Nios II, slf_mfg_id = 110, sld_type_id = 135.
|
132 |
|
|
DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_tck the_DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_tck
|
133 |
|
|
(
|
134 |
|
|
.MonDReg (MonDReg),
|
135 |
|
|
.break_readreg (break_readreg),
|
136 |
|
|
.dbrk_hit0_latch (dbrk_hit0_latch),
|
137 |
|
|
.dbrk_hit1_latch (dbrk_hit1_latch),
|
138 |
|
|
.dbrk_hit2_latch (dbrk_hit2_latch),
|
139 |
|
|
.dbrk_hit3_latch (dbrk_hit3_latch),
|
140 |
|
|
.debugack (debugack),
|
141 |
|
|
.ir_in (vji_ir_in),
|
142 |
|
|
.ir_out (vji_ir_out),
|
143 |
|
|
.jrst_n (jrst_n),
|
144 |
|
|
.jtag_state_rti (vji_rti),
|
145 |
|
|
.monitor_error (monitor_error),
|
146 |
|
|
.monitor_ready (monitor_ready),
|
147 |
|
|
.reset_n (reset_n),
|
148 |
|
|
.resetlatch (resetlatch),
|
149 |
|
|
.sr (sr),
|
150 |
|
|
.st_ready_test_idle (st_ready_test_idle),
|
151 |
|
|
.tck (vji_tck),
|
152 |
|
|
.tdi (vji_tdi),
|
153 |
|
|
.tdo (vji_tdo),
|
154 |
|
|
.tracemem_on (tracemem_on),
|
155 |
|
|
.tracemem_trcdata (tracemem_trcdata),
|
156 |
|
|
.tracemem_tw (tracemem_tw),
|
157 |
|
|
.trc_im_addr (trc_im_addr),
|
158 |
|
|
.trc_on (trc_on),
|
159 |
|
|
.trc_wrap (trc_wrap),
|
160 |
|
|
.trigbrktype (trigbrktype),
|
161 |
|
|
.trigger_state_1 (trigger_state_1),
|
162 |
|
|
.vs_cdr (vji_cdr),
|
163 |
|
|
.vs_sdr (vji_sdr),
|
164 |
|
|
.vs_uir (vji_uir)
|
165 |
|
|
);
|
166 |
|
|
|
167 |
|
|
DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_sysclk the_DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_sysclk
|
168 |
|
|
(
|
169 |
|
|
.clk (clk),
|
170 |
|
|
.ir_in (vji_ir_in),
|
171 |
|
|
.jdo (jdo),
|
172 |
|
|
.sr (sr),
|
173 |
|
|
.take_action_break_a (take_action_break_a),
|
174 |
|
|
.take_action_break_b (take_action_break_b),
|
175 |
|
|
.take_action_break_c (take_action_break_c),
|
176 |
|
|
.take_action_ocimem_a (take_action_ocimem_a),
|
177 |
|
|
.take_action_ocimem_b (take_action_ocimem_b),
|
178 |
|
|
.take_action_tracectrl (take_action_tracectrl),
|
179 |
|
|
.take_action_tracemem_a (take_action_tracemem_a),
|
180 |
|
|
.take_action_tracemem_b (take_action_tracemem_b),
|
181 |
|
|
.take_no_action_break_a (take_no_action_break_a),
|
182 |
|
|
.take_no_action_break_b (take_no_action_break_b),
|
183 |
|
|
.take_no_action_break_c (take_no_action_break_c),
|
184 |
|
|
.take_no_action_ocimem_a (take_no_action_ocimem_a),
|
185 |
|
|
.take_no_action_tracemem_a (take_no_action_tracemem_a),
|
186 |
|
|
.vs_udr (vji_udr),
|
187 |
|
|
.vs_uir (vji_uir)
|
188 |
|
|
);
|
189 |
|
|
|
190 |
|
|
|
191 |
|
|
//synthesis translate_off
|
192 |
|
|
//////////////// SIMULATION-ONLY CONTENTS
|
193 |
|
|
assign vji_tck = 1'b0;
|
194 |
|
|
assign vji_tdi = 1'b0;
|
195 |
|
|
assign vji_sdr = 1'b0;
|
196 |
|
|
assign vji_cdr = 1'b0;
|
197 |
|
|
assign vji_rti = 1'b0;
|
198 |
|
|
assign vji_uir = 1'b0;
|
199 |
|
|
assign vji_udr = 1'b0;
|
200 |
|
|
assign vji_ir_in = 2'b0;
|
201 |
|
|
|
202 |
|
|
//////////////// END SIMULATION-ONLY CONTENTS
|
203 |
|
|
|
204 |
|
|
//synthesis translate_on
|
205 |
|
|
//synthesis read_comments_as_HDL on
|
206 |
|
|
// sld_virtual_jtag_basic DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy
|
207 |
|
|
// (
|
208 |
|
|
// .ir_in (vji_ir_in),
|
209 |
|
|
// .ir_out (vji_ir_out),
|
210 |
|
|
// .jtag_state_rti (vji_rti),
|
211 |
|
|
// .tck (vji_tck),
|
212 |
|
|
// .tdi (vji_tdi),
|
213 |
|
|
// .tdo (vji_tdo),
|
214 |
|
|
// .virtual_state_cdr (vji_cdr),
|
215 |
|
|
// .virtual_state_sdr (vji_sdr),
|
216 |
|
|
// .virtual_state_udr (vji_udr),
|
217 |
|
|
// .virtual_state_uir (vji_uir)
|
218 |
|
|
// );
|
219 |
|
|
//
|
220 |
|
|
// defparam DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_auto_instance_index = "YES",
|
221 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_instance_index = 0,
|
222 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_ir_width = 2,
|
223 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_mfg_id = 70,
|
224 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_sim_action = "",
|
225 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_sim_n_scan = 0,
|
226 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_sim_total_length = 0,
|
227 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_type_id = 34,
|
228 |
|
|
// DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_phy.sld_version = 3;
|
229 |
|
|
//
|
230 |
|
|
//synthesis read_comments_as_HDL off
|
231 |
|
|
|
232 |
|
|
endmodule
|
233 |
|
|
|