Line 1... |
Line 1... |
// $Id: aeMB_ibuf.v,v 1.2 2007-11-02 19:20:58 sybreon Exp $
|
// $Id: aeMB_ibuf.v,v 1.3 2007-11-03 08:34:55 sybreon Exp $
|
//
|
//
|
// AEMB INSTRUCTION BUFFER
|
// AEMB INSTRUCTION BUFFER
|
//
|
//
|
// Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
// Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
//
|
//
|
Line 18... |
Line 18... |
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
// USA
|
// USA
|
//
|
//
|
// $Log: not supported by cvs2svn $
|
// $Log: not supported by cvs2svn $
|
|
// Revision 1.2 2007/11/02 19:20:58 sybreon
|
|
// Added better (beta) interrupt support.
|
|
// Changed MSR_IE to disabled at reset as per MB docs.
|
|
//
|
// Revision 1.1 2007/11/02 03:25:40 sybreon
|
// Revision 1.1 2007/11/02 03:25:40 sybreon
|
// New EDK 3.2 compatible design with optional barrel-shifter and multiplier.
|
// New EDK 3.2 compatible design with optional barrel-shifter and multiplier.
|
// Fixed various minor data hazard bugs.
|
// Fixed various minor data hazard bugs.
|
// Code compatible with -O0/1/2/3/s generated code.
|
// Code compatible with -O0/1/2/3/s generated code.
|
//
|
//
|
Line 66... |
Line 70... |
reg [31:0] xIREG;
|
reg [31:0] xIREG;
|
|
|
// DELAY SLOT
|
// DELAY SLOT
|
always @(/*AUTOSENSE*/fIMM or rBRA or rIMM or rXCE or wIDAT) begin
|
always @(/*AUTOSENSE*/fIMM or rBRA or rIMM or rXCE or wIDAT) begin
|
xIREG <= (rBRA | |rXCE) ? 32'h88000000 : wIDAT;
|
xIREG <= (rBRA | |rXCE) ? 32'h88000000 : wIDAT;
|
xSIMM <= (fIMM) ? {rIMM, wIDAT[15:0]} : { {(16){wIDAT[15]}}, wIDAT[15:0]};
|
xSIMM <= (!fIMM | rBRA | |rXCE) ? { {(16){wIDAT[15]}}, wIDAT[15:0]} : {rIMM, wIDAT[15:0]};
|
end
|
end
|
|
|
// Synchronous
|
// Synchronous
|
always @(posedge gclk)
|
always @(posedge gclk)
|
if (grst) begin
|
if (grst) begin
|