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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [trunk/] [rtl/] [verilog/] [dbg_cpu.v] - Diff between revs 139 and 141

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

Rev 139 Rev 141
Line 41... Line 41...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.8  2004/03/28 20:27:01  igorm
 
// New release of the debug interface (3rd. release).
 
//
// Revision 1.7  2004/01/25 14:04:18  mohor
// Revision 1.7  2004/01/25 14:04:18  mohor
// All flipflops are reset.
// All flipflops are reset.
//
//
// Revision 1.6  2004/01/22 13:58:53  mohor
// Revision 1.6  2004/01/22 13:58:53  mohor
// Port signals are all set to zero after reset.
// Port signals are all set to zero after reset.
Line 150... Line 153...
reg     [`DBG_CPU_CRC_CNT_WIDTH -1:0] crc_cnt;
reg     [`DBG_CPU_CRC_CNT_WIDTH -1:0] crc_cnt;
wire          crc_cnt_end;
wire          crc_cnt_end;
reg           crc_cnt_end_q;
reg           crc_cnt_end_q;
reg           data_cnt_en;
reg           data_cnt_en;
reg    [`DBG_CPU_DATA_CNT_WIDTH:0] data_cnt;
reg    [`DBG_CPU_DATA_CNT_WIDTH:0] data_cnt;
reg    [`DBG_CPU_DATA_CNT_WIDTH:0] data_cnt_limit;
reg    [`DBG_CPU_DATA_CNT_LIM_WIDTH:0] data_cnt_limit;
wire          data_cnt_end;
wire          data_cnt_end;
reg           data_cnt_end_q;
reg           data_cnt_end_q;
reg           crc_match_reg;
reg           crc_match_reg;
 
 
reg    [`DBG_CPU_ACC_TYPE_LEN -1:0] acc_type;
reg    [`DBG_CPU_ACC_TYPE_LEN -1:0] acc_type;
Line 384... Line 387...
 
 
// Upper limit. Data counter counts until this value is reached.
// Upper limit. Data counter counts until this value is reached.
always @ (posedge tck_i or posedge rst_i)
always @ (posedge tck_i or posedge rst_i)
begin
begin
  if (rst_i)
  if (rst_i)
    data_cnt_limit <= #1 {`DBG_CPU_DATA_CNT_WIDTH{1'b0}};
    data_cnt_limit <= #1 {`DBG_CPU_DATA_CNT_LIM_WIDTH{1'b0}};
  else if (update_dr_i)
  else if (update_dr_i)
    data_cnt_limit <= #1 {len + 1'b1, 3'b000};
    data_cnt_limit <= #1 len + 1'b1;
end
end
 
 
 
 
always @ (enable or crc_cnt_end or curr_cmd_rd_comm or curr_cmd_rd_ctrl or curr_cmd_wr_comm or curr_cmd_wr_ctrl or curr_cmd_go or addr_len_cnt_end or data_cnt_end or acc_type_write or acc_type_read or cmd_cnt_end)
always @ (enable or crc_cnt_end or curr_cmd_rd_comm or curr_cmd_rd_ctrl or curr_cmd_wr_comm or curr_cmd_wr_ctrl or curr_cmd_go or addr_len_cnt_end or data_cnt_end or acc_type_write or acc_type_read or cmd_cnt_end)
begin
begin
Line 423... Line 426...
 
 
assign cmd_cnt_end      = cmd_cnt      == `DBG_CPU_CMD_LEN;
assign cmd_cnt_end      = cmd_cnt      == `DBG_CPU_CMD_LEN;
assign addr_len_cnt_end = addr_len_cnt == `DBG_CPU_DR_LEN;
assign addr_len_cnt_end = addr_len_cnt == `DBG_CPU_DR_LEN;
assign crc_cnt_end      = crc_cnt      == `DBG_CPU_CRC_CNT_WIDTH'd32;
assign crc_cnt_end      = crc_cnt      == `DBG_CPU_CRC_CNT_WIDTH'd32;
assign crc_cnt_31       = crc_cnt      == `DBG_CPU_CRC_CNT_WIDTH'd31;
assign crc_cnt_31       = crc_cnt      == `DBG_CPU_CRC_CNT_WIDTH'd31;
assign data_cnt_end     = (data_cnt    == data_cnt_limit);
assign data_cnt_end     = (data_cnt    == {data_cnt_limit, 3'b000});
 
 
always @ (posedge tck_i or posedge rst_i)
always @ (posedge tck_i or posedge rst_i)
begin
begin
  if (rst_i)
  if (rst_i)
    begin
    begin
Line 456... Line 459...
  else if (status_cnt_en)
  else if (status_cnt_en)
    status_cnt <= #1 status_cnt + 1'b1;
    status_cnt <= #1 status_cnt + 1'b1;
end
end
 
 
 
 
always @ (enable or status_cnt_end or crc_cnt_end or curr_cmd_rd_comm or curr_cmd_rd_ctrl or curr_cmd_wr_comm or curr_cmd_wr_ctrl or curr_cmd_go or acc_type_write or data_cnt_end or addr_len_cnt_end)
always @ (enable or status_cnt_end or crc_cnt_end or curr_cmd_rd_comm or curr_cmd_rd_ctrl or
 
          curr_cmd_wr_comm or curr_cmd_wr_ctrl or curr_cmd_go or acc_type_write or
 
          acc_type_read or data_cnt_end or addr_len_cnt_end)
begin
begin
  if (enable && (!status_cnt_end))
  if (enable && (!status_cnt_end))
    begin
    begin
      if (crc_cnt_end && (curr_cmd_wr_comm || curr_cmd_wr_ctrl))
      if (crc_cnt_end && (curr_cmd_wr_comm || curr_cmd_wr_ctrl))
        status_cnt_en = 1'b1;
        status_cnt_en = 1'b1;

powered by: WebSVN 2.1.0

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