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

Subversion Repositories apb_mstr

[/] [apb_mstr/] [trunk/] [src/] [base/] [axi2apb.v] - Diff between revs 5 and 12

Only display areas with differences | Details | Blame | View Log

Rev 5 Rev 12
<##//////////////////////////////////////////////////////////////////
<##//////////////////////////////////////////////////////////////////
////                                                             ////
////                                                             ////
////  Author: Eyal Hochberg                                      ////
////  Author: Eyal Hochberg                                      ////
////          eyal@provartec.com                                 ////
////          eyal@provartec.com                                 ////
////                                                             ////
////                                                             ////
////  Downloaded from: http://www.opencores.org                  ////
////  Downloaded from: http://www.opencores.org                  ////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
////                                                             ////
////                                                             ////
//// Copyright (C) 2010 Provartec LTD                            ////
//// Copyright (C) 2010 Provartec LTD                            ////
//// www.provartec.com                                           ////
//// www.provartec.com                                           ////
//// info@provartec.com                                          ////
//// info@provartec.com                                          ////
////                                                             ////
////                                                             ////
//// This source file may be used and distributed without        ////
//// This source file may be used and distributed without        ////
//// restriction provided that this copyright statement is not   ////
//// restriction provided that this copyright statement is not   ////
//// removed from the file and that any derivative work contains ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// the original copyright notice and the associated disclaimer.////
////                                                             ////
////                                                             ////
//// This source file is free software; you can redistribute it  ////
//// This source file is free software; you can redistribute it  ////
//// and/or modify it under the terms of the GNU Lesser General  ////
//// and/or modify it under the terms of the GNU Lesser General  ////
//// Public License as published by the Free Software Foundation.////
//// Public License as published by the Free Software Foundation.////
////                                                             ////
////                                                             ////
//// This source is distributed in the hope that it will be      ////
//// This source is distributed in the hope that it will be      ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
//// PURPOSE.  See the GNU Lesser General Public License for more////
//// PURPOSE.  See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html              ////
//// details. http://www.gnu.org/licenses/lgpl.html              ////
////                                                             ////
////                                                             ////
//////////////////////////////////////////////////////////////////##>
//////////////////////////////////////////////////////////////////##>
 
 
INCLUDE def_axi2apb.txt
INCLUDE def_axi2apb.txt
  OUTFILE PREFIX.v
  OUTFILE PREFIX.v
 
 
    ITER SX
    ITER SX
      module  PREFIX (PORTS);
      module  PREFIX (PORTS);
 
 
   input              clk;
   input              clk;
   input              reset;
   input              reset;
 
 
   port               GROUP_APB_AXI;
   port               GROUP_APB_AXI;
 
 
   //apb slaves
   //apb slaves
IFDEF TRUE(SLAVE_NUM==1)
IFDEF TRUE(SLAVE_NUM==1)
   port               GROUP_APB3;
   port               GROUP_APB3;
ELSE TRUE(SLAVE_NUM==1)
ELSE TRUE(SLAVE_NUM==1)
   output             penable;
   output             penable;
   output             pwrite;
   output             pwrite;
   output [ADDR_BITS-1:0] paddr;
   output [ADDR_BITS-1:0] paddr;
   output [31:0]          pwdata;
   output [31:0]          pwdata;
   output                 pselSX;
   output                 pselSX;
   input [31:0]           prdataSX;
   input [31:0]           prdataSX;
   input                  preadySX;
   input                  preadySX;
   input                  pslverrSX;
   input                  pslverrSX;
