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

Subversion Repositories aemb

[/] [aemb/] [branches/] [AEMB2_712/] [rtl/] [verilog/] [aeMB_edk32.v] - Diff between revs 55 and 61

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

Rev 55 Rev 61
Line 1... Line 1...
// $Id: aeMB_edk32.v,v 1.7 2007-11-10 16:39:38 sybreon Exp $
// $Id: aeMB_edk32.v,v 1.8 2007-11-14 22:14:34 sybreon Exp $
//
//
// AEMB EDK 3.2 Compatible Core
// AEMB EDK 3.2 Compatible Core
//
//
// 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.7  2007/11/10 16:39:38  sybreon
 
// Upgraded license to LGPLv3.
 
// Significant performance optimisations.
 
//
// Revision 1.6  2007/11/09 20:51:52  sybreon
// Revision 1.6  2007/11/09 20:51:52  sybreon
// Added GET/PUT support through a FSL bus.
// Added GET/PUT support through a FSL bus.
//
//
// Revision 1.5  2007/11/08 17:48:14  sybreon
// Revision 1.5  2007/11/08 17:48:14  sybreon
// Fixed data WISHBONE arbitration problem (reported by J Lee).
// Fixed data WISHBONE arbitration problem (reported by J Lee).
Line 42... Line 46...
// Code compatible with -O0/1/2/3/s generated code.
// Code compatible with -O0/1/2/3/s generated code.
//
//
 
 
module aeMB_edk32 (/*AUTOARG*/
module aeMB_edk32 (/*AUTOARG*/
   // Outputs
   // Outputs
   iwb_stb_o, iwb_adr_o, fsl_wre_o, fsl_stb_o, fsl_dat_o, fsl_adr_o,
   rFSLSTB, rDWBSTB, iwb_stb_o, iwb_adr_o, fsl_wre_o, fsl_stb_o,
   dwb_wre_o, dwb_stb_o, dwb_sel_o, dwb_dat_o, dwb_adr_o,
   fsl_dat_o, fsl_adr_o, dwb_wre_o, dwb_stb_o, dwb_sel_o, dwb_dat_o,
 
   dwb_adr_o,
   // Inputs
   // Inputs
   sys_rst_i, sys_int_i, sys_clk_i, iwb_dat_i, iwb_ack_i, fsl_dat_i,
   sys_int_i, iwb_dat_i, iwb_ack_i, fsl_dat_i, fsl_ack_i, dwb_dat_i,
   fsl_ack_i, dwb_dat_i, dwb_ack_i
   dwb_ack_i, sys_clk_i, sys_rst_i
   );
   );
   // Bus widths
   // Bus widths
   parameter IW = 32; /// Instruction bus address width
   parameter IW = 32; /// Instruction bus address width
   parameter DW = 32; /// Data bus address width
   parameter DW = 32; /// Data bus address width
 
 
