1 |
31 |
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 |
|
|
module
|
29 |
|
|
amm_checker
|
30 |
|
|
#(
|
31 |
|
|
A = 32, // address bus width
|
32 |
|
|
N = 8, // data bus width in bytes
|
33 |
|
|
B = 7 // burstcount width
|
34 |
|
|
)
|
35 |
|
|
(
|
36 |
|
|
amm_if amm_s,
|
37 |
|
|
amm_if amm_m,
|
38 |
|
|
|
39 |
|
|
input clk, // amm_monitor_clk.clk
|
40 |
|
|
input reset // amm_monitor_clk_reset.reset
|
41 |
|
|
);
|
42 |
|
|
|
43 |
|
|
// --------------------------------------------------------------------
|
44 |
|
|
//
|
45 |
|
|
localparam A_S = A - $clog2(N) - 1;
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
// --------------------------------------------------------------------
|
49 |
|
|
//
|
50 |
|
|
altera_avalon_mm_monitor #(
|
51 |
|
|
.AV_ADDRESS_W (A),
|
52 |
|
|
.AV_SYMBOL_W (8),
|
53 |
|
|
.AV_NUMSYMBOLS (N),
|
54 |
|
|
.AV_BURSTCOUNT_W (B),
|
55 |
|
|
.USE_READ (1),
|
56 |
|
|
.USE_WRITE (1),
|
57 |
|
|
.USE_ADDRESS (1),
|
58 |
|
|
.USE_BYTE_ENABLE (1),
|
59 |
|
|
.USE_BURSTCOUNT (1),
|
60 |
|
|
.USE_READ_DATA (1),
|
61 |
|
|
.USE_READ_DATA_VALID (1),
|
62 |
|
|
.USE_WRITE_DATA (1),
|
63 |
|
|
.USE_BEGIN_TRANSFER (0),
|
64 |
|
|
.USE_BEGIN_BURST_TRANSFER (0),
|
65 |
|
|
.USE_WAIT_REQUEST (1),
|
66 |
|
|
.AV_CONSTANT_BURST_BEHAVIOR (1),
|
67 |
|
|
.AV_BURST_LINEWRAP (0),
|
68 |
|
|
.AV_BURST_BNDR_ONLY (0),
|
69 |
|
|
.AV_READ_TIMEOUT (256),
|
70 |
|
|
.AV_WRITE_TIMEOUT (256),
|
71 |
|
|
.AV_WAITREQUEST_TIMEOUT (1024),
|
72 |
|
|
.AV_MAX_PENDING_READS (3),
|
73 |
|
|
.AV_MAX_PENDING_WRITES (3),
|
74 |
|
|
.AV_FIX_READ_LATENCY (0),
|
75 |
|
|
.AV_MAX_READ_LATENCY (100),
|
76 |
|
|
.AV_MAX_WAITREQUESTED_READ (100),
|
77 |
|
|
.AV_MAX_WAITREQUESTED_WRITE (100),
|
78 |
|
|
.MASTER_ADDRESS_TYPE ("SYMBOLS"),
|
79 |
|
|
.SLAVE_ADDRESS_TYPE ("WORDS"),
|
80 |
|
|
.VHDL_ID (0),
|
81 |
|
|
.AV_READRESPONSE_W (8),
|
82 |
|
|
.AV_WRITERESPONSE_W (8),
|
83 |
|
|
.USE_ARBITERLOCK (0),
|
84 |
|
|
.USE_LOCK (0),
|
85 |
|
|
.USE_DEBUGACCESS (0),
|
86 |
|
|
.USE_TRANSACTIONID (0),
|
87 |
|
|
.USE_WRITERESPONSE (0),
|
88 |
|
|
.USE_READRESPONSE (0),
|
89 |
|
|
.USE_CLKEN (0),
|
90 |
|
|
.AV_MAX_CONTINUOUS_READ (5),
|
91 |
|
|
.AV_MAX_CONTINUOUS_WRITE (5),
|
92 |
|
|
.AV_MAX_CONTINUOUS_WAITREQUEST (5),
|
93 |
|
|
.AV_MAX_CONTINUOUS_READDATAVALID (5),
|
94 |
|
|
.AV_READ_WAIT_TIME (1),
|
95 |
|
|
.AV_WRITE_WAIT_TIME (0),
|
96 |
|
|
.REGISTER_WAITREQUEST (0),
|
97 |
|
|
.AV_REGISTERINCOMINGSIGNALS (0)
|
98 |
|
|
) amm_monitor (
|
99 |
|
|
.clk (clk), // clk.clk
|
100 |
|
|
.reset (reset), // clk_reset.reset
|
101 |
|
|
.avs_waitrequest (amm_s.waitrequest), // s0.waitrequest
|
102 |
|
|
.avs_write (amm_s.write), // .write
|
103 |
|
|
.avs_read (amm_s.read), // .read
|
104 |
|
|
.avs_address (amm_s.address[A_S:0]), // .address
|
105 |
|
|
.avs_byteenable (amm_s.byteenable), // .byteenable
|
106 |
|
|
.avs_burstcount (amm_s.burstcount), // .burstcount
|
107 |
|
|
.avs_readdata (amm_s.readdata), // .readdata
|
108 |
|
|
.avs_readdatavalid (amm_s.readdatavalid), // .readdatavalid
|
109 |
|
|
.avs_writedata (amm_s.writedata), // .writedata
|
110 |
|
|
.avm_waitrequest (amm_m.waitrequest), // m0.waitrequest
|
111 |
|
|
.avm_write (amm_m.write), // .write
|
112 |
|
|
.avm_read (amm_m.read), // .read
|
113 |
|
|
.avm_address (amm_m.address), // .address
|
114 |
|
|
.avm_byteenable (amm_m.byteenable), // .byteenable
|
115 |
|
|
.avm_burstcount (amm_m.burstcount), // .burstcount
|
116 |
|
|
.avm_readdata (amm_m.readdata), // .readdata
|
117 |
|
|
.avm_readdatavalid (amm_m.readdatavalid), // .readdatavalid
|
118 |
|
|
.avm_writedata (amm_m.writedata), // .writedata
|
119 |
|
|
.avs_begintransfer (1'b0), // (terminated)
|
120 |
|
|
.avm_begintransfer (), // (terminated)
|
121 |
|
|
.avs_beginbursttransfer (1'b0), // (terminated)
|
122 |
|
|
.avm_beginbursttransfer (), // (terminated)
|
123 |
|
|
.avs_transactionid (8'b00000000), // (terminated)
|
124 |
|
|
.avm_transactionid (), // (terminated)
|
125 |
|
|
.avs_response (), // (terminated)
|
126 |
|
|
.avm_response (2'b00), // (terminated)
|
127 |
|
|
.avs_readid (), // (terminated)
|
128 |
|
|
.avm_readid (8'b00000000), // (terminated)
|
129 |
|
|
.avs_writeresponserequest (1'b0), // (terminated)
|
130 |
|
|
.avm_writeresponserequest (), // (terminated)
|
131 |
|
|
.avs_writeresponsevalid (), // (terminated)
|
132 |
|
|
.avm_writeresponsevalid (1'b0), // (terminated)
|
133 |
|
|
.avs_writeid (), // (terminated)
|
134 |
|
|
.avm_writeid (8'b00000000), // (terminated)
|
135 |
|
|
.avs_arbiterlock (1'b0), // (terminated)
|
136 |
|
|
.avm_arbiterlock (), // (terminated)
|
137 |
|
|
.avs_lock (1'b0), // (terminated)
|
138 |
|
|
.avm_lock (), // (terminated)
|
139 |
|
|
.avs_debugaccess (1'b0), // (terminated)
|
140 |
|
|
.avm_debugaccess (), // (terminated)
|
141 |
|
|
.avs_clken (1'b1), // (terminated)
|
142 |
|
|
.avm_clken (), // (terminated)
|
143 |
|
|
.avm_readresponse (8'b00000000), // (terminated)
|
144 |
|
|
.avs_readresponse (), // (terminated)
|
145 |
|
|
.avm_writeresponse (8'b00000000), // (terminated)
|
146 |
|
|
.avs_writeresponse () // (terminated)
|
147 |
|
|
);
|
148 |
|
|
|
149 |
|
|
endmodule
|