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.v] - Blame information for rev 22

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.v
31 16 eyalhoc
INCLUDE def_ic.txt
32
 
33 2 eyalhoc
ITER MX
34
ITER SX SLAVE_NUM ##external slave ports don't include decerr slave
35
 
36 18 eyalhoc
VERIFY (GROUP_MMX_ID.NUM > 0) ##Master MX does not have group for AXI IDs
37 16 eyalhoc
 
38 18 eyalhoc
VERIFY(UNIQUE(GONCAT(GROUP_MMX_ID ,))) ##Master MX IDs are not unique
39
 
40 19 eyalhoc
IF UNIQUE_ID VERIFY (UNIQUE(CONCAT(GONCAT(GROUP_MMX_ID ,) ,))) ##Masters IDs are not unique (Undefinig UNIQUE_ID will make IDs unique internally)
41 18 eyalhoc
 
42 19 eyalhoc
 
43 2 eyalhoc
module  PREFIX_ic (PORTS);
44
 
45
   input                                      clk;
46
   input                                      reset;
47
 
48 19 eyalhoc
   port                                       MMX_GROUP_IC_AXI.PARAM(EXTRA_BITS 0);
49
   revport                                    SSX_GROUP_IC_AXI.PARAM(EXTRA_BITS MSTR_BITS);
50 2 eyalhoc
ENDITER SX
51
ITER SX ##use global iterator
52
 
53
   wire [EXPR(SLV_BITS-1):0]                   MMX_AWSLV;
54
   wire [EXPR(SLV_BITS-1):0]                   MMX_ARSLV;
55
 
56
   wire [EXPR(MSTR_BITS-1):0]                  SSX_AWMSTR;
57
   wire [EXPR(MSTR_BITS-1):0]                  SSX_ARMSTR;
58
   wire                                       SSX_AWIDOK;
59
   wire                                       SSX_ARIDOK;
60 19 eyalhoc
 
61 2 eyalhoc
 
62 19 eyalhoc
IFDEF UNIQUE_ID
63
   wire [EXPR(MSTR_ID_BITS-1):0]              MMX_AWID_FULL;
64
   wire [EXPR(MSTR_ID_BITS-1):0]              MMX_ARID_FULL;
65
   wire [EXPR(MSTR_ID_BITS-1):0]              MMX_WID_FULL;
66
   wire [EXPR(MSTR_ID_BITS-1):0]              MMX_BID_FULL;
67
   wire [EXPR(MSTR_ID_BITS-1):0]              MMX_RID_FULL;
68
 
69
   assign                                     MMX_AWID_FULL = MMX_AWID;
70
   assign                                     MMX_WID_FULL  = MMX_WID;
71
   assign                                     MMX_ARID_FULL = MMX_ARID;
72
   assign                                     MMX_RID       = MMX_RID_FULL;
73
   assign                                     MMX_BID       = MMX_BID_FULL;
74
ELSE UNIQUE_ID
75
 
76
   wire [EXPR(MSTR_ID_BITS+MSTR_BITS-1):0]    MMX_AWID_FULL;
77
   wire [EXPR(MSTR_ID_BITS+MSTR_BITS-1):0]    MMX_WID_FULL;
78
   wire [EXPR(MSTR_ID_BITS+MSTR_BITS-1):0]    MMX_BID_FULL;
79
   wire [EXPR(MSTR_ID_BITS+MSTR_BITS-1):0]    MMX_ARID_FULL;
80
   wire [EXPR(MSTR_ID_BITS+MSTR_BITS-1):0]    MMX_RID_FULL;
81
 
82
   assign                                     MMX_AWID_FULL = {BIN(MX MSTR_BITS), MMX_AWID};
83
   assign                                     MMX_WID_FULL  = {BIN(MX MSTR_BITS), MMX_WID};
84
   assign                                     MMX_ARID_FULL = {BIN(MX MSTR_BITS), MMX_ARID};
85
 
86
   assign                                     MMX_RID[MSTR_ID_BITS-1:0] = MMX_RID_FULL;
87
   assign                                     MMX_BID[MSTR_ID_BITS-1:0] = MMX_BID_FULL;
88
ENDIF UNIQUE_ID
89
 
90
 
91
   CREATE ic_addr.v def_ic.txt DEFCMD(SWAP.GLOBAL EXTRA_BITS MSTR_BITS)
92 2 eyalhoc
   PREFIX_ic_addr
93
   PREFIX_ic_addr_rd (.clk(clk),
94
                      .reset(reset),
95
                      .MMX_ASLV(MMX_ARSLV),
96 19 eyalhoc
                      .MMX_AID(MMX_ARID_FULL),
97
                      .MMX_AGROUP_IC_AXI_A.SON(CHANGE!=1)(MMX_ARGROUP_IC_AXI_A),
98 2 eyalhoc
                      .SSX_AMSTR(SSX_ARMSTR),
99
                      .SSX_AIDOK(SSX_ARIDOK),
100
                      .SSX_AGROUP_IC_AXI_A(SSX_ARGROUP_IC_AXI_A),
101
                      STOMP ,
102
                      );
103
 
104
 