ENDIF TRUE(SLAVE_NUM==1)
ENDIF TRUE(SLAVE_NUM==1)
 
 
 
 
 
 
   wire                   GROUP_APB3;
   wire                   GROUP_APB3;
 
 
   //outputs of cmd
   //outputs of cmd
   wire                   cmd_empty;
   wire                   cmd_empty;
   wire                   cmd_read;
   wire                   cmd_read;
   wire [ID_BITS-1:0]     cmd_id;
   wire [ID_BITS-1:0]     cmd_id;
   wire [ADDR_BITS-1:0]   cmd_addr;
   wire [ADDR_BITS-1:0]   cmd_addr;
   wire                   cmd_err;
   wire                   cmd_err;
 
 
   //outputs of rd / wr
   //outputs of rd / wr
   wire                   finish_wr;
   wire                   finish_wr;
   wire                   finish_rd;
   wire                   finish_rd;
 
 
 
 
   assign                 paddr  = cmd_addr;
   assign                 paddr  = cmd_addr;
   assign                 pwdata = WDATA;
   assign                 pwdata = WDATA;
 
 
 
 
   CREATE axi2apb_cmd.v
   CREATE axi2apb_cmd.v
     PREFIX_cmd PREFIX_cmd(
     PREFIX_cmd PREFIX_cmd(
                                           .clk(clk),
                                           .clk(clk),
                                           .reset(reset),
                                           .reset(reset),
                                           .AWGROUP_APB_AXI_A(AWGROUP_APB_AXI_A),
                                           .AWGROUP_APB_AXI_A(AWGROUP_APB_AXI_A),
                                           .ARGROUP_APB_AXI_A(ARGROUP_APB_AXI_A),
                                           .ARGROUP_APB_AXI_A(ARGROUP_APB_AXI_A),
                                           .finish_wr(finish_wr),
                                           .finish_wr(finish_wr),
                                           .finish_rd(finish_rd),
                                           .finish_rd(finish_rd),
                                           .cmd_empty(cmd_empty),
                                           .cmd_empty(cmd_empty),
                                           .cmd_read(cmd_read),
                                           .cmd_read(cmd_read),
                                           .cmd_id(cmd_id),
                                           .cmd_id(cmd_id),
                                           .cmd_addr(cmd_addr),
                                           .cmd_addr(cmd_addr),
                                           .cmd_err(cmd_err)
                                           .cmd_err(cmd_err)
                                           );
                                           );
 
 
 
 
   CREATE axi2apb_rd.v
   CREATE axi2apb_rd.v
     PREFIX_rd PREFIX_rd(
     PREFIX_rd PREFIX_rd(
                                         .clk(clk),
                                         .clk(clk),
                                         .reset(reset),
                                         .reset(reset),
                                         .GROUP_APB3(GROUP_APB3),
                                         .GROUP_APB3(GROUP_APB3),
                                         .cmd_err(cmd_err),
                                         .cmd_err(cmd_err),
                                         .cmd_id(cmd_id),
                                         .cmd_id(cmd_id),
                                         .finish_rd(finish_rd),
                                         .finish_rd(finish_rd),
                                         .RGROUP_APB_AXI_R(RGROUP_APB_AXI_R),
                                         .RGROUP_APB_AXI_R(RGROUP_APB_AXI_R),
                                         STOMP ,
                                         STOMP ,
                                         );
                                         );
 
 
   CREATE axi2apb_wr.v
   CREATE axi2apb_wr.v
     PREFIX_wr PREFIX_wr(
     PREFIX_wr PREFIX_wr(
                                         .clk(clk),
                                         .clk(clk),
                                         .reset(reset),
                                         .reset(reset),
                                         .GROUP_APB3(GROUP_APB3),
                                         .GROUP_APB3(GROUP_APB3),
                                         .cmd_err(cmd_err),
                                         .cmd_err(cmd_err),
                                         .cmd_id(cmd_id),
                                         .cmd_id(cmd_id),
                                         .finish_wr(finish_wr),
                                         .finish_wr(finish_wr),
                                         .WGROUP_APB_AXI_W(WGROUP_APB_AXI_W),
                                         .WGROUP_APB_AXI_W(WGROUP_APB_AXI_W),
                                         .BGROUP_APB_AXI_B(BGROUP_APB_AXI_B),
                                         .BGROUP_APB_AXI_B(BGROUP_APB_AXI_B),
                                         STOMP ,
                                         STOMP ,
                                         );
                                         );
 
 
 
 
 
 
   CREATE axi2apb_ctrl.v
   CREATE axi2apb_ctrl.v
     PREFIX_ctrl PREFIX_ctrl(
     PREFIX_ctrl PREFIX_ctrl(
                                             .clk(clk),
                                             .clk(clk),
                                             .reset(reset),
                                             .reset(reset),
                                             .finish_wr(finish_wr),
                                             .finish_wr(finish_wr),
                                             .finish_rd(finish_rd),
                                             .finish_rd(finish_rd),
                                             .cmd_empty(cmd_empty),
                                             .cmd_empty(cmd_empty),
                                             .cmd_read(cmd_read),
                                             .cmd_read(cmd_read),
                                             .WVALID(WVALID),
                                             .WVALID(WVALID),
                                             .psel(psel),
                                             .psel(psel),
                                             .penable(penable),
                                             .penable(penable),
                                             .pwrite(pwrite),
                                             .pwrite(pwrite),
                                             .pready(pready)
                                             .pready(pready)
                                             );
                                             );
 
 
 
 
IFDEF TRUE(SLAVE_NUM>1)
IFDEF TRUE(SLAVE_NUM>1)
   CREATE axi2apb_mux.v
   CREATE axi2apb_mux.v
     PREFIX_mux PREFIX_mux(
     PREFIX_mux PREFIX_mux(
                                           .clk(clk),
                                           .clk(clk),
                                           .reset(reset),
                                           .reset(reset),
                                           .cmd_addr(cmd_addr),
                                           .cmd_addr(cmd_addr),
                                           .psel(psel),
                                           .psel(psel),
                                           .prdata(prdata),
                                           .prdata(prdata),
                                           .pready(pready),
                                           .pready(pready),
                                           .pslverr(pslverr),
                                           .pslverr(pslverr),
                                           .pselSX(pselSX),
                                           .pselSX(pselSX),
                                           .preadySX(preadySX),
                                           .preadySX(preadySX),
                                           .pslverrSX(pslverrSX),
                                           .pslverrSX(pslverrSX),
                                           .prdataSX(prdataSX),
                                           .prdataSX(prdataSX),
                                           STOMP ,
                                           STOMP ,
                                           );
                                           );
ENDIF TRUE(SLAVE_NUM>1)
ENDIF TRUE(SLAVE_NUM>1)
 
 
endmodule
endmodule
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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