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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [trunk/] [rtl/] [verilog/] [dbg_top.v] - Blame information for rev 57

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
////                                                              ////
10
////  Author(s):                                                  ////
11
////       Igor Mohor                                             ////
12
////       igorm@opencores.org                                    ////
13
////                                                              ////
14
////                                                              ////
15 52 mohor
////  All additional information is available in the README.txt   ////
16 2 mohor
////  file.                                                       ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20 52 mohor
//// Copyright (C) 2000,2001, 2002 Authors                        ////
21 2 mohor
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 2.1 of the License, or (at your option) any   ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.opencores.org/lgpl.shtml                     ////
42
////                                                              ////
43
//////////////////////////////////////////////////////////////////////
44
//
45
// CVS Revision History
46
//
47
// $Log: not supported by cvs2svn $
48 57 simons
// Revision 1.28  2002/11/06 14:22:41  mohor
49
// Trst signal is not inverted here any more. Inverted on higher layer !!!.
50
//
51 52 mohor
// Revision 1.27  2002/10/10 02:42:55  mohor
52
// WISHBONE Scan Chain is changed to reflect state of the WISHBONE access (WBInProgress bit added). Internal counter is used (counts 256 wb_clk cycles) and when counter exceeds that value, wb_cyc_o is negated.
53
//
54 51 mohor
// Revision 1.26  2002/05/07 14:43:59  mohor
55
// mon_cntl_o signals that controls monitor mux added.
56
//
57 47 mohor
// Revision 1.25  2002/04/22 12:54:11  mohor
58
// Signal names changed to lower case.
59
//
60 44 mohor
// Revision 1.24  2002/04/17 13:17:01  mohor
61
// Intentional error removed.
62
//
63 43 mohor
// Revision 1.23  2002/04/17 11:16:33  mohor
64
// A block for checking possible simulation/synthesis missmatch added.
65
//
66 42 mohor
// Revision 1.22  2002/03/12 10:31:53  mohor
67
// tap_top and dbg_top modules are put into two separate modules. tap_top
68
// contains only tap state machine and related logic. dbg_top contains all
69
// logic necessery for debugging.
70
//
71 37 mohor
// Revision 1.21  2002/03/08 15:28:16  mohor
72
// Structure changed. Hooks for jtag chain added.
73
//
74 36 mohor
// Revision 1.20  2002/02/06 12:23:09  mohor
75
// LatchedJTAG_IR used when muxing TDO instead of JTAG_IR.
76
//
77 33 mohor
// Revision 1.19  2002/02/05 13:34:51  mohor
78
// Stupid bug that was entered by previous update fixed.
79
//
80 32 mohor
// Revision 1.18  2002/02/05 12:41:01  mohor
81
// trst synchronization is not needed and was removed.
82
//
83 31 mohor
// Revision 1.17  2002/01/25 07:58:35  mohor
84
// IDCODE bug fixed, chains reused to decreas size of core. Data is shifted-in
85
// not filled-in. Tested in hw.
86
//
87 30 mohor
// Revision 1.16  2001/12/20 11:17:26  mohor
88
// TDO and TDO Enable signal are separated into two signals.
89
//
90 28 mohor
// Revision 1.15  2001/12/05 13:28:21  mohor
91
// trst signal is synchronized to wb_clk_i.
92
//
93 25 mohor
// Revision 1.14  2001/11/28 09:36:15  mohor
94
// Register length fixed.
95
//
96 22 mohor
// Revision 1.13  2001/11/27 13:37:43  mohor
97
// CRC is returned when chain selection data is transmitted.
98
//
99 21 mohor
// Revision 1.12  2001/11/26 10:47:09  mohor
100
// Crc generation is different for read or write commands. Small synthesys fixes.
101
//
102 20 mohor
// Revision 1.11  2001/11/14 10:10:41  mohor
103
// Wishbone data latched on wb_clk_i instead of risc_clk.
104
//
105 19 mohor
// Revision 1.10  2001/11/12 01:11:27  mohor
106
// Reset signals are not combined any more.
107
//
108 18 mohor
// Revision 1.9  2001/10/19 11:40:01  mohor
109
// dbg_timescale.v changed to timescale.v This is done for the simulation of
110
// few different cores in a single project.
111
//
112 17 mohor
// Revision 1.8  2001/10/17 10:39:03  mohor
113
// bs_chain_o added.
114
//
115 15 mohor
// Revision 1.7  2001/10/16 10:09:56  mohor
116
// Signal names changed to lowercase.
117 13 mohor
//
118 15 mohor
//
119 13 mohor
// Revision 1.6  2001/10/15 09:55:47  mohor
120
// Wishbone interface added, few fixes for better performance,
121
// hooks for boundary scan testing added.
122
//
123 12 mohor
// Revision 1.5  2001/09/24 14:06:42  mohor
124
// Changes connected to the OpenRISC access (SPR read, SPR write).
125
//
126 11 mohor
// Revision 1.4  2001/09/20 10:11:25  mohor
127
// Working version. Few bugs fixed, comments added.
128
//
129 9 mohor
// Revision 1.3  2001/09/19 11:55:13  mohor
130
// Asynchronous set/reset not used in trace any more.
131
//
132 8 mohor
// Revision 1.2  2001/09/18 14:13:47  mohor
133
// Trace fixed. Some registers changed, trace simplified.
134
//
135 5 mohor
// Revision 1.1.1.1  2001/09/13 13:49:19  mohor
136
// Initial official release.
137
//
138 2 mohor
// Revision 1.3  2001/06/01 22:22:35  mohor
139
// This is a backup. It is not a fully working version. Not for use, yet.
140
//
141
// Revision 1.2  2001/05/18 13:10:00  mohor
142
// Headers changed. All additional information is now avaliable in the README.txt file.
143
//
144
// Revision 1.1.1.1  2001/05/18 06:35:02  mohor
145
// Initial release
146
//
147
//
148
 
149 20 mohor
// synopsys translate_off
150 17 mohor
`include "timescale.v"
151 20 mohor
// synopsys translate_on
152 2 mohor
`include "dbg_defines.v"
153
 
