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

Subversion Repositories aemb

[/] [aemb/] [branches/] [AEMB2_712/] [rtl/] [verilog/] [aeMB_ibuf.v] - Diff between revs 63 and 70

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

Rev 63 Rev 70
Line 1... Line 1...
// $Id: aeMB_ibuf.v,v 1.6 2007-11-14 23:39:51 sybreon Exp $
// $Id: aeMB_ibuf.v,v 1.7 2007-11-22 15:11:15 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...
//
//
// You should have received a copy of the GNU Lesser General Public
// You should have received a copy of the GNU Lesser General Public
// License along with AEMB. If not, see <http://www.gnu.org/licenses/>.
// License along with AEMB. If not, see <http://www.gnu.org/licenses/>.
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.6  2007/11/14 23:39:51  sybreon
 
// Fixed interrupt signal synchronisation.
 
//
// Revision 1.5  2007/11/14 22:14:34  sybreon
// Revision 1.5  2007/11/14 22:14:34  sybreon
// Changed interrupt handling system (reported by M. Ettus).
// Changed interrupt handling system (reported by M. Ettus).
//
//
// Revision 1.4  2007/11/10 16:39:38  sybreon
// Revision 1.4  2007/11/10 16:39:38  sybreon
// Upgraded license to LGPLv3.
// Upgraded license to LGPLv3.
Line 82... Line 85...
   // TODO: Assign to FIFO not full.
   // TODO: Assign to FIFO not full.
   assign       iwb_stb_o = 1'b1;
   assign       iwb_stb_o = 1'b1;
 
 
   reg [31:0]    rSIMM, xSIMM;
   reg [31:0]    rSIMM, xSIMM;
 
 
   wire [31:0]   wXCEOP = 32'hB9CE0008;
   wire [31:0]   wXCEOP = 32'hBA2D0008; // Vector 0x08
   wire [31:0]   wINTOP = 32'hB9CE0010;
   wire [31:0]   wINTOP = 32'hB9CE0010; // Vector 0x10
   wire [31:0]   wBRKOP = 32'hB9CE0018;
   wire [31:0]   wBRKOP = 32'hBA0C0018; // Vector 0x18
   wire [31:0]   wBRAOP = 32'h88000000;
   wire [31:0]   wBRAOP = 32'h88000000; // NOP for branches
 
 
   wire [31:0]   wIREG = {rOPC, rRD, rRA, rRB, rALT};
   wire [31:0]   wIREG = {rOPC, rRD, rRA, rRB, rALT};
   reg [31:0]    xIREG;
   reg [31:0]    xIREG;
 
 
 
 
   // --- INTERRUPT LATCH --------------------------------------
   // --- INTERRUPT LATCH --------------------------------------
   // Debounce and latch onto the positive edge. This is independent
   // Debounce and latch onto the positive level. This is independent
   // of the pipeline so that stalls do not affect it.
   // of the pipeline so that stalls do not affect it.
 
 
   reg          rFINT;
   reg          rFINT;
   reg [1:0]     rDINT;
   reg [1:0]     rDINT;
   //wire       wSHOT = rDINT[0] & !rDINT[1] & sys_int_i;
   wire         wSHOT = rDINT[0];
   //wire       wSHOT = !rDINT[0] & sys_int_i;
 
   wire         wSHOT = (rDINT == 2'o1);
 
 
 
   always @(posedge gclk)
   always @(posedge gclk)
     if (grst) begin
     if (grst) begin
        /*AUTORESET*/
        /*AUTORESET*/
        // Beginning of autoreset for uninitialized flops
        // Beginning of autoreset for uninitialized flops
Line 128... Line 129...
               (!fIMM & rFINT & !fRTD & !fBRU & !fBCC) ? wINTOP :
               (!fIMM & rFINT & !fRTD & !fBRU & !fBCC) ? wINTOP :
               wIDAT;
               wIDAT;
   end
   end
 
 
   always @(/*AUTOSENSE*/fIMM or rBRA or rIMM or wIDAT or xIREG) begin
   always @(/*AUTOSENSE*/fIMM or rBRA or rIMM or wIDAT or xIREG) begin
      //xSIMM <= (!fIMM | rBRA | |rXCE) ? { {(16){wIDAT[15]}}, wIDAT[15:0]} : {rIMM, wIDAT[15:0]};
 
      xSIMM <= (!fIMM | rBRA) ? { {(16){xIREG[15]}}, xIREG[15:0]} :
      xSIMM <= (!fIMM | rBRA) ? { {(16){xIREG[15]}}, xIREG[15:0]} :
               {rIMM, wIDAT[15:0]};
               {rIMM, wIDAT[15:0]};
   end
   end
 
 
   // --- PIPELINE --------------------------------------------
   // --- PIPELINE --------------------------------------------

powered by: WebSVN 2.1.0

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