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

Subversion Repositories ahb_master

[/] [ahb_master/] [trunk/] [src/] [base/] [ic_resp.v] - Blame information for rev 14

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 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 2 eyalhoc
 
30
OUTFILE PREFIX_ic_resp.v
31
 
32
ITER MX
33
ITER SX
34
 
35
module PREFIX_ic_resp (PORTS);
36
 
37
   parameter                              STRB_BITS  = DATA_BITS/8;
38
 
39
   input                                      clk;
40
   input                                      reset;
41
 
42
   port                                       MMX_AGROUP_IC_AXI_CMD;
43
   port                                       MMX_GROUP_IC_AXI_R;
44
   revport                                    SSX_GROUP_IC_AXI_R;
45
 
46
 
47
   parameter                              RBUS_WIDTH = GONCAT(GROUP_IC_AXI_R.OUT.WIDTH +);
48
 
49
   wire                                       SSX_req;
50
 
51
   wire [RBUS_WIDTH-1:0]           SSX_RBUS;
52
 
53
   wire [RBUS_WIDTH-1:0]           MMX_RBUS;
54
 
55
   wire                                       SSX_MMX;
56
 
57
   wire [MSTR_BITS-1:0]    SSX_MSTR;
58
   wire                                       SSX_OK;
59
 
60
   wire [SLVS-1:0]                         MMX_slave;
61
 
62
 
63
 
64
 
65
 
66
   CREATE ic_registry_resp.v def_ic.txt
67
   PREFIX_ic_registry_resp
68
     PREFIX_ic_registry_resp (
69
                              .clk(clk),
70
                              .reset(reset),
71
                              .MMX_ASLV(MMX_ASLV),
72
                              .MMX_AID(MMX_AID),
73
                              .MMX_AVALID(MMX_AVALID),
74
                              .MMX_AREADY(MMX_AREADY),
75
                              .SSX_ID(SSX_ID),
76
                              .SSX_VALID(SSX_VALID),
77
                              .SSX_READY(SSX_READY),
78
                              .SSX_LAST(SSX_LAST),
79
                              .SSX_MSTR(SSX_MSTR),
80
                              .SSX_OK(SSX_OK),
81
                              STOMP ,
82
                              );
83
 
84
 
85
   CREATE ic_arbiter.v def_ic.txt DEFCMD(SWAP MSTR_SLV slv) DEFCMD(SWAP MSTRNUM SLVS) DEFCMD(SWAP SLVNUM MSTRS) DEFCMD(DEFINE DEF_PRIO)
86
   PREFIX_ic_slv_arbiter
87
   PREFIX_ic_slv_arbiter(
88
                         .clk(clk),
89
                         .reset(reset),
90
 
91
                         .MSX_slave(SSX_MSTR),
92
 
93
                         .SMX_master(MMX_slave),
94
 
95
                         .M_last({CONCAT(SSX_LAST ,)}),
96
                         .M_req({CONCAT(SSX_req ,)}),
97
                         .M_grant({CONCAT(SSX_READY ,)})
98
                         );
99
 
100
 
101
   assign                                        SSX_req = SSX_VALID & SSX_OK;
102
 
103
   assign                                        SSX_MMX = MMX_slave[SX];
104
 
105
 
106
   assign                                        SSX_RBUS   = {GONCAT(SSX_GROUP_IC_AXI_R.OUT ,)};
107
 
108
   assign                                        {GONCAT(MMX_GROUP_IC_AXI_R.OUT ,)} = MMX_RBUS;
109
 
110
   LOOP MX
111
     assign                                      MMX_RBUS = CONCAT((SSX_RBUS & {RBUS_WIDTH{SSX_MMX}}) |);
112
 
113
   ENDLOOP MX
114
 
115
 
116
   LOOP SX
117
       assign                                    SSX_READY = CONCAT((SSX_MMX & MMX_READY) |);
118
 
119
   ENDLOOP SX
120
 
121
endmodule
122
 
123
 
124
 

powered by: WebSVN 2.1.0

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