OpenCores
URL https://opencores.org/ocsvn/dbg_interface/dbg_interface/trunk

Subversion Repositories dbg_interface

[/] [dbg_interface/] [tags/] [rel_15/] [rtl/] [verilog/] [dbg_top.v] - Blame information for rev 106

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mohor
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  dbg_top.v                                                   ////
4
////                                                              ////
5
////                                                              ////
6
////  This file is part of the SoC/OpenRISC Development Interface ////
7 36 mohor
////  http://www.opencores.org/projects/DebugInterface/           ////
8 2 mohor
////                                                              ////
9
////  Author(s):                                                  ////
10 81 mohor
////       Igor Mohor (igorm@opencores.org)                       ////
11 2 mohor
////                                                              ////
12
////                                                              ////
13 81 mohor
////  All additional information is avaliable in the README.txt   ////
14 2 mohor
////  file.                                                       ////
15
////                                                              ////
16
//////////////////////////////////////////////////////////////////////
17
////                                                              ////
18 81 mohor
//// Copyright (C) 2000 - 2003 Authors                            ////
19 2 mohor
////                                                              ////
20
//// This source file may be used and distributed without         ////
21
//// restriction provided that this copyright statement is not    ////
22
//// removed from the file and that any derivative work contains  ////
23
//// the original copyright notice and the associated disclaimer. ////
24
////                                                              ////
25
//// This source file is free software; you can redistribute it   ////
26
//// and/or modify it under the terms of the GNU Lesser General   ////
27
//// Public License as published by the Free Software Foundation; ////
28
//// either version 2.1 of the License, or (at your option) any   ////
29
//// later version.                                               ////
30
////                                                              ////
31
//// This source is distributed in the hope that it will be       ////
32
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
33
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
34
//// PURPOSE.  See the GNU Lesser General Public License for more ////
35
//// details.                                                     ////
36
////                                                              ////
37
//// You should have received a copy of the GNU Lesser General    ////
38
//// Public License along with this source; if not, download it   ////
39
//// from http://www.opencores.org/lgpl.shtml                     ////
40
////                                                              ////
41
//////////////////////////////////////////////////////////////////////
42
//
43
// CVS Revision History
44
//
45
// $Log: not supported by cvs2svn $
46 106 simons
// Revision 1.37  2004/01/17 17:01:14  mohor
47
// Almost finished.
48
//
49 101 mohor
// Revision 1.36  2004/01/16 14:51:33  mohor
50
// cpu registers added.
51
//
52 99 mohor
// Revision 1.35  2004/01/14 22:59:16  mohor
53
// Temp version.
54
//
55 95 mohor
// Revision 1.34  2003/12/23 15:07:34  mohor
56
// New directory structure. New version of the debug interface.
57
// Files that are not needed removed.
58
//
59 81 mohor
// Revision 1.33  2003/10/23 16:17:01  mohor
60
// CRC logic changed.
61
//
62 73 mohor
// Revision 1.32  2003/09/18 14:00:47  simons
63
// Lower two address lines must be always zero.
64
//
65 67 simons
// Revision 1.31  2003/09/17 14:38:57  simons
66
// WB_CNTL register added, some syncronization fixes.
67
//
68 65 simons
// Revision 1.30  2003/08/28 13:55:22  simons
69
// Three more chains added for cpu debug access.
70
//
71 63 simons
// Revision 1.29  2003/07/31 12:19:49  simons
72
// Multiple cpu support added.
73
//
74 57 simons
// Revision 1.28  2002/11/06 14:22:41  mohor
75
// Trst signal is not inverted here any more. Inverted on higher layer !!!.
76
//
77 52 mohor
// Revision 1.27  2002/10/10 02:42:55  mohor
78 73 mohor
// WISHBONE Scan Chain is changed to reflect state of the WISHBONE access (WBInProgress bit added). 
79
// Internal counter is used (counts 256 wb_clk cycles) and when counter exceeds that value, 
80
// wb_cyc_o is negated.
81 52 mohor
//
82 51 mohor
// Revision 1.26  2002/05/07 14:43:59  mohor
83
// mon_cntl_o signals that controls monitor mux added.
84
//
85 47 mohor
// Revision 1.25  2002/04/22 12:54:11  mohor
86
// Signal names changed to lower case.
87
//
88 44 mohor
// Revision 1.24  2002/04/17 13:17:01  mohor
89
// Intentional error removed.
90
//
91 43 mohor
// Revision 1.23  2002/04/17 11:16:33  mohor
92
// A block for checking possible simulation/synthesis missmatch added.
93
//
94 42 mohor
// Revision 1.22  2002/03/12 10:31:53  mohor
95
// tap_top and dbg_top modules are put into two separate modules. tap_top
96
// contains only tap state machine and related logic. dbg_top contains all
97
// logic necessery for debugging.
98
//
99 37 mohor
// Revision 1.21  2002/03/08 15:28:16  mohor
100
// Structure changed. Hooks for jtag chain added.
101
//
102 36 mohor
// Revision 1.20  2002/02/06 12:23:09  mohor
103 81 mohor
// latched_jtag_ir used when muxing TDO instead of JTAG_IR.
104 36 mohor
//
105 33 mohor
// Revision 1.19  2002/02/05 13:34:51  mohor
106
// Stupid bug that was entered by previous update fixed.
107
//
108 32 mohor
// Revision 1.18  2002/02/05 12:41:01  mohor
109
// trst synchronization is not needed and was removed.
110
//
111 31 mohor
// Revision 1.17  2002/01/25 07:58:35  mohor
112
// IDCODE bug fixed, chains reused to decreas size of core. Data is shifted-in
113
// not filled-in. Tested in hw.
114
//
115 30 mohor
// Revision 1.16  2001/12/20 11:17:26  mohor
116
// TDO and TDO Enable signal are separated into two signals.
117
//
118 28 mohor
// Revision 1.15  2001/12/05 13:28:21  mohor
119
// trst signal is synchronized to wb_clk_i.
120
//
121 25 mohor
// Revision 1.14  2001/11/28 09:36:15  mohor
122
// Register length fixed.
123
//
124 22 mohor
// Revision 1.13  2001/11/27 13:37:43  mohor
125
// CRC is returned when chain selection data is transmitted.
126
//
127 21 mohor
// Revision 1.12  2001/11/26 10:47:09  mohor
128
// Crc generation is different for read or write commands. Small synthesys fixes.
129
//
130 20 mohor
// Revision 1.11  2001/11/14 10:10:41  mohor
131
// Wishbone data latched on wb_clk_i instead of risc_clk.
132
//
133 19 mohor
// Revision 1.10  2001/11/12 01:11:27  mohor
134
// Reset signals are not combined any more.
135
//
136 18 mohor
// Revision 1.9  2001/10/19 11:40:01  mohor
137
// dbg_timescale.v changed to timescale.v This is done for the simulation of
138
// few different cores in a single project.
139
//
140 17 mohor
// Revision 1.8  2001/10/17 10:39:03  mohor
141
// bs_chain_o added.
142
//
143 15 mohor
// Revision 1.7  2001/10/16 10:09:56  mohor
144
// Signal names changed to lowercase.
145 13 mohor
//
146 15 mohor
//
147 13 mohor
// Revision 1.6  2001/10/15 09:55:47  mohor
148
// Wishbone interface added, few fixes for better performance,
149
// hooks for boundary scan testing added.
150
//
151 12 mohor
// Revision 1.5  2001/09/24 14:06:42  mohor
152
// Changes connected to the OpenRISC access (SPR read, SPR write).
153
//
154 11 mohor
// Revision 1.4  2001/09/20 10:11:25  mohor
155
// Working version. Few bugs fixed, comments added.
156
//
157 9 mohor
// Revision 1.3  2001/09/19 11:55:13  mohor
158
// Asynchronous set/reset not used in trace any more.
159
//
160 8 mohor
// Revision 1.2  2001/09/18 14:13:47  mohor
161
// Trace fixed. Some registers changed, trace simplified.
162
//
163 5 mohor
// Revision 1.1.1.1  2001/09/13 13:49:19  mohor
164
// Initial official release.
165
//
166 2 mohor
// Revision 1.3  2001/06/01 22:22:35  mohor
167
// This is a backup. It is not a fully working version. Not for use, yet.
168
//
169
// Revision 1.2  2001/05/18 13:10:00  mohor
170
// Headers changed. All additional information is now avaliable in the README.txt file.
171
//
172
// Revision 1.1.1.1  2001/05/18 06:35:02  mohor
173
// Initial release
174
//
175
//
176
 