154
// Top module
155 9 mohor
module dbg_top(
156
 
157
                // RISC signals
158 11 mohor
                risc_clk_i, risc_addr_o, risc_data_i, risc_data_o, wp_i,
159 57 simons
                bp_i, opselect_o, lsstatus_i, istatus_i,
160
                risc_stall_o, risc_stall_all_o, risc_sel_o, reset_o,
161
 
162 12 mohor
                // WISHBONE common signals
163
                wb_rst_i, wb_clk_i,
164
 
165
                // WISHBONE master interface
166
                wb_adr_o, wb_dat_o, wb_dat_i, wb_cyc_o, wb_stb_o, wb_sel_o,
167 36 mohor
                wb_we_o, wb_ack_i, wb_cab_o, wb_err_i,
168 12 mohor
 
169 36 mohor
                // TAP states
170
                ShiftDR, Exit1DR, UpdateDR, UpdateDR_q,
171
 
172
                // Instructions
173
                IDCODESelected, CHAIN_SELECTSelected, DEBUGSelected,
174
 
175
                // TAP signals
176 37 mohor
                trst_in, tck, tdi, TDOData,
177 36 mohor
 
178 47 mohor
                BypassRegister,
179
 
180
                // Monitor mux control
181
                mon_cntl_o
182 37 mohor
 
183 2 mohor
              );
184
 
185
parameter Tp = 1;
186
 
187
 
188 9 mohor
// RISC signals
189 11 mohor
input         risc_clk_i;                 // Master clock (RISC clock)
190 9 mohor
input  [31:0] risc_data_i;                // RISC data inputs (data that is written to the RISC registers)
191
input  [10:0] wp_i;                       // Watchpoint inputs
192
input         bp_i;                       // Breakpoint input
193
input  [3:0]  lsstatus_i;                 // Load/store status inputs
194
input  [1:0]  istatus_i;                  // Instruction status inputs
195
output [31:0] risc_addr_o;                // RISC address output (for adressing registers within RISC)
196
output [31:0] risc_data_o;                // RISC data output (data read from risc registers)
197
output [`OPSELECTWIDTH-1:0] opselect_o;   // Operation selection (selecting what kind of data is set to the risc_data_i)
198 57 simons
output         risc_stall_o;              // Stalls the selected RISC
199
output         risc_stall_all_o;          // Stalls all the rest RISCs
200
output [`RISC_NUM-1:0] risc_sel_o;        // Stalls all the rest RISCs
201
output         reset_o;                   // Resets the RISC
202 2 mohor
 
203
 
204 12 mohor
// WISHBONE common signals
205 9 mohor
input         wb_rst_i;                   // WISHBONE reset
206 12 mohor
input         wb_clk_i;                   // WISHBONE clock
207 9 mohor
 
208 12 mohor
// WISHBONE master interface
209
output [31:0] wb_adr_o;
210
output [31:0] wb_dat_o;
211
input  [31:0] wb_dat_i;
212
output        wb_cyc_o;
213
output        wb_stb_o;
214
output  [3:0] wb_sel_o;
215
output        wb_we_o;
216
input         wb_ack_i;
217
output        wb_cab_o;
218
input         wb_err_i;
219 9 mohor
 
220
// TAP states
221 36 mohor
input         ShiftDR;
222
input         Exit1DR;
223
input         UpdateDR;
224
input         UpdateDR_q;
225 2 mohor
 
226 37 mohor
input trst_in;
227 36 mohor
input tck;
228
input tdi;
229 2 mohor
 
230 36 mohor
input BypassRegister;
231 9 mohor
 
232 36 mohor
output TDOData;
233 47 mohor
output [3:0] mon_cntl_o;
234 36 mohor
 
235 9 mohor
// Defining which instruction is selected
236 36 mohor
input         IDCODESelected;
237
input         CHAIN_SELECTSelected;
238
input         DEBUGSelected;
239 2 mohor
 
240 36 mohor
reg           wb_cyc_o;
241 9 mohor
 
242 36 mohor
reg [31:0]    ADDR;
243
reg [31:0]    DataOut;
244 11 mohor
 
245 36 mohor
reg [`OPSELECTWIDTH-1:0] opselect_o;        // Operation selection (selecting what kind of data is set to the risc_data_i)
246 2 mohor
 
247 36 mohor
reg [`CHAIN_ID_LENGTH-1:0] Chain;           // Selected chain
248
reg [31:0]    DataReadLatch;                // Data when reading register or RISC is latched one risc_clk_i clock after the data is read.
249
reg           RegAccessTck;                 // Indicates access to the registers (read or write)
250
reg           RISCAccessTck;                // Indicates access to the RISC (read or write)
251
reg [7:0]     BitCounter;                   // Counting bits in the ShiftDR and Exit1DR stages
252
reg           RW;                           // Read/Write bit
253
reg           CrcMatch;                     // The crc that is shifted in and the internaly calculated crc are equal
254 2 mohor
 
255 36 mohor
reg           RegAccess_q;                  // Delayed signals used for accessing the registers
256
reg           RegAccess_q2;                 // Delayed signals used for accessing the registers
257
reg           RISCAccess_q;                 // Delayed signals used for accessing the RISC
258
reg           RISCAccess_q2;                // Delayed signals used for accessing the RISC
259 57 simons
reg           RISCAccess_q3;                // Delayed signals used for accessing the RISC
260 2 mohor
 
261 36 mohor
reg           wb_AccessTck;                 // Indicates access to the WISHBONE
262
reg [31:0]    WBReadLatch;                  // Data latched during WISHBONE read
263
reg           WBErrorLatch;                 // Error latched during WISHBONE read
264 51 mohor
reg           WBInProgress;                 // WISHBONE access is in progress
265
reg [7:0]     WBAccessCounter;              // Counting access cycles. WBInProgress is cleared to 0 after counter exceeds 0xff
266
wire          WBAccessCounterExceed;        // Marks when the WBAccessCounter exceeds max value (oxff)
267
reg           WBInProgress_sync1;           // Synchronizing WBInProgress
268
reg           WBInProgress_tck;             // Synchronizing WBInProgress to tck clock signal
269 30 mohor
 
270 37 mohor
wire trst;
271 30 mohor
 
272 37 mohor
 