Line 69... Line 74...
   output [31:0] fsl_dat_o;              // From regf of aeMB_regf.v
   output [31:0] fsl_dat_o;              // From regf of aeMB_regf.v
   output               fsl_stb_o;              // From ctrl of aeMB_ctrl.v
   output               fsl_stb_o;              // From ctrl of aeMB_ctrl.v
   output               fsl_wre_o;              // From ctrl of aeMB_ctrl.v
   output               fsl_wre_o;              // From ctrl of aeMB_ctrl.v
   output [IW-1:2]      iwb_adr_o;              // From bpcu of aeMB_bpcu.v
   output [IW-1:2]      iwb_adr_o;              // From bpcu of aeMB_bpcu.v
   output               iwb_stb_o;              // From ibuf of aeMB_ibuf.v
   output               iwb_stb_o;              // From ibuf of aeMB_ibuf.v
 
   output               rDWBSTB;                // From ctrl of aeMB_ctrl.v
 
   output               rFSLSTB;                // From ctrl of aeMB_ctrl.v
   // End of automatics
   // End of automatics
   /*AUTOINPUT*/
   /*AUTOINPUT*/
   // Beginning of automatic inputs (from unused autoinst inputs)
   // Beginning of automatic inputs (from unused autoinst inputs)
   input                dwb_ack_i;              // To scon of aeMB_scon.v, ...
   input                dwb_ack_i;              // To ctrl of aeMB_ctrl.v
   input [31:0]          dwb_dat_i;              // To regf of aeMB_regf.v
   input [31:0]          dwb_dat_i;              // To regf of aeMB_regf.v
   input                fsl_ack_i;              // To scon of aeMB_scon.v, ...
   input                fsl_ack_i;              // To ctrl of aeMB_ctrl.v
   input [31:0]          fsl_dat_i;              // To regf of aeMB_regf.v
   input [31:0]          fsl_dat_i;              // To regf of aeMB_regf.v
   input                iwb_ack_i;              // To scon of aeMB_scon.v, ...
   input                iwb_ack_i;              // To ibuf of aeMB_ibuf.v, ...
   input [31:0]          iwb_dat_i;              // To ibuf of aeMB_ibuf.v, ...
   input [31:0]          iwb_dat_i;              // To ibuf of aeMB_ibuf.v
   input                sys_clk_i;              // To scon of aeMB_scon.v
   input                sys_int_i;              // To ibuf of aeMB_ibuf.v
   input                sys_int_i;              // To scon of aeMB_scon.v
 
   input                sys_rst_i;              // To scon of aeMB_scon.v
 
   // End of automatics
   // End of automatics
   /*AUTOWIRE*/
   /*AUTOWIRE*/
   // Beginning of automatic wires (for undeclared instantiated-module outputs)
   // Beginning of automatic wires (for undeclared instantiated-module outputs)
   wire                 gclk;                   // From scon of aeMB_scon.v
 
   wire                 gena;                   // From scon of aeMB_scon.v
 
   wire                 grst;                   // From scon of aeMB_scon.v
 
   wire [10:0]           rALT;                   // From ibuf of aeMB_ibuf.v
   wire [10:0]           rALT;                   // From ibuf of aeMB_ibuf.v
   wire [1:0]            rATOM;                  // From bpcu of aeMB_bpcu.v
 
   wire                 rBRA;                   // From bpcu of aeMB_bpcu.v
   wire                 rBRA;                   // From bpcu of aeMB_bpcu.v
   wire                 rDLY;                   // From bpcu of aeMB_bpcu.v
   wire                 rDLY;                   // From bpcu of aeMB_bpcu.v
   wire [31:0]           rDWBDI;                 // From regf of aeMB_regf.v
   wire [31:0]           rDWBDI;                 // From regf of aeMB_regf.v
   wire [3:0]            rDWBSEL;                // From xecu of aeMB_xecu.v
   wire [3:0]            rDWBSEL;                // From xecu of aeMB_xecu.v
   wire                 rDWBSTB;                // From ctrl of aeMB_ctrl.v
 
   wire                 rFSLSTB;                // From ctrl of aeMB_ctrl.v
 
   wire [15:0]           rIMM;                   // From ibuf of aeMB_ibuf.v
   wire [15:0]           rIMM;                   // From ibuf of aeMB_ibuf.v
   wire                 rMSR_BIP;               // From xecu of aeMB_xecu.v
   wire                 rMSR_BIP;               // From xecu of aeMB_xecu.v
   wire                 rMSR_IE;                // From xecu of aeMB_xecu.v
   wire                 rMSR_IE;                // From xecu of aeMB_xecu.v
   wire [1:0]            rMXALT;                 // From ctrl of aeMB_ctrl.v
   wire [1:0]            rMXALT;                 // From ctrl of aeMB_ctrl.v
   wire [2:0]            rMXALU;                 // From ctrl of aeMB_ctrl.v
   wire [2:0]            rMXALU;                 // From ctrl of aeMB_ctrl.v