177 20 mohor
// synopsys translate_off
178 17 mohor
`include "timescale.v"
179 20 mohor
// synopsys translate_on
180 2 mohor
`include "dbg_defines.v"
181 101 mohor
`include "dbg_cpu_defines.v"
182 2 mohor
 
183
// Top module
184 9 mohor
module dbg_top(
185 81 mohor
                // JTAG signals
186
                tck_i,
187
                tdi_i,
188
                tdo_o,
189 57 simons
 
190 81 mohor
                // TAP states
191
                shift_dr_i,
192
                pause_dr_i,
193
                update_dr_i,
194
 
195
                // Instructions
196
                debug_select_i,
197
 
198 12 mohor
                // WISHBONE common signals
199 101 mohor
                wb_rst_i,
200
                wb_clk_i,
201 81 mohor
 
202 12 mohor
                // WISHBONE master interface
203 101 mohor
                wb_adr_o,
204
                wb_dat_o,
205
                wb_dat_i,
206
                wb_cyc_o,
207
                wb_stb_o,
208
                wb_sel_o,
209
                wb_we_o,
210
                wb_ack_i,
211
                wb_cab_o,
212
                wb_err_i,
213
                wb_cti_o,
214
                wb_bte_o,
215
 
216
                // CPU signals
217
                cpu_clk_i,
218
                cpu_addr_o,
219
                cpu_data_i,
220
                cpu_data_o,
221
                cpu_bp_i,
222
                cpu_stall_o,
223
                cpu_stall_all_o,
224
                cpu_stb_o,
225
                cpu_sel_o,
226
                cpu_we_o,
227
                cpu_ack_i,
228
                cpu_rst_o
229 2 mohor
              );
230
 
231
 
232 81 mohor
// JTAG signals
233
input   tck_i;
234
input   tdi_i;
235
output  tdo_o;
236 2 mohor
 
237 81 mohor
// TAP states
238
input   shift_dr_i;
239
input   pause_dr_i;
240
input   update_dr_i;
241 2 mohor
 
242 81 mohor
// Instructions
243
input   debug_select_i;
244 2 mohor
 
245 12 mohor
// WISHBONE common signals
246 9 mohor
input         wb_rst_i;                   // WISHBONE reset
247 12 mohor
input         wb_clk_i;                   // WISHBONE clock
248 81 mohor
 
249 12 mohor
// WISHBONE master interface
250
output [31:0] wb_adr_o;
251
output [31:0] wb_dat_o;
252
input  [31:0] wb_dat_i;
253
output        wb_cyc_o;
254
output        wb_stb_o;
255
output  [3:0] wb_sel_o;
256
output        wb_we_o;
257
input         wb_ack_i;
258
output        wb_cab_o;
259
input         wb_err_i;
260 81 mohor
output  [2:0] wb_cti_o;
261
output  [1:0] wb_bte_o;
262 9 mohor
 
263 101 mohor
// CPU signals
264
input         cpu_clk_i;
265
output [31:0] cpu_addr_o;
266
input  [31:0] cpu_data_i;
267
output [31:0] cpu_data_o;
268
input         cpu_bp_i;
269
output        cpu_stall_o;
270
output        cpu_stall_all_o;
271
output        cpu_stb_o;
272
output [`CPU_NUM -1:0]  cpu_sel_o;
273
output        cpu_we_o;
274
input         cpu_ack_i;
275
output        cpu_rst_o;
276 2 mohor
 
