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 5

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

Line No. Rev Author Line
1 2 eyalhoc
OUTFILE PREFIX_ic_addr.v
2
 
3
ITER MX
4
ITER SX
5
 
6
module PREFIX_ic_addr (PORTS);
7
 
8
   input                                      clk;
9
   input                                      reset;
10
 
11
   output [EXPR(SLV_BITS-1):0]                 MMX_ASLV;
12
   port                                       MMX_AGROUP_IC_AXI_A;
13
   output [EXPR(MSTR_BITS-1):0]        SSX_AMSTR;
14
   output                                     SSX_AIDOK;
15
   revport                                    SSX_AGROUP_IC_AXI_A;
16
 
17
 
18
   parameter                                  MASTER_NONE = 0;
19
   parameter                                  MASTERMX    = 1 << MX;
20
 
21
   parameter                                  ABUS_WIDTH = GONCAT(GROUP_IC_AXI_A.IN.WIDTH +);
22
 
23
 
24
   wire [ABUS_WIDTH-1:0]                       SSX_ABUS;
25
 
26
   wire [ABUS_WIDTH-1:0]                       MMX_ABUS;
27
 
28
   wire                                       SSX_MMX;
29
 
30
   wire [EXPR(SLV_BITS-1):0]                   MMX_ASLV;
31
 
32
   wire                                       MMX_AIDOK;
33
 
34
   wire [EXPR(MSTRS-1):0]                      SSX_master;
35
 
36
   reg [EXPR(MSTR_BITS-1):0]                   SSX_AMSTR;
37
 
38
   wire                                       SSX_AIDOK;
39
 
40
   CREATE ic_dec.v def_ic.txt
41
   PREFIX_ic_dec #(ADDR_BITS)
42
   PREFIX_ic_dec (
43
                  .MMX_AADDR(MMX_AADDR),
44
                  .MMX_AID(MMX_AID),
45
                  .MMX_ASLV(MMX_ASLV),
46
                  .MMX_AIDOK(MMX_AIDOK),
47
                  STOMP ,
48
                  );
49
 
50
 
51
   CREATE ic_arbiter.v def_ic.txt DEFCMD(SWAP MSTR_SLV mstr) DEFCMD(SWAP MSTRNUM MSTRS) DEFCMD(SWAP SLVNUM SLVS) DEFCMD(DEFINE DEF_PRIO)
52
   PREFIX_ic_mstr_arbiter
53
   PREFIX_ic_mstr_arbiter(
54
                          .clk(clk),
55
                          .reset(reset),
56
 
57
                          .MMX_slave(MMX_ASLV),
58
 
59
                          .SSX_master(SSX_master),
60
 
61
                          .M_last({MSTRS{1'b1}}),
62
                          .M_req({CONCAT(MMX_AVALID ,)}),
63
                          .M_grant({CONCAT(MMX_AREADY ,)})
64
                          );
65
 
66
   LOOP SX
67
     always @(/*AUTOSENSE*/SSX_master)
68
       begin
69
          case (SSX_master)
70
            MASTERMX : SSX_AMSTR = MX;
71
            default : SSX_AMSTR = MASTER_NONE;
72
          endcase
73
       end
74
   ENDLOOP SX
75
 
76
     assign                  SSX_MMX    = SSX_master[MX];
77
 
78
   assign                    MMX_ABUS   = {GONCAT(MMX_AGROUP_IC_AXI_A.IN ,)};
79
 
80
 
81
   assign                    {GONCAT(SSX_AGROUP_IC_AXI_A.IN ,)} = SSX_ABUS;
82
 
83
 
84
   LOOP SX
85
   assign                    SSX_ABUS  = CONCAT((MMX_ABUS & {ABUS_WIDTH{SSX_MMX}}) |);
86
   assign                    SSX_AIDOK = CONCAT((SSX_MMX & MMX_AIDOK) |);
87
   ENDLOOP SX
88
 
89
   LOOP MX
90
       assign            MMX_AREADY =
91
                                          SSX_MMX ? SSX_AREADY :
92
                                          ~MMX_AVALID;
93
   ENDLOOP MX
94
 
95
     endmodule
96
 
97
 
98
 

powered by: WebSVN 2.1.0

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