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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [trunk/] [rtl/] [verilog/] [dbg_top.v] - Diff between revs 20 and 21

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 20 Rev 21
Line 43... Line 43...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.12  2001/11/26 10:47:09  mohor
 
// Crc generation is different for read or write commands. Small synthesys fixes.
 
//
// Revision 1.11  2001/11/14 10:10:41  mohor
// Revision 1.11  2001/11/14 10:10:41  mohor
// Wishbone data latched on wb_clk_i instead of risc_clk.
// Wishbone data latched on wb_clk_i instead of risc_clk.
//
//
// Revision 1.10  2001/11/12 01:11:27  mohor
// Revision 1.10  2001/11/12 01:11:27  mohor
// Reset signals are not combined any more.
// Reset signals are not combined any more.
Line 634... Line 637...
end
end
 
 
wire [72:0] RISC_Data;
wire [72:0] RISC_Data;
wire [45:0] Register_Data;
wire [45:0] Register_Data;
wire [72:0] WISHBONE_Data;
wire [72:0] WISHBONE_Data;
 
wire [12:0] chain_sel_data;
wire wb_Access_wbClk;
wire wb_Access_wbClk;
 
 
// assign RISC_Data      = {CalculatedCrcOut, RISC_DATAINLatch, 33'h0};
// assign RISC_Data      = {CalculatedCrcOut, RISC_DATAINLatch, 33'h0};
// assign Register_Data  = {CalculatedCrcOut, RegisterReadLatch, 6'h0};
// assign Register_Data  = {CalculatedCrcOut, RegisterReadLatch, 6'h0};
// assign WISHBONE_Data  = {CalculatedCrcOut, WBReadLatch, 32'h0, WBErrorLatch};
// assign WISHBONE_Data  = {CalculatedCrcOut, WBReadLatch, 32'h0, WBErrorLatch};
 
 
wire select_crc_out;
wire select_crc_out;
assign select_crc_out = RegisterScanChain   & JTAG_DR_IN[5]   |     // Calculated CRC is returned when read operation is
assign select_crc_out = RegisterScanChain   & JTAG_DR_IN[5]   |     // Calculated CRC is returned when read operation is
                        RiscDebugScanChain  & JTAG_DR_IN[32]  |     // performed, else received crc is returned (loopback).
                        RiscDebugScanChain  & JTAG_DR_IN[32]  |     // performed, else received crc is returned (loopback).
                        WishboneScanChain   & JTAG_DR_IN[32]  ;
                        WishboneScanChain     & JTAG_DR_IN[32]  |
 
                        CHAIN_SELECTSelected;                         // When chain is selected, received crc is returned
 
 
wire [8:0] send_crc;
wire [8:0] send_crc;
 
 
assign send_crc = select_crc_out? {9{JTAG_DR_IN[BitCounter-1]}}   : // Calculated CRC is returned when read operation is
assign send_crc = select_crc_out? {9{JTAG_DR_IN[BitCounter-1]}}   : // Calculated CRC is returned when read operation is
                                  {1'b0, CalculatedCrcOut}        ; // performed, else received crc is returned (loopback).
                                  {1'b0, CalculatedCrcOut}        ; // performed, else received crc is returned (loopback).
 
 
assign RISC_Data      = {send_crc, RISC_DATAINLatch, 33'h0};
assign RISC_Data      = {send_crc, RISC_DATAINLatch, 33'h0};
assign Register_Data  = {send_crc, RegisterReadLatch, 6'h0};
assign Register_Data  = {send_crc, RegisterReadLatch, 6'h0};
assign WISHBONE_Data  = {send_crc, WBReadLatch, 32'h0, WBErrorLatch};
assign WISHBONE_Data  = {send_crc, WBReadLatch, 32'h0, WBErrorLatch};
 
assign chain_sel_data = {send_crc, 4'h0};
 
 
 
 
`ifdef TRACE_ENABLED
`ifdef TRACE_ENABLED
  assign Trace_Data     = {CalculatedCrcOut, TraceChain};
  assign Trace_Data     = {CalculatedCrcOut, TraceChain};
`endif
`endif
Line 686... Line 692...
        begin
        begin
          if(IDCODESelected)
          if(IDCODESelected)
            TDOData <= #Tp IDCodeValue[BitCounter];           // IDCODE is shifted out
            TDOData <= #Tp IDCodeValue[BitCounter];           // IDCODE is shifted out
          else
          else
          if(CHAIN_SELECTSelected)
          if(CHAIN_SELECTSelected)
            TDOData <= #Tp 0;
            TDOData <= #Tp chain_sel_data[BitCounter];        // Received crc is sent back
          else
          else
          if(DEBUGSelected)
          if(DEBUGSelected)
            begin
            begin
              if(RiscDebugScanChain)
              if(RiscDebugScanChain)
                TDOData <= #Tp RISC_Data[BitCounter];         // Data read from RISC in the previous cycle is shifted out
                TDOData <= #Tp RISC_Data[BitCounter];         // Data read from RISC in the previous cycle is shifted out

powered by: WebSVN 2.1.0

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