Line 42... |
Line 42... |
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
// CVS Revision History
|
// CVS Revision History
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.9 2003/01/22 03:23:47 lampret
|
|
// Updated sensitivity list for trace buffer [only relevant for Xilinx FPGAs]
|
|
//
|
// Revision 1.8 2002/09/08 19:31:52 lampret
|
// Revision 1.8 2002/09/08 19:31:52 lampret
|
// Fixed a typo, reported by Taylor Su.
|
// Fixed a typo, reported by Taylor Su.
|
//
|
//
|
// Revision 1.7 2002/07/14 22:17:17 lampret
|
// Revision 1.7 2002/07/14 22:17:17 lampret
|
// Added simple trace buffer [only for Xilinx Virtex target]. Fixed instruction fetch abort when new exception is recognized.
|
// Added simple trace buffer [only for Xilinx Virtex target]. Fixed instruction fetch abort when new exception is recognized.
|
Line 109... |
Line 112... |
du_dsr, du_stall, du_addr, du_dat_i, du_dat_o,
|
du_dsr, du_stall, du_addr, du_dat_i, du_dat_o,
|
du_read, du_write, du_except,
|
du_read, du_write, du_except,
|
spr_cs, spr_write, spr_addr, spr_dat_i, spr_dat_o,
|
spr_cs, spr_write, spr_addr, spr_dat_i, spr_dat_o,
|
|
|
// External Debug Interface
|
// External Debug Interface
|
dbg_stall_i, dbg_dat_i, dbg_adr_i, dbg_op_i, dbg_ewt_i,
|
dbg_stall_i, dbg_ewt_i, dbg_lss_o, dbg_is_o, dbg_wp_o, dbg_bp_o,
|
dbg_lss_o, dbg_is_o, dbg_wp_o, dbg_bp_o, dbg_dat_o
|
dbg_stb_i, dbg_we_i, dbg_adr_i, dbg_dat_i, dbg_dat_o, dbg_ack_o,
|
);
|
);
|
|
|
parameter dw = `OR1200_OPERAND_WIDTH;
|
parameter dw = `OR1200_OPERAND_WIDTH;
|
parameter aw = `OR1200_OPERAND_WIDTH;
|
parameter aw = `OR1200_OPERAND_WIDTH;
|
|
|
Line 151... |
Line 154... |
|
|
//
|
//
|
// External Debug Interface
|
// External Debug Interface
|
//
|
//
|
input dbg_stall_i; // External Stall Input
|
input dbg_stall_i; // External Stall Input
|
input [dw-1:0] dbg_dat_i; // External Data Input
|
|
input [aw-1:0] dbg_adr_i; // External Address Input
|
|
input [2:0] dbg_op_i; // External Operation Select Input
|
|
input dbg_ewt_i; // External Watchpoint Trigger Input
|
input dbg_ewt_i; // External Watchpoint Trigger Input
|
output [3:0] dbg_lss_o; // External Load/Store Unit Status
|
output [3:0] dbg_lss_o; // External Load/Store Unit Status
|
output [1:0] dbg_is_o; // External Insn Fetch Status
|
output [1:0] dbg_is_o; // External Insn Fetch Status
|
output [10:0] dbg_wp_o; // Watchpoints Outputs
|
output [10:0] dbg_wp_o; // Watchpoints Outputs
|
output dbg_bp_o; // Breakpoint Output
|
output dbg_bp_o; // Breakpoint Output
|
|
input dbg_stb_i; // External Address/Data Strobe
|
|
input dbg_we_i; // External Write Enable
|
|
input [aw-1:0] dbg_adr_i; // External Address Input
|
|
input [dw-1:0] dbg_dat_i; // External Data Input
|
output [dw-1:0] dbg_dat_o; // External Data Output
|
output [dw-1:0] dbg_dat_o; // External Data Output
|
|
output dbg_ack_i; // External Data Acknowledge (not WB compatible)
|
|
|
|
|
//
|
//
|
// Some connections go directly from the CPU through DU to Debug I/F
|
// Some connections go directly from the CPU through DU to Debug I/F
|
//
|
//
|
Line 194... |
Line 199... |
// Some connections go directly from Debug I/F through DU to the CPU
|
// Some connections go directly from Debug I/F through DU to the CPU
|
//
|
//
|
assign du_stall = dbg_stall_i;
|
assign du_stall = dbg_stall_i;
|
assign du_addr = dbg_adr_i;
|
assign du_addr = dbg_adr_i;
|
assign du_dat_o = dbg_dat_i;
|
assign du_dat_o = dbg_dat_i;
|
assign du_read = (dbg_op_i == `OR1200_DU_OP_READSPR);
|
assign du_read = dbg_stb_i && !dbg_we_i;
|
assign du_write = (dbg_op_i == `OR1200_DU_OP_WRITESPR);
|
assign du_write = dbg_stb_i && dbg_we_i;
|
|
|
|
//
|
|
// Generate acknowledge -- just delay stb signal
|
|
//
|
|
reg dbg_ack_o;
|
|
always @(posedge clk or posedge rst)
|
|
if (rst)
|
|
dbg_ack_o <= #1 1'b0;
|
|
else
|
|
dbg_ack_o <= #1 dbg_stb_i;
|
|
|
`ifdef OR1200_DU_IMPLEMENTED
|
`ifdef OR1200_DU_IMPLEMENTED
|
|
|
//
|
//
|
// Debug Mode Register 1 (only ST and BT implemented)
|
// Debug Mode Register 1 (only ST and BT implemented)
|