277 81 mohor
reg     cpu_debug_scan_chain;
278
reg     wishbone_scan_chain;
279 2 mohor
 
280 81 mohor
reg [`DATA_CNT -1:0]        data_cnt;
281
reg [`CRC_CNT -1:0]         crc_cnt;
282
reg [`STATUS_CNT -1:0]      status_cnt;
283
reg [`CHAIN_DATA_LEN -1:0]  chain_dr;
284
reg [`CHAIN_ID_LENGTH -1:0] chain;
285 9 mohor
 
286 99 mohor
wire chain_latch_en;
287 81 mohor
wire data_cnt_end;
288
wire crc_cnt_end;
289
wire status_cnt_end;
290
reg  crc_cnt_end_q;
291
reg  crc_cnt_end_q2;
292
reg  crc_cnt_end_q3;
293
reg  chain_select;
294
reg  chain_select_error;
295
wire crc_out;
296
wire crc_match;
297
wire crc_en_wb;
298 99 mohor
wire crc_en_cpu;
299 81 mohor
wire shift_crc_wb;
300 99 mohor
wire shift_crc_cpu;
301 36 mohor
 
302 81 mohor
wire data_shift_en;
303
wire selecting_command;
304 2 mohor
 
305 81 mohor
reg tdo_o;
306
reg wishbone_ce;
307 99 mohor
reg cpu_ce;
308 73 mohor
 
309 99 mohor
wire tdi_wb;
310
wire tdi_cpu;
311
 
312
wire tdo_wb;
313
wire tdo_cpu;
314
 
315
wire shift_crc;
316
 
317 81 mohor
// data counter
318 95 mohor
always @ (posedge tck_i or posedge wb_rst_i)
319 81 mohor
begin
320 95 mohor
  if (wb_rst_i)
321 81 mohor
    data_cnt <= #1 'h0;
322
  else if(shift_dr_i & (~data_cnt_end))
323
    data_cnt <= #1 data_cnt + 1'b1;
324
  else if (update_dr_i)
325
    data_cnt <= #1 'h0;
326
end
327 9 mohor
 
328 11 mohor
 
329 81 mohor
assign data_cnt_end = data_cnt == `CHAIN_DATA_LEN;
330 2 mohor
 
331
 
332 81 mohor
// crc counter
333 95 mohor
always @ (posedge tck_i or posedge wb_rst_i)
334 2 mohor
begin
335 95 mohor
  if (wb_rst_i)
336 81 mohor
    crc_cnt <= #1 'h0;
337
  else if(shift_dr_i & data_cnt_end & (~crc_cnt_end) & chain_select)
338
    crc_cnt <= #1 crc_cnt + 1'b1;
339
  else if (update_dr_i)
340
    crc_cnt <= #1 'h0;
341 2 mohor
end
342
 
343 81 mohor
assign crc_cnt_end = crc_cnt == `CRC_LEN;
344 2 mohor
 
345 12 mohor
 
346 81 mohor
always @ (posedge tck_i)
347 73 mohor
  begin
348 81 mohor
    crc_cnt_end_q  <= #1 crc_cnt_end;
349
    crc_cnt_end_q2 <= #1 crc_cnt_end_q;
350
    crc_cnt_end_q3 <= #1 crc_cnt_end_q2;
351 73 mohor
  end
352 20 mohor
 
353 2 mohor
 
354 81 mohor
// status counter
355 95 mohor
always @ (posedge tck_i or posedge wb_rst_i)
356 2 mohor
begin
357 95 mohor
  if (wb_rst_i)
358 81 mohor
    status_cnt <= #1 'h0;
359
  else if(shift_dr_i & crc_cnt_end & (~status_cnt_end))
360
    status_cnt <= #1 status_cnt + 1'b1;
361
  else if (update_dr_i)
362
    status_cnt <= #1 'h0;
363 2 mohor
end
364
 
365 81 mohor
assign status_cnt_end = status_cnt == `STATUS_LEN;
366 42 mohor
 
367
 
368 81 mohor
assign selecting_command = shift_dr_i & (data_cnt == `DATA_CNT'h0) & debug_select_i;
369 42 mohor
 
370
 
371 95 mohor
always @ (posedge tck_i or posedge wb_rst_i)
372 2 mohor
begin
373 95 mohor
  if (wb_rst_i)
374 81 mohor
    chain_select <= #1 1'b0;
375
  else if(selecting_command & tdi_i)       // Chain select
376
    chain_select <= #1 1'b1;
377
  else if (update_dr_i)
378
    chain_select <= #1 1'b0;
379 2 mohor
end
380
 
381
 
382 81 mohor
always @ (chain)
383 2 mohor
begin
384 81 mohor
  cpu_debug_scan_chain  <= #1 1'b0;
385
  wishbone_scan_chain   <= #1 1'b0;
386
  chain_select_error    <= #1 1'b0;
387
 
388
  case (chain)                /* synthesis parallel_case */
389
    `CPU_DEBUG_CHAIN      :   cpu_debug_scan_chain  <= #1 1'b1;
390
    `WISHBONE_SCAN_CHAIN  :   wishbone_scan_chain   <= #1 1'b1;
391
    default               :   chain_select_error    <= #1 1'b1;
392
  endcase
393 2 mohor
end
394
 
395 20 mohor
 
396 99 mohor
assign chain_latch_en = chain_select & crc_cnt_end & (~crc_cnt_end_q);
397
 
398
 
399 95 mohor
always @ (posedge tck_i or posedge wb_rst_i)
400 67 simons
begin
401 95 mohor
  if (wb_rst_i)
402 81 mohor
    chain <= `CHAIN_ID_LENGTH'b111;
403 99 mohor
  else if(chain_latch_en & crc_match)
404 81 mohor
    chain <= #1 chain_dr[`CHAIN_DATA_LEN -1:1];
405 67 simons
end
406
 
407 2 mohor
 
408 81 mohor
assign data_shift_en = shift_dr_i & (~data_cnt_end);
409 2 mohor
 
410
 
411 81 mohor
always @ (posedge tck_i)
412 2 mohor
begin
413 81 mohor
  if (data_shift_en)
414
    chain_dr[`CHAIN_DATA_LEN -1:0] <= #1 {tdi_i, chain_dr[`CHAIN_DATA_LEN -1:1]};
415 2 mohor
end
416
 
417
 
418 81 mohor
// Calculating crc for input data
419
dbg_crc32_d1 i_dbg_crc32_d1_in
420
             (
421
              .data       (tdi_i),
422
              .enable     (shift_dr_i),
423
              .shift      (1'b0),
424 95 mohor
              .rst        (wb_rst_i),
425 81 mohor
              .sync_rst   (update_dr_i),
426
              .crc_out    (),
427
              .clk        (tck_i),
428
              .crc_match  (crc_match)
429
             );
430 2 mohor
 
431 12 mohor
 
432 81 mohor
reg tdo_chain_select;
433
wire crc_en;
434
wire crc_en_dbg;
435
reg crc_started;
436 99 mohor
assign crc_en = crc_en_dbg | crc_en_wb | crc_en_cpu;
437 81 mohor
assign crc_en_dbg = shift_dr_i & crc_cnt_end & (~status_cnt_end);
438 12 mohor
 
439 81 mohor
always @ (posedge tck_i)
440 12 mohor
begin
441 81 mohor
  if (crc_en)
442
    crc_started <= #1 1'b1;
443
  else if (update_dr_i)
444
    crc_started <= #1 1'b0;
445 12 mohor
end
446
 
447
 
448 81 mohor
reg tdo_tmp;
449 12 mohor
 
450 51 mohor
 
451 81 mohor
// Calculating crc for input data
452
dbg_crc32_d1 i_dbg_crc32_d1_out
453
             (
454
              .data       (tdo_tmp),
455
              .enable     (crc_en), // enable has priority
456
//              .shift      (1'b0),
457
              .shift      (shift_dr_i & crc_started & (~crc_en)),
458 95 mohor
              .rst        (wb_rst_i),
459 81 mohor
              .sync_rst   (update_dr_i),
460
              .crc_out    (crc_out),
461
              .clk        (tck_i),
462
              .crc_match  ()
463
             );
464 51 mohor
 
465 81 mohor
// Following status is shifted out: 
466
// 1. bit:          1 if crc is OK, else 0
467
// 2. bit:          1 if command is "chain select", else 0
468
// 3. bit:          1 if non-existing chain is selected else 0
469
// 4. bit:          always 1
470 51 mohor
 
471 81 mohor
reg [799:0] current_on_tdo;
472 51 mohor
 
473 81 mohor
always @ (status_cnt or chain_select or crc_match or chain_select_error or crc_out)
474 51 mohor
begin
475 81 mohor
  case (status_cnt)                   /* synthesis full_case parallel_case */
476
    `STATUS_CNT'd0  : begin
477
                        tdo_chain_select = crc_match;
478
                        current_on_tdo = "crc_match";
479
                      end
480
    `STATUS_CNT'd1  : begin
481
                        tdo_chain_select = chain_select;
482
                        current_on_tdo = "chain_select";
483
                      end
484
    `STATUS_CNT'd2  : begin
485
                        tdo_chain_select = chain_select_error;
486
                        current_on_tdo = "chain_select_error";
487
                      end
488
    `STATUS_CNT'd3  : begin
489
                        tdo_chain_select = 1'b1;
490
                        current_on_tdo = "one 1";
491
                      end
492
    `STATUS_CNT'd4  : begin
493
                        tdo_chain_select = crc_out;
494
                  //      tdo_chain_select = 1'hz;
495
                        current_on_tdo = "crc_out";
496
                      end
497
  endcase
498 51 mohor
end
499
 
500
 
501 5 mohor
 
502 99 mohor
 
503
assign shift_crc = shift_crc_wb | shift_crc_cpu;
504
 
505 106 simons
always @ (shift_crc or crc_out or wishbone_ce or tdo_wb  or tdo_cpu or tdo_chain_select or cpu_ce)
506 11 mohor
begin
507 99 mohor
  if (shift_crc)          // shifting crc
508 81 mohor
    tdo_tmp = crc_out;
509
  else if (wishbone_ce)   //  shifting data from wb
510
    tdo_tmp = tdo_wb;
511 99 mohor
  else if (cpu_ce)        // shifting data from cpu
512
    tdo_tmp = tdo_cpu;
513 11 mohor
  else
514 81 mohor
    tdo_tmp = tdo_chain_select;
515 11 mohor
end
516 9 mohor
 
517 11 mohor
 
518 81 mohor
always @ (negedge tck_i)
519 2 mohor
begin
520 81 mohor
  tdo_o <= #1 tdo_tmp;
521 2 mohor
end
522
 
523
 
524
 
525
 
526 81 mohor
// Signals for WISHBONE module
527 9 mohor
 
528
 
529 95 mohor
always @ (posedge tck_i or posedge wb_rst_i)
530 2 mohor
begin
531 95 mohor
  if (wb_rst_i)
532 99 mohor
    begin
533
      wishbone_ce <= #1 1'b0;
534
      cpu_ce <= #1 1'b0;
535
    end
536
  else if(selecting_command & (~tdi_i))
537
    begin
538
      if (wishbone_scan_chain)      // wishbone CE
539
        wishbone_ce <= #1 1'b1;
540
      if (cpu_debug_scan_chain)     // CPU CE
541
        cpu_ce <= #1 1'b1;
542
    end
543 81 mohor
  else if (update_dr_i)   // igor !!! This needs to be changed?
544 99 mohor
    begin
545
      wishbone_ce <= #1 1'b0;
546
      cpu_ce <= #1 1'b0;
547
    end
548 2 mohor
end
549
 
550
 
551 99 mohor
assign tdi_wb  = wishbone_ce & tdi_i;
552
assign tdi_cpu = cpu_ce & tdi_i;
553 2 mohor
 
554 99 mohor
 
555 81 mohor
// Connecting wishbone module
556
dbg_wb i_dbg_wb (
557
                  // JTAG signals
558 101 mohor
                  .tck_i            (tck_i),
559
                  .tdi_i            (tdi_wb),
560
                  .tdo_o            (tdo_wb),
561 2 mohor
 
562 81 mohor
                  // TAP states
563 101 mohor
                  .shift_dr_i       (shift_dr_i),
564
                  .pause_dr_i       (pause_dr_i),
565
                  .update_dr_i      (update_dr_i),
566 2 mohor
 
567 101 mohor
                  .wishbone_ce_i    (wishbone_ce),
568
                  .crc_match_i      (crc_match),
569
                  .crc_en_o         (crc_en_wb),
570
                  .shift_crc_o      (shift_crc_wb),
571
                  .rst_i            (wb_rst_i),
572 2 mohor
 
573 81 mohor
                  // WISHBONE common signals
574 101 mohor
                  .wb_clk_i         (wb_clk_i),
575 5 mohor
 
576 81 mohor
                  // WISHBONE master interface
577 101 mohor
                  .wb_adr_o         (wb_adr_o),
578
                  .wb_dat_o         (wb_dat_o),
579
                  .wb_dat_i         (wb_dat_i),
580
                  .wb_cyc_o         (wb_cyc_o),
581
                  .wb_stb_o         (wb_stb_o),
582
                  .wb_sel_o         (wb_sel_o),
583
                  .wb_we_o          (wb_we_o),
584
                  .wb_ack_i         (wb_ack_i),
585
                  .wb_cab_o         (wb_cab_o),
586
                  .wb_err_i         (wb_err_i),
587
                  .wb_cti_o         (wb_cti_o),
588
                  .wb_bte_o         (wb_bte_o)
589 81 mohor
            );
590 2 mohor
 
591 99 mohor
 
592
// Connecting cpu module
593
dbg_cpu i_dbg_cpu (
594
                  // JTAG signals
595 101 mohor
                  .tck_i            (tck_i),
596
                  .tdi_i            (tdi_cpu),
597
                  .tdo_o            (tdo_cpu),
598 99 mohor
 
599
                  // TAP states
600 101 mohor
                  .shift_dr_i       (shift_dr_i),
601
                  .pause_dr_i       (pause_dr_i),
602
                  .update_dr_i      (update_dr_i),
603 99 mohor
 
604 101 mohor
                  .cpu_ce_i         (cpu_ce),
605
                  .crc_match_i      (crc_match),
606
                  .crc_en_o         (crc_en_cpu),
607
                  .shift_crc_o      (shift_crc_cpu),
608
                  .rst_i            (wb_rst_i),
609
 
610
                  // CPU signals
611
                  .cpu_clk_i        (cpu_clk_i),
612
                  .cpu_addr_o       (cpu_addr_o),
613
                  .cpu_data_i       (cpu_data_i),
614
                  .cpu_data_o       (cpu_data_o),
615
                  .cpu_bp_i         (cpu_bp_i),
616
                  .cpu_stall_o      (cpu_stall_o),
617
                  .cpu_stall_all_o  (cpu_stall_all_o),
618
                  .cpu_stb_o        (cpu_stb_o),
619
                  .cpu_sel_o        (cpu_sel_o),
620
                  .cpu_we_o         (cpu_we_o),
621
                  .cpu_ack_i        (cpu_ack_i),
622
                  .cpu_rst_o        (cpu_rst_o)
623
 
624
 
625 99 mohor
              );
626
 
627
 
628 9 mohor
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.