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

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Hardware/] [adv_dbg_if/] [rtl/] [verilog/] [adbg_wb_biu.v] - Diff between revs 32 and 42

Show entire file | Details | Blame | View Log

Rev 32 Rev 42
Line 38... Line 38...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: adbg_wb_biu.v,v $
// $Log: adbg_wb_biu.v,v $
 
// Revision 1.5  2010-03-21 01:05:10  Nathan
 
// Use all 32 address bits - WishBone slaves may use the 2 least-significant address bits instead of the four wb_sel lines, or in addition to them.
 
//
// Revision 1.4  2010-01-10 22:54:11  Nathan
// Revision 1.4  2010-01-10 22:54:11  Nathan
// Update copyright dates
// Update copyright dates
//
//
// Revision 1.3  2009/05/17 20:54:57  Nathan
// Revision 1.3  2009/05/17 20:54:57  Nathan
// Changed email address to opencores.org
// Changed email address to opencores.org
Line 133... Line 136...
   wire [1:0]     wb_bte_o;
   wire [1:0]     wb_bte_o;
 
 
 
 
   // Registers
   // Registers
   reg [3:0]      sel_reg;
   reg [3:0]      sel_reg;
   reg [29:0]     addr_reg;  // Don't need the two LSB, this info is in the SEL bits
   reg [31:0]     addr_reg;  // Don't really need the two LSB, this info is in the SEL bits
   reg [31:0]     data_in_reg;  // dbg->WB
   reg [31:0]     data_in_reg;  // dbg->WB
   reg [31:0]     data_out_reg;  // WB->dbg
   reg [31:0]     data_out_reg;  // WB->dbg
   reg           wr_reg;
   reg           wr_reg;
   reg           str_sync;  // This is 'active-toggle' rather than -high or -low.
   reg           str_sync;  // This is 'active-toggle' rather than -high or -low.
   reg           rdy_sync;  // ditto, active-toggle
   reg           rdy_sync;  // ditto, active-toggle
Line 237... Line 240...
   // Latch input data on 'start' strobe, if ready.
   // Latch input data on 'start' strobe, if ready.
   always @ (posedge tck_i or posedge rst_i)
   always @ (posedge tck_i or posedge rst_i)
     begin
     begin
        if(rst_i) begin
        if(rst_i) begin
           sel_reg <= 4'h0;
           sel_reg <= 4'h0;
           addr_reg <= 30'h0;
           addr_reg <= 32'h0;
           data_in_reg <= 32'h0;
           data_in_reg <= 32'h0;
           wr_reg <= 1'b0;
           wr_reg <= 1'b0;
        end
        end
        else
        else
          if(strobe_i && rdy_o) begin
          if(strobe_i && rdy_o) begin
             sel_reg <= be_dec;
             sel_reg <= be_dec;
             addr_reg <= addr_i[31:2];
             addr_reg <= addr_i;
             if(!rd_wrn_i) data_in_reg <= swapped_data_i;
             if(!rd_wrn_i) data_in_reg <= swapped_data_i;
             wr_reg <= ~rd_wrn_i;
             wr_reg <= ~rd_wrn_i;
          end
          end
     end
     end
 
 
Line 283... Line 286...
   //////////////////////////////////////////////////////////
   //////////////////////////////////////////////////////////
   // Direct assignments, unsynchronized
   // Direct assignments, unsynchronized
 
 
   assign wb_dat_o = data_in_reg;
   assign wb_dat_o = data_in_reg;
   assign wb_we_o = wr_reg;
   assign wb_we_o = wr_reg;
   assign wb_adr_o = {addr_reg, 2'h0};
   assign wb_adr_o = addr_reg;
   assign wb_sel_o = sel_reg;
   assign wb_sel_o = sel_reg;
 
 
   assign data_o = data_out_reg;
   assign data_o = data_out_reg;
   assign err_o = err_reg;
   assign err_o = err_reg;
 
 

powered by: WebSVN 2.1.0

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