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

Subversion Repositories aemb

[/] [aemb/] [tags/] [AEMB_7_05/] [rtl/] [verilog/] [aeMB_regfile.v] - Diff between revs 4 and 5

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

Rev 4 Rev 5
Line 7... Line 7...
// Last Modified On: 2006-12-29
// Last Modified On: 2006-12-29
// Update Count    : 0
// Update Count    : 0
// Status          : Unknown, Use with caution!
// Status          : Unknown, Use with caution!
 
 
/*
/*
 * $Id: aeMB_regfile.v,v 1.2 2007-03-26 12:21:31 sybreon Exp $
 * $Id: aeMB_regfile.v,v 1.3 2007-04-03 14:46:26 sybreon Exp $
 *
 *
 * Copyright (C) 2006 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
 * Copyright (C) 2006 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
 *
 *
 * This library is free software; you can redistribute it and/or modify it
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * under the terms of the GNU Lesser General Public License as published by
Line 32... Line 32...
 * special actions during hardware exception/interrupts. Data forwarding
 * special actions during hardware exception/interrupts. Data forwarding
 * is also taken care of inside here to simplify decode logic.
 * is also taken care of inside here to simplify decode logic.
 *
 *
 * HISTORY
 * HISTORY
 * $Log: not supported by cvs2svn $
 * $Log: not supported by cvs2svn $
 
 * Revision 1.2  2007/03/26 12:21:31  sybreon
 
 * Fixed a minor bug where RD is trashed by a STORE instruction. Spotted by Joon Lee.
 
 *
 * Revision 1.1  2007/03/09 17:52:17  sybreon
 * Revision 1.1  2007/03/09 17:52:17  sybreon
 * initial import
 * initial import
 *
 *
 *
 *
 */
 */
Line 86... Line 89...
     end else begin
     end else begin
        rPC_ <= #1 rPC;
        rPC_ <= #1 rPC;
     end
     end
 
 
   // DWB data - Endian Correction
   // DWB data - Endian Correction
   wire [31:0]    wDWBDAT = dwb_dat_i;
 
 
 
   reg [31:0]     rDWBDAT;
   reg [31:0]     rDWBDAT;
   wire          fDFWD = (rRD == rRD_) & fWE;
   wire          fDFWD = (rRD == rRD_) & fWE;
   assign        dwb_dat_o = rDWBDAT;
   //assign      dwb_dat_o = rDWBDAT;
 
   //wire [31:0]         wDWBDAT = dwb_dat_i;
 
   assign        dwb_dat_o = {rDWBDAT[7:0],rDWBDAT[15:8],rDWBDAT[23:16],rDWBDAT[31:24]};
 
   wire [31:0]    wDWBDAT = {dwb_dat_i[7:0],dwb_dat_i[15:8],dwb_dat_i[23:16],dwb_dat_i[31:24]};
 
 
   always @(negedge nclk or negedge nrst)
   always @(negedge nclk or negedge nrst)
     if (!nrst) begin
     if (!nrst) begin
        /*AUTORESET*/
        /*AUTORESET*/
        // Beginning of autoreset for uninitialized flops
        // Beginning of autoreset for uninitialized flops
Line 387... Line 391...
        r11 <= #1 (rFSM == 2'b10) ? rPC : // Needs verification
        r11 <= #1 (rFSM == 2'b10) ? rPC : // Needs verification
               (!fR11) ? r11 : (fLD) ? wDWBDAT : (fLNK) ? rPC_ : (fWE) ? rRESULT : r11;
               (!fR11) ? r11 : (fLD) ? wDWBDAT : (fLNK) ? rPC_ : (fWE) ? rRESULT : r11;
     end // else: !if(!nrst)
     end // else: !if(!nrst)
 
 
 
 
 
   // Simulation ONLY
 
   always @(negedge nclk) begin
 
      if ((fWE & (rRD_== 5'd0)) || (fLNK & (rRD_== 5'd0)) || (fLD & (rRD_== 5'd0))) $displayh("!!! Warning: Write to R0.");
 
   end
 
 
 
 
endmodule // aeMB_regfile
endmodule // aeMB_regfile
 
 
// Local Variables:
// Local Variables:
// verilog-library-directories:(".")
// verilog-library-directories:(".")
// verilog-library-files:("")
// verilog-library-files:("")

powered by: WebSVN 2.1.0

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