Line 114... Line 113...
   wire [31:0]           rREGA;                  // From regf of aeMB_regf.v
   wire [31:0]           rREGA;                  // From regf of aeMB_regf.v
   wire [31:0]           rREGB;                  // From regf of aeMB_regf.v
   wire [31:0]           rREGB;                  // From regf of aeMB_regf.v
   wire [31:0]           rRESULT;                // From xecu of aeMB_xecu.v
   wire [31:0]           rRESULT;                // From xecu of aeMB_xecu.v
   wire [4:0]            rRW;                    // From ctrl of aeMB_ctrl.v
   wire [4:0]            rRW;                    // From ctrl of aeMB_ctrl.v
   wire [31:0]           rSIMM;                  // From ibuf of aeMB_ibuf.v
   wire [31:0]           rSIMM;                  // From ibuf of aeMB_ibuf.v
   wire [1:0]            rXCE;                   // From scon of aeMB_scon.v
   wire [31:0]           xIREG;                  // From ibuf of aeMB_ibuf.v
   // End of automatics
   // End of automatics
 
 
   aeMB_scon
   input                sys_clk_i;
     scon (/*AUTOINST*/
   input                sys_rst_i;
           // Outputs
 
           .rXCE                        (rXCE[1:0]),
   wire                 grst = sys_rst_i;
           .grst                        (grst),
   wire                 gclk = sys_clk_i;
           .gclk                        (gclk),
   wire                 gena = !((dwb_stb_o ^ dwb_ack_i) | (fsl_stb_o ^ fsl_ack_i) | !iwb_ack_i);
           .gena                        (gena),
 
           // Inputs
 
           .rOPC                        (rOPC[5:0]),
 
           .rATOM                       (rATOM[1:0]),
 
           .rDWBSTB                     (rDWBSTB),
 
           .rFSLSTB                     (rFSLSTB),
 
           .dwb_ack_i                   (dwb_ack_i),
 
           .iwb_ack_i                   (iwb_ack_i),
 
           .fsl_ack_i                   (fsl_ack_i),
 
           .rMSR_IE                     (rMSR_IE),
 
           .rMSR_BIP                    (rMSR_BIP),
 
           .rBRA                        (rBRA),
 
           .rDLY                        (rDLY),
 
           .sys_clk_i                   (sys_clk_i),
 
           .sys_rst_i                   (sys_rst_i),
 
           .sys_int_i                   (sys_int_i));
 
 
 
   aeMB_ibuf
   aeMB_ibuf
     ibuf (/*AUTOINST*/
     ibuf (/*AUTOINST*/
           // Outputs
           // Outputs
           .rIMM                        (rIMM[15:0]),
           .rIMM                        (rIMM[15:0]),
Line 150... Line 133...
           .rRD                         (rRD[4:0]),
           .rRD                         (rRD[4:0]),
           .rRB                         (rRB[4:0]),
           .rRB                         (rRB[4:0]),
           .rALT                        (rALT[10:0]),
           .rALT                        (rALT[10:0]),
           .rOPC                        (rOPC[5:0]),
           .rOPC                        (rOPC[5:0]),
           .rSIMM                       (rSIMM[31:0]),
           .rSIMM                       (rSIMM[31:0]),
 
           .xIREG                       (xIREG[31:0]),
           .iwb_stb_o                   (iwb_stb_o),
           .iwb_stb_o                   (iwb_stb_o),
           // Inputs
           // Inputs
           .rBRA                        (rBRA),
           .rBRA                        (rBRA),
           .rXCE                        (rXCE[1:0]),
           .rMSR_IE                     (rMSR_IE),
 
           .rMSR_BIP                    (rMSR_BIP),
           .iwb_dat_i                   (iwb_dat_i[31:0]),
           .iwb_dat_i                   (iwb_dat_i[31:0]),
           .iwb_ack_i                   (iwb_ack_i),
           .iwb_ack_i                   (iwb_ack_i),
 
           .sys_int_i                   (sys_int_i),
           .gclk                        (gclk),
           .gclk                        (gclk),
           .grst                        (grst),
           .grst                        (grst),
           .gena                        (gena));
           .gena                        (gena));
 
 
   aeMB_ctrl
   aeMB_ctrl
