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

Subversion Repositories mem_ctrl

[/] [mem_ctrl/] [trunk/] [rtl/] [verilog/] [mc_wb_if.v] - Diff between revs 16 and 18

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

Rev 16 Rev 18
Line 36... Line 36...
////                                                             ////
////                                                             ////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
 
 
//  CVS Log
//  CVS Log
//
//
//  $Id: mc_wb_if.v,v 1.4 2001-11-29 02:16:28 rudi Exp $
//  $Id: mc_wb_if.v,v 1.5 2001-12-11 02:47:19 rudi Exp $
//
//
//  $Date: 2001-11-29 02:16:28 $
//  $Date: 2001-12-11 02:47:19 $
//  $Revision: 1.4 $
//  $Revision: 1.5 $
//  $Author: rudi $
//  $Author: rudi $
//  $Locker:  $
//  $Locker:  $
//  $State: Exp $
//  $State: Exp $
//
//
// Change History:
// Change History:
//               $Log: not supported by cvs2svn $
//               $Log: not supported by cvs2svn $
 
//               Revision 1.4  2001/11/29 02:16:28  rudi
 
//
 
//
 
//               - More Synthesis cleanup, mostly for speed
 
//               - Several bug fixes
 
//               - Changed code to avoid auto-precharge and
 
//                 burst-terminate combinations (apparently illegal ?)
 
//                 Now we will do a manual precharge ...
 
//
//               Revision 1.3  2001/09/24 00:38:21  rudi
//               Revision 1.3  2001/09/24 00:38:21  rudi
//
//
//               Changed Reset to be active high and async.
//               Changed Reset to be active high and async.
//
//
//               Revision 1.2  2001/08/10 08:16:21  rudi
//               Revision 1.2  2001/08/10 08:16:21  rudi
Line 150... Line 159...
        else
        else
        if(wb_ack_o)            rmw_en <= #1 1'b1;
        if(wb_ack_o)            rmw_en <= #1 1'b1;
        else
        else
        if(!wb_cyc_i)           rmw_en <= #1 1'b0;
        if(!wb_cyc_i)           rmw_en <= #1 1'b0;
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        rmw_r <= #1 !wr_hold & wb_we_i & wb_cyc_i & wb_stb_i & rmw_en;
        if(rst) rmw_r <= #1 1'b0;
 
        else    rmw_r <= #1 !wr_hold & wb_we_i & wb_cyc_i & wb_stb_i & rmw_en;
 
 
assign rmw = rmw_r | (!wr_hold & wb_we_i & wb_cyc_i & wb_stb_i & rmw_en);
assign rmw = rmw_r | (!wr_hold & wb_we_i & wb_cyc_i & wb_stb_i & rmw_en);
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        read_go_r1 <= #1 !rmw & wb_cyc_i &
        if(rst) read_go_r1 <= #1 1'b0;
 
        else    read_go_r1 <= #1 !rmw & wb_cyc_i &
                        ((wb_stb_i & mem_sel & !wb_we_i) | read_go_r);
                        ((wb_stb_i & mem_sel & !wb_we_i) | read_go_r);
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        read_go_r <= #1 read_go_r1 & wb_cyc_i;
        if(rst) read_go_r <= #1 1'b0;
 
        else    read_go_r <= #1 read_go_r1 & wb_cyc_i;
 
 
assign  wb_read_go = !rmw & read_go_r1 & wb_cyc_i;
assign  wb_read_go = !rmw & read_go_r1 & wb_cyc_i;
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        write_go_r1 <= #1 wb_cyc_i & ((wb_stb_i & mem_sel & wb_we_i) | write_go_r);
        if(rst) write_go_r1 <= #1 1'b0;
 
        else    write_go_r1 <= #1 wb_cyc_i &
 
                                ((wb_stb_i & mem_sel & wb_we_i) | write_go_r);
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        write_go_r <= #1 write_go_r1 & wb_cyc_i &
        if(rst)         write_go_r <= #1 1'b0;
 
        else            write_go_r <= #1 write_go_r1 & wb_cyc_i &
                        ((wb_we_i & wb_stb_i) | !wb_stb_i);
                        ((wb_we_i & wb_stb_i) | !wb_stb_i);
 
 
assign wb_write_go =    !rmw & write_go_r1 & wb_cyc_i &
assign wb_write_go =    !rmw & write_go_r1 & wb_cyc_i &
                        ((wb_we_i & wb_stb_i) | !wb_stb_i);
                        ((wb_we_i & wb_stb_i) | !wb_stb_i);
 
 
Line 184... Line 199...
        else
        else
        if(wb_first_set)        wb_first_r <= #1 1'b1;
        if(wb_first_set)        wb_first_r <= #1 1'b1;
        else
        else
        if(wb_ack_o | wb_err)   wb_first_r <= #1 1'b0;
        if(wb_ack_o | wb_err)   wb_first_r <= #1 1'b0;
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
 
        if(rst)                 wr_hold <= #1 1'b0;
 
        else
        if(wb_cyc_i & wb_stb_i) wr_hold <= #1 wb_we_i;
        if(wb_cyc_i & wb_stb_i) wr_hold <= #1 wb_we_i;
 
 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
//
//
// WB Ack
// WB Ack
//
//
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        wb_ack_o <= #1 `MC_MEM_SEL ? mem_ack :
        if(rst) wb_ack_o <= #1 1'b0;
 
        else    wb_ack_o <= #1 `MC_MEM_SEL ? mem_ack :
                        `MC_REG_SEL & wb_cyc_i & wb_stb_i & !wb_ack_o;
                        `MC_REG_SEL & wb_cyc_i & wb_stb_i & !wb_ack_o;
 
 
always @(posedge clk)
always @(posedge clk or posedge rst)
        wb_err <= #1 wb_cyc_i & wb_stb_i & `MC_MEM_SEL &
        if(rst) wb_err <= #1 1'b0;
 
        else    wb_err <= #1 wb_cyc_i & wb_stb_i & `MC_MEM_SEL &
                        (par_err | err | wp_err) & !wb_err;
                        (par_err | err | wp_err) & !wb_err;
 
 
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
//
//
// Memory Wait Logic
// Memory Wait Logic

powered by: WebSVN 2.1.0

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