105
   PREFIX_ic_addr
106
   PREFIX_ic_addr_wr (
107
                      .clk(clk),
108
                      .reset(reset),
109
                      .MMX_ASLV(MMX_AWSLV),
110 19 eyalhoc
                      .MMX_AID(MMX_AWID_FULL),
111
                      .MMX_AGROUP_IC_AXI_A.SON(CHANGE!=1)(MMX_AWGROUP_IC_AXI_A),
112 2 eyalhoc
                      .SSX_AMSTR(SSX_AWMSTR),
113
                      .SSX_AIDOK(SSX_AWIDOK),
114
                      .SSX_AGROUP_IC_AXI_A(SSX_AWGROUP_IC_AXI_A),
115
                      STOMP ,
116
                      );
117
 
118
 
119 19 eyalhoc
   CREATE ic_resp.v def_ic.txt DEFCMD(SWAP CONST(RW) R) DEFCMD(SWAP.GLOBAL EXTRA_BITS MSTR_BITS)
120 2 eyalhoc
   PREFIX_ic_resp
121
   PREFIX_ic_rresp (
122
                    .clk(clk),
123
                    .reset(reset),
124 19 eyalhoc
                    .MMX_AID(MMX_ARID_FULL),
125
                    .MMX_ID(MMX_RID_FULL),
126
                    .MMX_AGROUP_IC_AXI_CMD.SON(CHANGE!=1)(MMX_ARGROUP_IC_AXI_CMD),
127
                    .MMX_GROUP_IC_AXI_R.SON(CHANGE!=1)(MMX_RGROUP_IC_AXI_R),
128 2 eyalhoc
                    .SSX_GROUP_IC_AXI_R(SSX_RGROUP_IC_AXI_R),
129
                    STOMP ,
130
                    );
131
 
132
 
133 19 eyalhoc
   CREATE ic_wdata.v def_ic.txt DEFCMD(SWAP.GLOBAL EXTRA_BITS MSTR_BITS)
134 2 eyalhoc
   PREFIX_ic_wdata
135
   PREFIX_ic_wdata (
136
                    .clk(clk),
137
                    .reset(reset),
138 19 eyalhoc
                    .MMX_AWID(MMX_AWID_FULL),
139
                    .MMX_WID(MMX_WID_FULL),
140
                    .MMX_AWGROUP_IC_AXI_CMD.SON(CHANGE!=1)(MMX_AWGROUP_IC_AXI_CMD),
141
                    .MMX_WGROUP_IC_AXI_W.SON(CHANGE!=1)(MMX_WGROUP_IC_AXI_W),
142 2 eyalhoc
                    .SSX_WGROUP_IC_AXI_W(SSX_WGROUP_IC_AXI_W),
143 16 eyalhoc
                    .SSX_AWVALID(SSX_AWVALID),
144
                    .SSX_AWREADY(SSX_AWREADY),
145 2 eyalhoc
                    .SSX_AWMSTR(SSX_AWMSTR),
146
                    STOMP ,
147
                    );
148
 
149
 
150 19 eyalhoc
   CREATE ic_resp.v def_ic.txt DEFCMD(SWAP CONST(RW) W) DEFCMD(SWAP.GLOBAL EXTRA_BITS MSTR_BITS)
151 2 eyalhoc
   PREFIX_ic_resp
152
   PREFIX_ic_bresp (
153
                    .clk(clk),
154
                    .reset(reset),
155 19 eyalhoc
                    .MMX_AID(MMX_AWID_FULL),
156
                    .MMX_ID(MMX_BID_FULL),
157
                    .MMX_AGROUP_IC_AXI_CMD.SON(CHANGE!=1)(MMX_AWGROUP_IC_AXI_CMD),
158
                    .MMX_GROUP_IC_AXI_B.SON(CHANGE!=1)(MMX_BGROUP_IC_AXI_B),
159 2 eyalhoc
                    .MMX_DATA(),
160
                    .MMX_LAST(),
161
                    .SSX_GROUP_IC_AXI_B(SSX_BGROUP_IC_AXI_B),
162
                    .SSX_DATA({DATA_BITS{1'b0}}),
163
                    .SSX_LAST(1'b1),
164
                    STOMP ,
165
                    );
166
 
167
 
168
   IFDEF DEF_DECERR_SLV
169
     wire            SSERR_GROUP_IC_AXI;
170
 
171 19 eyalhoc
   CREATE ic_decerr.v def_ic.txt DEFCMD(SWAP.GLOBAL EXTRA_BITS MSTR_BITS)
172 2 eyalhoc
   PREFIX_ic_decerr
173
     PREFIX_ic_decerr (
174
                       .clk(clk),
175
                       .reset(reset),
176
                       .AWIDOK(SSERR_AWIDOK),
177
                       .ARIDOK(SSERR_ARIDOK),
178
                       .GROUP_IC_AXI(SSERR_GROUP_IC_AXI),
179
                       STOMP ,
180
                       );
181
   ENDIF DEF_DECERR_SLV
182
 
183
 
184
     endmodule
185
 
186
 
187
 

powered by: WebSVN 2.1.0

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