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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [tags/] [rel_21/] [rtl/] [verilog/] [dbg_top.v] - Blame information for rev 101

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

powered by: WebSVN 2.1.0

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