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

Subversion Repositories robust_axi_fabric

[/] [robust_axi_fabric/] [trunk/] [src/] [base/] [ic_addr.v] - Blame information for rev 11

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 7 eyalhoc
<##//////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  Author: Eyal Hochberg                                      ////
4
////          eyal@provartec.com                                 ////
5
////                                                             ////
6
////  Downloaded from: http://www.opencores.org                  ////
7
/////////////////////////////////////////////////////////////////////
8
////                                                             ////
9
//// Copyright (C) 2010 Provartec LTD                            ////
10
//// www.provartec.com                                           ////
11
//// info@provartec.com                                          ////
12
////                                                             ////
13
//// This source file may be used and distributed without        ////
14
//// restriction provided that this copyright statement is not   ////
15
//// removed from the file and that any derivative work contains ////
16
//// the original copyright notice and the associated disclaimer.////
17
////                                                             ////
18
//// This source file is free software; you can redistribute it  ////
19
//// and/or modify it under the terms of the GNU Lesser General  ////
20
//// Public License as published by the Free Software Foundation.////
21
////                                                             ////
22
//// This source is distributed in the hope that it will be      ////
23
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
24
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
25
//// PURPOSE.  See the GNU Lesser General Public License for more////
26
//// details. http://www.gnu.org/licenses/lgpl.html              ////
27
////                                                             ////
28
//////////////////////////////////////////////////////////////////##>
29
 
30 2 eyalhoc
OUTFILE PREFIX_ic_addr.v
31
 
32
ITER MX
33
ITER SX
34
 
35
module PREFIX_ic_addr (PORTS);
36
 
37
   input                                      clk;
38
   input                                      reset;
39
 
40
   output [EXPR(SLV_BITS-1):0]                 MMX_ASLV;
41
   port                                       MMX_AGROUP_IC_AXI_A;
42
   output [EXPR(MSTR_BITS-1):0]        SSX_AMSTR;
43
   output                                     SSX_AIDOK;
44
   revport                                    SSX_AGROUP_IC_AXI_A;
45
 
46
 
47
   parameter                                  MASTER_NONE = 0;
48
   parameter                                  MASTERMX    = 1 << MX;
49
 
50
   parameter                                  ABUS_WIDTH = GONCAT(GROUP_IC_AXI_A.IN.WIDTH +);
51
 
52
 
53
   wire [ABUS_WIDTH-1:0]                       SSX_ABUS;
54
 
55
   wire [ABUS_WIDTH-1:0]                       MMX_ABUS;
56
 
57
   wire                                       SSX_MMX;
58
 
59
   wire [EXPR(SLV_BITS-1):0]                   MMX_ASLV;
60
 
61
   wire                                       MMX_AIDOK;
62
 
63
   wire [EXPR(MSTRS-1):0]                      SSX_master;
64
 
65
   reg [EXPR(MSTR_BITS-1):0]                   SSX_AMSTR;
66
 
67
   wire                                       SSX_AIDOK;
68
 
69
   CREATE ic_dec.v def_ic.txt
70 8 eyalhoc
   PREFIX_ic_dec
71 2 eyalhoc
   PREFIX_ic_dec (
72
                  .MMX_AADDR(MMX_AADDR),
73
                  .MMX_AID(MMX_AID),
74
                  .MMX_ASLV(MMX_ASLV),
75
                  .MMX_AIDOK(MMX_AIDOK),
76
                  STOMP ,
77
                  );
78
 
79
 
80
   CREATE ic_arbiter.v def_ic.txt DEFCMD(SWAP MSTR_SLV mstr) DEFCMD(SWAP MSTRNUM MSTRS) DEFCMD(SWAP SLVNUM SLVS) DEFCMD(DEFINE DEF_PRIO)
81
   PREFIX_ic_mstr_arbiter
82
   PREFIX_ic_mstr_arbiter(
83
                          .clk(clk),
84
                          .reset(reset),
85
 
86
                          .MMX_slave(MMX_ASLV),
87
 
88
                          .SSX_master(SSX_master),
89
 
90
                          .M_last({MSTRS{1'b1}}),
91
                          .M_req({CONCAT(MMX_AVALID ,)}),
92
                          .M_grant({CONCAT(MMX_AREADY ,)})
93
                          );
94
 
95
   LOOP SX
96
     always @(/*AUTOSENSE*/SSX_master)
97
       begin
98
          case (SSX_master)
99
            MASTERMX : SSX_AMSTR = MX;
100
            default : SSX_AMSTR = MASTER_NONE;
101
          endcase
102
       end
103
   ENDLOOP SX
104
 
105
     assign                  SSX_MMX    = SSX_master[MX];
106
 
107
   assign                    MMX_ABUS   = {GONCAT(MMX_AGROUP_IC_AXI_A.IN ,)};
108
 
109
 
110
   assign                    {GONCAT(SSX_AGROUP_IC_AXI_A.IN ,)} = SSX_ABUS;
111
 
112
 
113
   LOOP SX
114
   assign                    SSX_ABUS  = CONCAT((MMX_ABUS & {ABUS_WIDTH{SSX_MMX}}) |);
115
   assign                    SSX_AIDOK = CONCAT((SSX_MMX & MMX_AIDOK) |);
116
   ENDLOOP SX
117
 
118
   LOOP MX
119
       assign            MMX_AREADY =
120
                                          SSX_MMX ? SSX_AREADY :
121
                                          ~MMX_AVALID;
122
   ENDLOOP MX
123
 
124
     endmodule
125
 
126
 
127
 

powered by: WebSVN 2.1.0

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