Line 176... Line 162...
           .dwb_stb_o                   (dwb_stb_o),
           .dwb_stb_o                   (dwb_stb_o),
           .dwb_wre_o                   (dwb_wre_o),
           .dwb_wre_o                   (dwb_wre_o),
           .fsl_stb_o                   (fsl_stb_o),
           .fsl_stb_o                   (fsl_stb_o),
           .fsl_wre_o                   (fsl_wre_o),
           .fsl_wre_o                   (fsl_wre_o),
           // Inputs
           // Inputs
           .rXCE                        (rXCE[1:0]),
 
           .rDLY                        (rDLY),
           .rDLY                        (rDLY),
           .rIMM                        (rIMM[15:0]),
           .rIMM                        (rIMM[15:0]),
           .rALT                        (rALT[10:0]),
           .rALT                        (rALT[10:0]),
           .rOPC                        (rOPC[5:0]),
           .rOPC                        (rOPC[5:0]),
           .rRD                         (rRD[4:0]),
           .rRD                         (rRD[4:0]),
           .rRA                         (rRA[4:0]),
           .rRA                         (rRA[4:0]),
           .rRB                         (rRB[4:0]),
           .rRB                         (rRB[4:0]),
           .rPC                         (rPC[31:2]),
           .rPC                         (rPC[31:2]),
           .rBRA                        (rBRA),
           .rBRA                        (rBRA),
           .rMSR_IE                     (rMSR_IE),
           .rMSR_IE                     (rMSR_IE),
 
           .xIREG                       (xIREG[31:0]),
           .dwb_ack_i                   (dwb_ack_i),
           .dwb_ack_i                   (dwb_ack_i),
           .iwb_ack_i                   (iwb_ack_i),
           .iwb_ack_i                   (iwb_ack_i),
           .iwb_dat_i                   (iwb_dat_i[31:0]),
 
           .fsl_ack_i                   (fsl_ack_i),
           .fsl_ack_i                   (fsl_ack_i),
           .gclk                        (gclk),
           .gclk                        (gclk),
           .grst                        (grst),
           .grst                        (grst),
           .gena                        (gena));
           .gena                        (gena));
 
 
Line 203... Line 188...
           .iwb_adr_o                   (iwb_adr_o[IW-1:2]),
           .iwb_adr_o                   (iwb_adr_o[IW-1:2]),
           .rPC                         (rPC[31:2]),
           .rPC                         (rPC[31:2]),
           .rPCLNK                      (rPCLNK[31:2]),
           .rPCLNK                      (rPCLNK[31:2]),
           .rBRA                        (rBRA),
           .rBRA                        (rBRA),
           .rDLY                        (rDLY),
           .rDLY                        (rDLY),
           .rATOM                       (rATOM[1:0]),
 
           // Inputs
           // Inputs
           .rMXALT                      (rMXALT[1:0]),
           .rMXALT                      (rMXALT[1:0]),
           .rOPC                        (rOPC[5:0]),
           .rOPC                        (rOPC[5:0]),
           .rRD                         (rRD[4:0]),
           .rRD                         (rRD[4:0]),
           .rRA                         (rRA[4:0]),
           .rRA                         (rRA[4:0]),
           .rRESULT                     (rRESULT[31:0]),
           .rRESULT                     (rRESULT[31:0]),
           .rDWBDI                      (rDWBDI[31:0]),
           .rDWBDI                      (rDWBDI[31:0]),
           .rREGA                       (rREGA[31:0]),
           .rREGA                       (rREGA[31:0]),
           .rXCE                        (rXCE[1:0]),
 
           .gclk                        (gclk),
           .gclk                        (gclk),
           .grst                        (grst),
           .grst                        (grst),
           .gena                        (gena));
           .gena                        (gena));
 
 
   aeMB_regf
   aeMB_regf
Line 254... Line 237...
           .rRESULT                     (rRESULT[31:0]),
           .rRESULT                     (rRESULT[31:0]),
           .rDWBSEL                     (rDWBSEL[3:0]),
           .rDWBSEL                     (rDWBSEL[3:0]),
           .rMSR_IE                     (rMSR_IE),
           .rMSR_IE                     (rMSR_IE),
           .rMSR_BIP                    (rMSR_BIP),
           .rMSR_BIP                    (rMSR_BIP),
           // Inputs
           // Inputs
           .rXCE                        (rXCE[1:0]),
 
           .rREGA                       (rREGA[31:0]),
           .rREGA                       (rREGA[31:0]),
           .rREGB                       (rREGB[31:0]),
           .rREGB                       (rREGB[31:0]),
           .rMXSRC                      (rMXSRC[1:0]),
           .rMXSRC                      (rMXSRC[1:0]),
           .rMXTGT                      (rMXTGT[1:0]),
           .rMXTGT                      (rMXTGT[1:0]),
           .rRA                         (rRA[4:0]),
           .rRA                         (rRA[4:0]),

powered by: WebSVN 2.1.0

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