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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [axi4_lib/] [sim/] [src/] [BP065-BU-01000-r0p1-00rel0/] [axi4_checker.sv] - Blame information for rev 31

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2015 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
 
29
module
30
  axi4_checker
31
  #(
32
    A = 32, // address bus width
33
    N = 8,  // data bus width in bytes
34
    I = 1,   // ID width
35
 
36
    MAXRBURSTS    = 16,
37
    MAXWBURSTS    = 16,
38
    MAXWAITS      = 16,
39
    RecommendOn   = 1'b1,
40
    RecMaxWaitOn  = 1'b1,
41 31 qaztronic
    EXMON_WIDTH   = 4
42 29 qaztronic
  )
43
  (
44
    axi4_if axi4_in
45
  );
46
 
47
  //---------------------------------------------------
48
  //
49
  localparam AWUSER_MAX = 0;
50
  localparam WUSER_MAX = 0;
51
  localparam BUSER_MAX = 0;
52
  localparam ARUSER_MAX = 0;
53
  localparam RUSER_MAX = 0;
54
 
55
 
56
  //---------------------------------------------------
57
  //
58
  // INDEX:        - Global Signals
59
  // =====
60
  wire                ACLK = axi4_in.aclk;     // AXI Clock
61
  wire                ARESETn = axi4_in.aresetn;  // AXI Reset
62
 
63
  // INDEX:        - Write Address Channel
64
  // =====
65
  wire      [(I-1):0] AWID = axi4_in.awid;
66
  wire      [(A-1):0] AWADDR = axi4_in.awaddr;
67
  wire          [7:0] AWLEN = axi4_in.awlen;
68
  wire          [2:0] AWSIZE = axi4_in.awsize;
69
  wire          [1:0] AWBURST = axi4_in.awburst;
70
  wire          [3:0] AWCACHE = axi4_in.awcache;
71
  wire          [2:0] AWPROT = axi4_in.awprot;
72
  wire          [3:0] AWQOS = axi4_in.awqos;
73
  wire          [3:0] AWREGION = axi4_in.awregion;
74
  wire                AWLOCK = axi4_in.awlock;
75
  wire [AWUSER_MAX:0] AWUSER = 0;
76
  wire                AWVALID = axi4_in.awvalid;
77
  wire                AWREADY = axi4_in.awready;
78
 
79
  // INDEX:        - Write Data Channel
80
  // =====
81
  wire    [(8*N)-1:0] WDATA = axi4_in.wdata;
82
  wire        [N-1:0] WSTRB = axi4_in.wstrb;
83
  wire  [WUSER_MAX:0] WUSER = 0;
84
  wire                WLAST = axi4_in.wlast;
85
  wire                WVALID = axi4_in.wvalid;
86
  wire                WREADY = axi4_in.wready;
87
 
88
  // INDEX:        - Write Response Channel
89
  // =====
90
  wire      [(I-1):0] BID = axi4_in.bid;
91
  wire          [1:0] BRESP = axi4_in.bresp;
92
  wire  [BUSER_MAX:0] BUSER = 0;
93
  wire                BVALID = axi4_in.bvalid;
94
  wire                BREADY = axi4_in.bready;
95
 
96
  // INDEX:        - Read Address Channel
97
  // =====
98
  wire      [(I-1):0] ARID = axi4_in.arid;
99
  wire      [(A-1):0] ARADDR = axi4_in.araddr;
100
  wire          [7:0] ARLEN = axi4_in.arlen;
101
  wire          [2:0] ARSIZE = axi4_in.arsize;
102
  wire          [1:0] ARBURST = axi4_in.arburst;
103
  wire          [3:0] ARCACHE = axi4_in.arcache;
104
  wire          [3:0] ARQOS = axi4_in.arqos;
105
  wire          [3:0] ARREGION = axi4_in.arregion;
106
  wire          [2:0] ARPROT = axi4_in.arprot;
107
  wire                ARLOCK = axi4_in.arlock;
108
  wire [ARUSER_MAX:0] ARUSER = 0;
109
  wire                ARVALID = axi4_in.arvalid;
110
  wire                ARREADY = axi4_in.arready;
111
 
112
  // INDEX:        - Read Data Channel
113
  // =====
114
  wire      [(I-1):0] RID = axi4_in.rid;
115
  wire    [(8*N)-1:0] RDATA = axi4_in.rdata;
116
  wire          [1:0] RRESP = axi4_in.rresp;
117
  wire  [RUSER_MAX:0] RUSER = 0;
118
  wire                RLAST = axi4_in.rlast;
119
  wire                RVALID = axi4_in.rvalid;
120
  wire                RREADY = axi4_in.rready;
121
 
122
  // INDEX:        - Low Power Interface
123
  // =====
124
  wire                CACTIVE = 1;
125
  wire                CSYSREQ = 0;
126
  wire                CSYSACK = 0;
127
 
128
 
129
  //---------------------------------------------------
130
  //
131
  Axi4PC_ace
132
    #(
133
      // Set DATA_WIDTH to the data-bus width required
134
      .DATA_WIDTH(8*N), // = 64;         // data bus width, default = 64-bit
135
 
136
      // Select the number of channel ID bits required
137
      .WID_WIDTH(I), // = 4;            // (A|W|R|B)ID width
138
      .RID_WIDTH(I), // = 4;            // (A|W|R|B)ID width
139
 
140
      // Select the size of the USER buses, default = 32-bit
141
      .AWUSER_WIDTH(0), // = 32;       // width of the user AW sideband field
142
      .WUSER_WIDTH(0), //  = 32;       // width of the user W  sideband field
143
      .BUSER_WIDTH(0), //  = 32;       // width of the user B  sideband field
144
      .ARUSER_WIDTH(0), // = 32;       // width of the user AR sideband field
145
      .RUSER_WIDTH(0), //  = 32;       // width of the user R  sideband field
146
 
147
      // Size of CAMs for storing outstanding read bursts, this should match or
148
      // exceed the number of outstanding read addresses accepted into the slave
149
      // interface
150
      .MAXRBURSTS(MAXRBURSTS), // = 16;
151
 
152
      // Size of CAMs for storing outstanding write bursts, this should match or
153
      // exceed the number of outstanding write bursts into the slave  interface
154
      .MAXWBURSTS(MAXWBURSTS), // = 16;
155
 
156
      // Maximum number of cycles between VALID -> READY high before a warning is
157
      // generated
158
      .MAXWAITS(MAXWAITS), // = 16;
159
 
160
      // Recommended Rules Enable
161
      // enable/disable reporting of all  AXI4_REC*_* rules
162
      .RecommendOn(RecommendOn), //   = 1'b1;
163
      // enable/disable reporting of just AXI4_REC*_MAX_WAIT rules
164
      .RecMaxWaitOn(RecMaxWaitOn), //  = 1'b1;
165
 
166
      // Set the protocol - used to disable some AXI4 checks for ACE
167 31 qaztronic
      // .PROTOCOL(PROTOCOL), // = `AXI4PC_AMBA_AXI4;
168 29 qaztronic
 
169
      // Set ADDR_WIDTH to the address-bus width required
170
      .ADDR_WIDTH(A), // = 32;        // address bus width, default = 32-bit
171
 
172
      // Set EXMON_WIDTH to the exclusive access monitor width required
173
      .EXMON_WIDTH(EXMON_WIDTH)  // = 4;        // exclusive access width, default = 4-bit
174
    )
175
    Axi4PC_ace_i(.*);
176
 
177
 
178
//---------------------------------------------------
179
//
180
 
181
endmodule
182
 

powered by: WebSVN 2.1.0

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