273 9 mohor
wire [31:0]             RegDataIn;        // Data from registers (read data)
274
wire [`CRC_LENGTH-1:0]  CalculatedCrcOut; // CRC calculated in this module. This CRC is apended at the end of the TDO.
275 2 mohor
 
276 9 mohor
wire RiscStall_reg;                       // RISC is stalled by setting the register bit
277
wire RiscReset_reg;                       // RISC is reset by setting the register bit
278
wire RiscStall_trace;                     // RISC is stalled by trace module
279
 
280
 
281
wire RegisterScanChain;                   // Register Scan chain selected
282
wire RiscDebugScanChain;                  // Risc Debug Scan chain selected
283 12 mohor
wire WishboneScanChain;                   // WISHBONE Scan chain selected
284 11 mohor
 
285
wire RiscStall_read_access;               // Stalling RISC because of the read access (SPR read)
286
wire RiscStall_write_access;              // Stalling RISC because of the write access (SPR write)
287
wire RiscStall_access;                    // Stalling RISC because of the read or write access
288
 
289 30 mohor
wire BitCounter_Lt4;
290
wire BitCounter_Eq5;
291
wire BitCounter_Eq32;
292
wire BitCounter_Lt38;
293
wire BitCounter_Lt65;
294
 
295 15 mohor
 
296
 
297 9 mohor
// This signals are used only when TRACE is used in the design
298 2 mohor
`ifdef TRACE_ENABLED
299 9 mohor
  wire [39:0] TraceChain;                 // Chain that comes from trace module
300 36 mohor
  reg  ReadBuffer_Tck;                    // Command for incrementing the trace read pointer (synchr with tck)
301 9 mohor
  wire ReadTraceBuffer;                   // Command for incrementing the trace read pointer (synchr with MClk)
302
  reg  ReadTraceBuffer_q;                 // Delayed command for incrementing the trace read pointer (synchr with MClk)
303
  wire ReadTraceBufferPulse;              // Pulse for reading the trace buffer (valid for only one Mclk command)
304 2 mohor
 
305
  // Outputs from registers
306 9 mohor
  wire ContinMode;                        // Trace working in continous mode
307
  wire TraceEnable;                       // Trace enabled
308 2 mohor
 
309 9 mohor
  wire [10:0] WpTrigger;                  // Watchpoint starts trigger
310
  wire        BpTrigger;                  // Breakpoint starts trigger
311
  wire [3:0]  LSSTrigger;                 // Load/store status starts trigger
312
  wire [1:0]  ITrigger;                   // Instruction status starts trigger
313
  wire [1:0]  TriggerOper;                // Trigger operation
314 2 mohor
 
315 9 mohor
  wire        WpTriggerValid;             // Watchpoint trigger is valid
316
  wire        BpTriggerValid;             // Breakpoint trigger is valid
317
  wire        LSSTriggerValid;            // Load/store status trigger is valid
318
  wire        ITriggerValid;              // Instruction status trigger is valid
319 2 mohor
 
320 9 mohor
  wire [10:0] WpQualif;                   // Watchpoint starts qualifier
321
  wire        BpQualif;                   // Breakpoint starts qualifier
322
  wire [3:0]  LSSQualif;                  // Load/store status starts qualifier
323
  wire [1:0]  IQualif;                    // Instruction status starts qualifier
324
  wire [1:0]  QualifOper;                 // Qualifier operation
325 2 mohor
 
326 9 mohor
  wire        WpQualifValid;              // Watchpoint qualifier is valid
327
  wire        BpQualifValid;              // Breakpoint qualifier is valid
328
  wire        LSSQualifValid;             // Load/store status qualifier is valid
329
  wire        IQualifValid;               // Instruction status qualifier is valid
330 2 mohor
 
331 9 mohor
  wire [10:0] WpStop;                     // Watchpoint stops recording of the trace
332
  wire        BpStop;                     // Breakpoint stops recording of the trace
333
  wire [3:0]  LSSStop;                    // Load/store status stops recording of the trace
334
  wire [1:0]  IStop;                      // Instruction status stops recording of the trace
335
  wire [1:0]  StopOper;                   // Stop operation
336 2 mohor
 
337 9 mohor
  wire WpStopValid;                       // Watchpoint stop is valid
338
  wire BpStopValid;                       // Breakpoint stop is valid
339
  wire LSSStopValid;                      // Load/store status stop is valid
340
  wire IStopValid;                        // Instruction status stop is valid
341 2 mohor
 
342 9 mohor
  wire RecordPC;                          // Recording program counter
343
  wire RecordLSEA;                        // Recording load/store effective address
344
  wire RecordLDATA;                       // Recording load data
345
  wire RecordSDATA;                       // Recording store data
346
  wire RecordReadSPR;                     // Recording read SPR
347
  wire RecordWriteSPR;                    // Recording write SPR
348
  wire RecordINSTR;                       // Recording instruction
349 2 mohor
 
350
  // End: Outputs from registers
351
 
352 9 mohor
  wire TraceTestScanChain;                // Trace Test Scan chain selected
353
  wire [47:0] Trace_Data;                 // Trace data
354 2 mohor
 
355 11 mohor
  wire [`OPSELECTWIDTH-1:0]opselect_trace;// Operation selection (trace selecting what kind of
356
                                          // data is set to the risc_data_i)
357 30 mohor
  wire BitCounter_Lt40;
358 11 mohor
 
359 2 mohor
`endif
360
 
361
 
362 52 mohor
assign trst = trst_in;                   // trst_pad_i is active high !!! Inverted on higher layer.
363 25 mohor
 
364
 
365 2 mohor
/**********************************************************************************
366
*                                                                                 *
367
*   JTAG_DR:  JTAG Data Register                                                  *
368
*                                                                                 *
369
**********************************************************************************/
370
reg [`DR_LENGTH-1:0]JTAG_DR_IN;    // Data register
371
reg TDOData;
372
 
373
 
374 36 mohor
always @ (posedge tck or posedge trst)
375 2 mohor
begin
376 18 mohor
  if(trst)
377 2 mohor
    JTAG_DR_IN[`DR_LENGTH-1:0]<=#Tp 0;
378
  else
379 30 mohor
  if(IDCODESelected)                          // To save space JTAG_DR_IN is also used for shifting out IDCODE
380
    begin
381
      if(ShiftDR)
382 36 mohor
        JTAG_DR_IN[31:0] <= #Tp {tdi, JTAG_DR_IN[31:1]};
383 30 mohor
      else
384
        JTAG_DR_IN[31:0] <= #Tp `IDCODE_VALUE;
385
    end
386
  else
387
  if(CHAIN_SELECTSelected & ShiftDR)
388 36 mohor
    JTAG_DR_IN[12:0] <= #Tp {tdi, JTAG_DR_IN[12:1]};
389 30 mohor
  else
390
  if(DEBUGSelected & ShiftDR)
391
    begin
392
      if(RiscDebugScanChain | WishboneScanChain)
393 36 mohor
        JTAG_DR_IN[73:0] <= #Tp {tdi, JTAG_DR_IN[73:1]};
394 30 mohor
      else
395
      if(RegisterScanChain)
396 36 mohor
        JTAG_DR_IN[46:0] <= #Tp {tdi, JTAG_DR_IN[46:1]};
397 30 mohor
    end
398 2 mohor
end
399 30 mohor
 
400 22 mohor
wire [73:0] RISC_Data;
401
wire [46:0] Register_Data;
402
wire [73:0] WISHBONE_Data;
403 21 mohor
wire [12:0] chain_sel_data;
404 12 mohor
wire wb_Access_wbClk;
405 2 mohor
 
406
 
407 30 mohor
reg select_crc_out;
408 36 mohor
always @ (posedge tck or posedge trst)
409 30 mohor
begin
410
  if(trst)
411
    select_crc_out <= 0;
412
  else
413
  if( RegisterScanChain  & BitCounter_Eq5  |
414
      RiscDebugScanChain & BitCounter_Eq32 |
415
      WishboneScanChain  & BitCounter_Eq32 )
416 36 mohor
    select_crc_out <=#Tp tdi;
417 30 mohor
  else
418
  if(CHAIN_SELECTSelected)
419
    select_crc_out <=#Tp 1;
420
  else
421
  if(UpdateDR)
422
    select_crc_out <=#Tp 0;
423
end
424 12 mohor
 
425 20 mohor
wire [8:0] send_crc;
426
 
427 30 mohor
assign send_crc = select_crc_out? {9{BypassRegister}}    :    // Calculated CRC is returned when read operation is
428
                                  {CalculatedCrcOut, 1'b0} ;  // performed, else received crc is returned (loopback).
429 20 mohor
 
430 30 mohor
assign RISC_Data      = {send_crc, DataReadLatch, 33'h0};
431
assign Register_Data  = {send_crc, DataReadLatch, 6'h0};
432 51 mohor
assign WISHBONE_Data  = {send_crc, WBReadLatch, 31'h0, WBInProgress, WBErrorLatch};
433 21 mohor
assign chain_sel_data = {send_crc, 4'h0};
434 20 mohor
 
435
 
436
`ifdef TRACE_ENABLED
437 2 mohor
  assign Trace_Data     = {CalculatedCrcOut, TraceChain};
438
`endif
439
 
440 36 mohor
//TDO is changing on the falling edge of tck
441
always @ (negedge tck or posedge trst)
442 2 mohor
begin
443 18 mohor
  if(trst)
444 2 mohor
    begin
445
      TDOData <= #Tp 0;
446
      `ifdef TRACE_ENABLED
447
      ReadBuffer_Tck<=#Tp 0;
448
      `endif
449
    end
450
  else
451
  if(UpdateDR)
452
    begin
453
      TDOData <= #Tp CrcMatch;
454
      `ifdef TRACE_ENABLED
455 9 mohor
      if(DEBUGSelected & TraceTestScanChain & TraceChain[0])  // Sample in the trace buffer is valid
456
        ReadBuffer_Tck<=#Tp 1;                                // Increment read pointer
457 2 mohor
      `endif
458
    end
459
  else
460
    begin
461
      if(ShiftDR)
462
        begin
463
          if(IDCODESelected)
464 36 mohor
            TDOData <= #Tp JTAG_DR_IN[0]; // IDCODE is shifted out 32-bits, then tdi is bypassed
465 2 mohor
          else
466
          if(CHAIN_SELECTSelected)
467 21 mohor
            TDOData <= #Tp chain_sel_data[BitCounter];        // Received crc is sent back
468 2 mohor
          else
469
          if(DEBUGSelected)
470
            begin
471
              if(RiscDebugScanChain)
472 9 mohor
                TDOData <= #Tp RISC_Data[BitCounter];         // Data read from RISC in the previous cycle is shifted out
473 2 mohor
              else
474
              if(RegisterScanChain)
475 9 mohor
                TDOData <= #Tp Register_Data[BitCounter];     // Data read from register in the previous cycle is shifted out
476 12 mohor
              else
477
              if(WishboneScanChain)
478
                TDOData <= #Tp WISHBONE_Data[BitCounter];     // Data read from the WISHBONE slave
479 2 mohor
              `ifdef TRACE_ENABLED
480
              else
481
              if(TraceTestScanChain)
482 9 mohor
                TDOData <= #Tp Trace_Data[BitCounter];        // Data from the trace buffer is shifted out
483 2 mohor
              `endif
484
            end
485
        end
486
      else
487
        begin
488
          TDOData <= #Tp 0;
489
          `ifdef TRACE_ENABLED
490
          ReadBuffer_Tck<=#Tp 0;
491
          `endif
492
        end
493
    end
494
end
495
 
496 42 mohor
 
497
//synopsys translate_off
498
always @ (posedge tck)
499
begin
500
  if(ShiftDR & CHAIN_SELECTSelected & BitCounter > 12)
501
    begin
502
      $display("\n%m Error: BitCounter is bigger then chain_sel_data bits width[12:0]. BitCounter=%d\n",BitCounter);
503
      $stop;
504
    end
505
  else
506
  if(ShiftDR & DEBUGSelected)
507
    begin
508
      if(RiscDebugScanChain & BitCounter > 73)
509
        begin
510
          $display("\n%m Error: BitCounter is bigger then RISC_Data bits width[73:0]. BitCounter=%d\n",BitCounter);
511
          $stop;
512
        end
513
      else
514 43 mohor
      if(RegisterScanChain & BitCounter > 46)
515 42 mohor
        begin
516
          $display("\n%m Error: BitCounter is bigger then RISC_Data bits width[46:0]. BitCounter=%d\n",BitCounter);
517
          $stop;
518
        end
519
      else
520
      if(WishboneScanChain & BitCounter > 73)
521
        begin
522
          $display("\n%m Error: BitCounter is bigger then WISHBONE_Data bits width[73:0]. BitCounter=%d\n",BitCounter);
523
          $stop;
524
        end
525
      `ifdef TRACE_ENABLED
526
      else
527
      if(TraceTestScanChain & BitCounter > 47)
528
        begin
529
          $display("\n%m Error: BitCounter is bigger then Trace_Data bits width[47:0]. BitCounter=%d\n",BitCounter);
530
          $stop;
531
        end
532
      `endif
533
    end
534
end
535
// synopsys translate_on
536
 
537
 
538
 
539
 
540
 
541
 
542
 
543
 
544 2 mohor
/**********************************************************************************
545
*                                                                                 *
546
*   End: JTAG_DR                                                                  *
547
*                                                                                 *
548
**********************************************************************************/
549
 
550
 
551
 
552
/**********************************************************************************
553
*                                                                                 *
554
*   CHAIN_SELECT logic                                                            *
555
*                                                                                 *
556
**********************************************************************************/
557 36 mohor
always @ (posedge tck or posedge trst)
558 2 mohor
begin
559 18 mohor
  if(trst)
560 9 mohor
    Chain[`CHAIN_ID_LENGTH-1:0]<=#Tp `GLOBAL_BS_CHAIN;  // Global BS chain is selected after reset
561 2 mohor
  else
562
  if(UpdateDR & CHAIN_SELECTSelected & CrcMatch)
563 9 mohor
    Chain[`CHAIN_ID_LENGTH-1:0]<=#Tp JTAG_DR_IN[3:0];   // New chain is selected
564 2 mohor
end
565
 
566
 
567
 
568
/**********************************************************************************
569
*                                                                                 *
570
*   Register read/write logic                                                     *
571
*   RISC registers read/write logic                                               *
572
*                                                                                 *
573
**********************************************************************************/
574 36 mohor
always @ (posedge tck or posedge trst)
575 2 mohor
begin
576 18 mohor
  if(trst)
577 2 mohor
    begin
578
      ADDR[31:0]        <=#Tp 32'h0;
579
      DataOut[31:0]     <=#Tp 32'h0;
580
      RW                <=#Tp 1'b0;
581
      RegAccessTck      <=#Tp 1'b0;
582
      RISCAccessTck     <=#Tp 1'b0;
583 12 mohor
      wb_AccessTck      <=#Tp 1'h0;
584 2 mohor
    end
585
  else
586
  if(UpdateDR & DEBUGSelected & CrcMatch)
587
    begin
588
      if(RegisterScanChain)
589
        begin
590
          ADDR[4:0]         <=#Tp JTAG_DR_IN[4:0];    // Latching address for register access
591
          RW                <=#Tp JTAG_DR_IN[5];      // latch R/W bit
592
          DataOut[31:0]     <=#Tp JTAG_DR_IN[37:6];   // latch data for write
593
          RegAccessTck      <=#Tp 1'b1;
594
        end
595
      else
596
      if(RiscDebugScanChain)
597
        begin
598
          ADDR[31:0]        <=#Tp JTAG_DR_IN[31:0];   // Latching address for RISC register access
599
          RW                <=#Tp JTAG_DR_IN[32];     // latch R/W bit
600
          DataOut[31:0]     <=#Tp JTAG_DR_IN[64:33];  // latch data for write
601
          RISCAccessTck     <=#Tp 1'b1;
602
        end
603 12 mohor
      else
604 51 mohor
      if(WishboneScanChain & (!WBInProgress_tck))
605 12 mohor
        begin
606 20 mohor
          ADDR              <=#Tp JTAG_DR_IN[31:0];   // Latching address for WISHBONE slave access
607
          RW                <=#Tp JTAG_DR_IN[32];     // latch R/W bit
608
          DataOut           <=#Tp JTAG_DR_IN[64:33];  // latch data for write
609 12 mohor
          wb_AccessTck      <=#Tp 1'b1;               // 
610
        end
611 2 mohor
    end
612
  else
613
    begin
614 36 mohor
      RegAccessTck      <=#Tp 1'b0;       // This signals are valid for one tck clock period only
615 2 mohor
      RISCAccessTck     <=#Tp 1'b0;
616 12 mohor
      wb_AccessTck      <=#Tp 1'b0;
617 2 mohor
    end
618
end
619
 
620 20 mohor
 
621
assign wb_adr_o = ADDR;
622
assign wb_we_o  = RW;
623
assign wb_dat_o = DataOut;
624 12 mohor
assign wb_sel_o[3:0] = 4'hf;
625
assign wb_cab_o = 1'b0;
626 20 mohor
 
627
 
628 11 mohor
// Synchronizing the RegAccess signal to risc_clk_i clock
629 36 mohor
dbg_sync_clk1_clk2 syn1 (.clk1(risc_clk_i),   .clk2(tck),           .reset1(wb_rst_i),  .reset2(trst),
630 2 mohor
                         .set2(RegAccessTck), .sync_out(RegAccess)
631
                        );
632
 
633 11 mohor
// Synchronizing the RISCAccess signal to risc_clk_i clock
634 36 mohor
dbg_sync_clk1_clk2 syn2 (.clk1(risc_clk_i),    .clk2(tck),          .reset1(wb_rst_i),  .reset2(trst),
635 2 mohor
                         .set2(RISCAccessTck), .sync_out(RISCAccess)
636
                        );
637
 
638
 
639 12 mohor
// Synchronizing the wb_Access signal to wishbone clock
640 36 mohor
dbg_sync_clk1_clk2 syn3 (.clk1(wb_clk_i),     .clk2(tck),           .reset1(wb_rst_i),  .reset2(trst),
641 12 mohor
                         .set2(wb_AccessTck), .sync_out(wb_Access_wbClk)
642
                        );
643
 
644
 
645
 
646
 
647
 
648 9 mohor
// Delayed signals used for accessing registers and RISC
649 18 mohor
always @ (posedge risc_clk_i or posedge wb_rst_i)
650 2 mohor
begin
651 18 mohor
  if(wb_rst_i)
652 2 mohor
    begin
653
      RegAccess_q   <=#Tp 1'b0;
654
      RegAccess_q2  <=#Tp 1'b0;
655
      RISCAccess_q  <=#Tp 1'b0;
656
      RISCAccess_q2 <=#Tp 1'b0;
657 57 simons
      RISCAccess_q3 <=#Tp 1'b0;
658 2 mohor
    end
659
  else
660
    begin
661
      RegAccess_q   <=#Tp RegAccess;
662
      RegAccess_q2  <=#Tp RegAccess_q;
663
      RISCAccess_q  <=#Tp RISCAccess;
664
      RISCAccess_q2 <=#Tp RISCAccess_q;
665 57 simons
      RISCAccess_q3 <=#Tp RISCAccess_q2;
666 2 mohor
    end
667
end
668
 
669 9 mohor
// Chip select and read/write signals for accessing RISC
670 57 simons
assign RiscStall_write_access = RISCAccess & ~RISCAccess_q2 &  RW;
671 11 mohor
assign RiscStall_read_access  = RISCAccess & ~RISCAccess_q2 & ~RW;
672 57 simons
assign RiscStall_access = RISCAccess & ~RISCAccess_q3;
673 2 mohor
 
674
 
675 12 mohor
reg wb_Access_wbClk_q;
676
// Delayed signals used for accessing WISHBONE
677 18 mohor
always @ (posedge wb_clk_i or posedge wb_rst_i)
678 12 mohor
begin
679 18 mohor
  if(wb_rst_i)
680 12 mohor
    wb_Access_wbClk_q <=#Tp 1'b0;
681
  else
682
    wb_Access_wbClk_q <=#Tp wb_Access_wbClk;
683
end
684
 
685 18 mohor
always @ (posedge wb_clk_i or posedge wb_rst_i)
686 12 mohor
begin
687 18 mohor
  if(wb_rst_i)
688 12 mohor
    wb_cyc_o <=#Tp 1'b0;
689
  else
690 51 mohor
  if(wb_Access_wbClk & ~wb_Access_wbClk_q)
691 12 mohor
    wb_cyc_o <=#Tp 1'b1;
692
  else
693 51 mohor
  if(wb_ack_i | wb_err_i | WBAccessCounterExceed)
694 12 mohor
    wb_cyc_o <=#Tp 1'b0;
695
end
696
 
697
assign wb_stb_o = wb_cyc_o;
698
 
699
 
700
// Latching data read from registers
701 19 mohor
always @ (posedge wb_clk_i or posedge wb_rst_i)
702 12 mohor
begin
703 18 mohor
  if(wb_rst_i)
704 12 mohor
    WBReadLatch[31:0]<=#Tp 32'h0;
705
  else
706
  if(wb_ack_i)
707
    WBReadLatch[31:0]<=#Tp wb_dat_i[31:0];
708
end
709
 
710
// Latching WISHBONE error cycle
711 18 mohor
always @ (posedge wb_clk_i or posedge wb_rst_i)
712 12 mohor
begin
713 18 mohor
  if(wb_rst_i)
714 12 mohor
    WBErrorLatch<=#Tp 1'b0;
715
  else
716
  if(wb_err_i)
717
    WBErrorLatch<=#Tp 1'b1;     // Latching wb_err_i while performing WISHBONE access
718 20 mohor
  else
719 12 mohor
  if(wb_ack_i)
720
    WBErrorLatch<=#Tp 1'b0;     // Clearing status
721
end
722
 
723
 
724 51 mohor
// WBInProgress is set at the beginning of the access and cleared when wb_ack_i or wb_err_i is set
725
always @ (posedge wb_clk_i or posedge wb_rst_i)
726
begin
727
  if(wb_rst_i)
728
    WBInProgress<=#Tp 1'b0;
729
  else
730
  if(wb_Access_wbClk & ~wb_Access_wbClk_q)
731
    WBInProgress<=#Tp 1'b1;
732
  else
733
  if(wb_ack_i | wb_err_i | WBAccessCounterExceed)
734
    WBInProgress<=#Tp 1'b0;
735
end
736
 
737
 
738
// Synchronizing WBInProgress
739
always @ (posedge wb_clk_i or posedge wb_rst_i)
740
begin
741
  if(wb_rst_i)
742
    WBAccessCounter<=#Tp 8'h0;
743
  else
744
  if(wb_ack_i | wb_err_i | WBAccessCounterExceed)
745
    WBAccessCounter<=#Tp 8'h0;
746
  else
747
  if(wb_cyc_o)
748
    WBAccessCounter<=#Tp WBAccessCounter + 1'b1;
749
end
750
 
751
assign WBAccessCounterExceed = WBAccessCounter==8'hff;
752
 
753
 
754
// Synchronizing WBInProgress
755
always @ (posedge tck)
756
begin
757
    WBInProgress_sync1<=#Tp WBInProgress;
758
    WBInProgress_tck<=#Tp WBInProgress_sync1;
759
end
760
 
761
 
762 9 mohor
// Whan enabled, TRACE stalls RISC while saving data to the trace buffer.
763 5 mohor
`ifdef TRACE_ENABLED
764 11 mohor
  assign  risc_stall_o = RiscStall_access | RiscStall_reg | RiscStall_trace ;
765 5 mohor
`else
766 12 mohor
  assign  risc_stall_o = RiscStall_access | RiscStall_reg;
767 5 mohor
`endif
768
 
769 11 mohor
assign  reset_o = RiscReset_reg;
770 5 mohor
 
771
 
772 12 mohor
`ifdef TRACE_ENABLED
773 11 mohor
always @ (RiscStall_write_access or RiscStall_read_access or opselect_trace)
774 12 mohor
`else
775
always @ (RiscStall_write_access or RiscStall_read_access)
776
`endif
777 11 mohor
begin
778
  if(RiscStall_write_access)
779
    opselect_o = `DEBUG_WRITE_SPR;  // Write spr
780
  else
781
  if(RiscStall_read_access)
782
    opselect_o = `DEBUG_READ_SPR;   // Read spr
783
  else
784 12 mohor
`ifdef TRACE_ENABLED
785 11 mohor
    opselect_o = opselect_trace;
786 12 mohor
`else
787
    opselect_o = 3'h0;
788
`endif
789 11 mohor
end
790 9 mohor
 
791 11 mohor
 
792 30 mohor
// Latching data read from RISC or registers
793 18 mohor
always @ (posedge risc_clk_i or posedge wb_rst_i)
794 2 mohor
begin
795 18 mohor
  if(wb_rst_i)
796 30 mohor
    DataReadLatch[31:0]<=#Tp 0;
797 2 mohor
  else
798
  if(RISCAccess_q & ~RISCAccess_q2)
799 30 mohor
    DataReadLatch[31:0]<=#Tp risc_data_i[31:0];
800
  else
801
  if(RegAccess_q & ~RegAccess_q2)
802
    DataReadLatch[31:0]<=#Tp RegDataIn[31:0];
803 2 mohor
end
804
 
805 12 mohor
assign risc_addr_o = ADDR;
806
assign risc_data_o = DataOut;
807 2 mohor
 
808
 
809
 
810
/**********************************************************************************
811
*                                                                                 *
812
*   Read Trace buffer logic                                                       *
813
*                                                                                 *
814
**********************************************************************************/
815
`ifdef TRACE_ENABLED
816
 
817 9 mohor
 
818 11 mohor
// Synchronizing the trace read buffer signal to risc_clk_i clock
819 36 mohor
dbg_sync_clk1_clk2 syn4 (.clk1(risc_clk_i),     .clk2(tck),           .reset1(wb_rst_i),  .reset2(trst),
820 9 mohor
                         .set2(ReadBuffer_Tck), .sync_out(ReadTraceBuffer)
821
                        );
822
 
823
 
824
 
825 18 mohor
  always @(posedge risc_clk_i or posedge wb_rst_i)
826 2 mohor
  begin
827 18 mohor
    if(wb_rst_i)
828 9 mohor
      ReadTraceBuffer_q <=#Tp 0;
829 2 mohor
    else
830 9 mohor
      ReadTraceBuffer_q <=#Tp ReadTraceBuffer;
831 2 mohor
  end
832 9 mohor
 
833
  assign ReadTraceBufferPulse = ReadTraceBuffer & ~ReadTraceBuffer_q;
834
 
835 2 mohor
`endif
836
 
837
/**********************************************************************************
838
*                                                                                 *
839
*   End: Read Trace buffer logic                                                  *
840
*                                                                                 *
841
**********************************************************************************/
842
 
843
 
844
 
845
 
846
 
847
/**********************************************************************************
848
*                                                                                 *
849
*   Bit counter                                                                   *
850
*                                                                                 *
851
**********************************************************************************/
852
 
853
 
854 36 mohor
always @ (posedge tck or posedge trst)
855 2 mohor
begin
856 18 mohor
  if(trst)
857 2 mohor
    BitCounter[7:0]<=#Tp 0;
858
  else
859
  if(ShiftDR)
860
    BitCounter[7:0]<=#Tp BitCounter[7:0]+1;
861
  else
862
  if(UpdateDR)
863
    BitCounter[7:0]<=#Tp 0;
864
end
865
 
866
 
867
 
868
/**********************************************************************************
869
*                                                                                 *
870
*   End: Bit counter                                                              *
871
*                                                                                 *
872
**********************************************************************************/
873
 
874
 
875
 
876
/**********************************************************************************
877
*                                                                                 *
878
*   Connecting Registers                                                          *
879
*                                                                                 *
880
**********************************************************************************/
881 44 mohor
dbg_registers dbgregs(.data_in(DataOut[31:0]), .data_out(RegDataIn[31:0]),
882
                      .address(ADDR[4:0]), .rw(RW), .access(RegAccess & ~RegAccess_q), .clk(risc_clk_i),
883
                      .bp(bp_i), .reset(wb_rst_i),
884 2 mohor
                      `ifdef TRACE_ENABLED
885 5 mohor
                      .ContinMode(ContinMode), .TraceEnable(TraceEnable),
886 2 mohor
                      .WpTrigger(WpTrigger), .BpTrigger(BpTrigger), .LSSTrigger(LSSTrigger),
887
                      .ITrigger(ITrigger), .TriggerOper(TriggerOper), .WpQualif(WpQualif),
888
                      .BpQualif(BpQualif), .LSSQualif(LSSQualif), .IQualif(IQualif),
889 5 mohor
                      .QualifOper(QualifOper), .RecordPC(RecordPC),
890
                      .RecordLSEA(RecordLSEA), .RecordLDATA(RecordLDATA),
891
                      .RecordSDATA(RecordSDATA), .RecordReadSPR(RecordReadSPR),
892
                      .RecordWriteSPR(RecordWriteSPR), .RecordINSTR(RecordINSTR),
893
                      .WpTriggerValid(WpTriggerValid),
894 2 mohor
                      .BpTriggerValid(BpTriggerValid), .LSSTriggerValid(LSSTriggerValid),
895
                      .ITriggerValid(ITriggerValid), .WpQualifValid(WpQualifValid),
896
                      .BpQualifValid(BpQualifValid), .LSSQualifValid(LSSQualifValid),
897
                      .IQualifValid(IQualifValid),
898
                      .WpStop(WpStop), .BpStop(BpStop), .LSSStop(LSSStop), .IStop(IStop),
899 5 mohor
                      .StopOper(StopOper), .WpStopValid(WpStopValid), .BpStopValid(BpStopValid),
900
                      .LSSStopValid(LSSStopValid), .IStopValid(IStopValid),
901 2 mohor
                      `endif
902 57 simons
                      .risc_stall(RiscStall_reg), .risc_stall_all(risc_stall_all_o), .risc_sel(risc_sel_o),
903
                      .risc_reset(RiscReset_reg), .mon_cntl_o(mon_cntl_o)
904 5 mohor
 
905 2 mohor
                     );
906
 
907
/**********************************************************************************
908
*                                                                                 *
909
*   End: Connecting Registers                                                     *
910
*                                                                                 *
911
**********************************************************************************/
912
 
913
 
914
/**********************************************************************************
915
*                                                                                 *
916
*   Connecting CRC module                                                         *
917
*                                                                                 *
918
**********************************************************************************/
919 18 mohor
wire AsyncResetCrc = trst;
920 9 mohor
wire SyncResetCrc = UpdateDR_q;
921 2 mohor
wire [7:0] CalculatedCrcIn;     // crc calculated from the input data (shifted in)
922
 
923 30 mohor
assign BitCounter_Lt4   = BitCounter<4;
924
assign BitCounter_Eq5   = BitCounter==5;
925
assign BitCounter_Eq32  = BitCounter==32;
926
assign BitCounter_Lt38  = BitCounter<38;
927
assign BitCounter_Lt65  = BitCounter<65;
928
 
929
`ifdef TRACE_ENABLED
930
  assign BitCounter_Lt40 = BitCounter<40;
931
`endif
932
 
933
 
934 2 mohor
wire EnableCrcIn = ShiftDR &
935 30 mohor
                  ( (CHAIN_SELECTSelected                 & BitCounter_Lt4) |
936
                    ((DEBUGSelected & RegisterScanChain)  & BitCounter_Lt38)|
937
                    ((DEBUGSelected & RiscDebugScanChain) & BitCounter_Lt65)|
938
                    ((DEBUGSelected & WishboneScanChain)  & BitCounter_Lt65)
939 9 mohor
                  );
940 2 mohor
 
941
wire EnableCrcOut= ShiftDR &
942 9 mohor
                   (
943 30 mohor
                    ((DEBUGSelected & RegisterScanChain)  & BitCounter_Lt38)|
944
                    ((DEBUGSelected & RiscDebugScanChain) & BitCounter_Lt65)|
945
                    ((DEBUGSelected & WishboneScanChain)  & BitCounter_Lt65)
946 2 mohor
                    `ifdef TRACE_ENABLED
947 30 mohor
                                                                            |
948
                    ((DEBUGSelected & TraceTestScanChain) & BitCounter_Lt40)
949 2 mohor
                    `endif
950 9 mohor
                   );
951 2 mohor
 
952
// Calculating crc for input data
953 44 mohor
dbg_crc8_d1 crc1 (.data(tdi), .enable_crc(EnableCrcIn), .reset(AsyncResetCrc), .sync_rst_crc(SyncResetCrc),
954
                  .crc_out(CalculatedCrcIn), .clk(tck));
955 2 mohor
 
956
// Calculating crc for output data
957 44 mohor
dbg_crc8_d1 crc2 (.data(TDOData), .enable_crc(EnableCrcOut), .reset(AsyncResetCrc), .sync_rst_crc(SyncResetCrc),
958
                  .crc_out(CalculatedCrcOut), .clk(tck));
959 2 mohor
 
960
 
961
// Generating CrcMatch signal
962 36 mohor
always @ (posedge tck or posedge trst)
963 2 mohor
begin
964 18 mohor
  if(trst)
965 2 mohor
    CrcMatch <=#Tp 1'b0;
966
  else
967
  if(Exit1DR)
968
    begin
969
      if(CHAIN_SELECTSelected)
970
        CrcMatch <=#Tp CalculatedCrcIn == JTAG_DR_IN[11:4];
971
      else
972 30 mohor
        begin
973
          if(RegisterScanChain)
974
            CrcMatch <=#Tp CalculatedCrcIn == JTAG_DR_IN[45:38];
975
          else
976
          if(RiscDebugScanChain)
977
            CrcMatch <=#Tp CalculatedCrcIn == JTAG_DR_IN[72:65];
978
          else
979
          if(WishboneScanChain)
980
            CrcMatch <=#Tp CalculatedCrcIn == JTAG_DR_IN[72:65];
981
        end
982 2 mohor
    end
983
end
984
 
985
 
986
// Active chain
987
assign RegisterScanChain   = Chain == `REGISTER_SCAN_CHAIN;
988
assign RiscDebugScanChain  = Chain == `RISC_DEBUG_CHAIN;
989 12 mohor
assign WishboneScanChain   = Chain == `WISHBONE_SCAN_CHAIN;
990 2 mohor
 
991
`ifdef TRACE_ENABLED
992
  assign TraceTestScanChain  = Chain == `TRACE_TEST_CHAIN;
993
`endif
994
 
995
/**********************************************************************************
996
*                                                                                 *
997
*   End: Connecting CRC module                                                    *
998
*                                                                                 *
999
**********************************************************************************/
1000
 
1001
/**********************************************************************************
1002
*                                                                                 *
1003
*   Connecting trace module                                                       *
1004
*                                                                                 *
1005
**********************************************************************************/
1006
`ifdef TRACE_ENABLED
1007 11 mohor
  dbg_trace dbgTrace1(.Wp(wp_i), .Bp(bp_i), .DataIn(risc_data_i), .OpSelect(opselect_trace),
1008 9 mohor
                      .LsStatus(lsstatus_i), .IStatus(istatus_i), .RiscStall_O(RiscStall_trace),
1009 18 mohor
                      .Mclk(risc_clk_i), .Reset(wb_rst_i), .TraceChain(TraceChain),
1010 8 mohor
                      .ContinMode(ContinMode), .TraceEnable_reg(TraceEnable),
1011 5 mohor
                      .WpTrigger(WpTrigger),
1012 2 mohor
                      .BpTrigger(BpTrigger), .LSSTrigger(LSSTrigger), .ITrigger(ITrigger),
1013
                      .TriggerOper(TriggerOper), .WpQualif(WpQualif), .BpQualif(BpQualif),
1014
                      .LSSQualif(LSSQualif), .IQualif(IQualif), .QualifOper(QualifOper),
1015 5 mohor
                      .RecordPC(RecordPC), .RecordLSEA(RecordLSEA),
1016
                      .RecordLDATA(RecordLDATA), .RecordSDATA(RecordSDATA),
1017
                      .RecordReadSPR(RecordReadSPR), .RecordWriteSPR(RecordWriteSPR),
1018
                      .RecordINSTR(RecordINSTR),
1019 2 mohor
                      .WpTriggerValid(WpTriggerValid), .BpTriggerValid(BpTriggerValid),
1020
                      .LSSTriggerValid(LSSTriggerValid), .ITriggerValid(ITriggerValid),
1021
                      .WpQualifValid(WpQualifValid), .BpQualifValid(BpQualifValid),
1022
                      .LSSQualifValid(LSSQualifValid), .IQualifValid(IQualifValid),
1023 9 mohor
                      .ReadBuffer(ReadTraceBufferPulse),
1024 2 mohor
                      .WpStop(WpStop), .BpStop(BpStop), .LSSStop(LSSStop), .IStop(IStop),
1025
                      .StopOper(StopOper), .WpStopValid(WpStopValid), .BpStopValid(BpStopValid),
1026
                      .LSSStopValid(LSSStopValid), .IStopValid(IStopValid)
1027
                     );
1028
`endif
1029
/**********************************************************************************
1030
*                                                                                 *
1031
*   End: Connecting trace module                                                  *
1032
*                                                                                 *
1033
**********************************************************************************/
1034
 
1035
 
1036
 
1037 9 mohor
endmodule

powered by: WebSVN 2.1.0

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