17 #ifndef _BUS_AXI_SIGNAL_IF_H_
18 #define _BUS_AXI_SIGNAL_IF_H_
20 #include <scc/signal_opt_ports.h>
25 const sc_core::sc_time CLK_DELAY = 1_ps;
28 template <
typename T>
using m2s_t = sc_core::sc_out<T>;
29 template <
typename T>
using s2m_t = sc_core::sc_in<T>;
30 template <
typename T>
using m2s_full_t = sc_core::sc_out<T>;
31 template <
typename T>
using s2m_full_t = sc_core::sc_in<T>;
37 template <
typename T>
using m2s_t = sc_core::sc_out<T>;
38 template <
typename T>
using s2m_t = sc_core::sc_in<T>;
46 template <
typename T>
using m2s_t = sc_core::sc_in<T>;
47 template <
typename T>
using s2m_t = sc_core::sc_out<T>;
48 template <
typename T>
using m2s_full_t = sc_core::sc_in<T>;
49 template <
typename T>
using s2m_full_t = sc_core::sc_out<T>;
55 template <
typename T>
using m2s_t = sc_core::sc_in<T>;
56 template <
typename T>
using s2m_t = sc_core::sc_out<T>;
64 template <
typename T>
using m2s_t = sc_core::sc_signal<T>;
65 template <
typename T>
using s2m_t = sc_core::sc_signal<T>;
66 template <
typename T>
using m2s_full_t = sc_core::sc_signal<T>;
67 template <
typename T>
using s2m_full_t = sc_core::sc_signal<T>;
68 template <
typename T>
using m2s_opt_t = sc_core::sc_signal<T>;
69 template <
typename T>
using s2m_opt_t = sc_core::sc_signal<T>;
72 template <
bool Cond,
class T,
class S>
struct select_if {
typedef S type; };
73 template <
class T,
class S>
struct select_if<true, T, S> {
typedef T type; };
75 template <
unsigned int BUSWDTH = 32,
unsigned int ADDRWDTH = 32,
unsigned int IDWDTH = 32,
unsigned int USERWDTH = 1>
struct axi4_cfg {
76 static_assert(BUSWDTH > 0,
"BUSWIDTH shall be larger than 0");
77 static_assert(ADDRWDTH > 0,
"ADDRWDTH shall be larger than 0");
78 static_assert(IDWDTH > 0,
"IDWDTH shall be larger than 0");
79 constexpr
static bool IS_LITE =
false;
80 constexpr
static unsigned int BUSWIDTH = BUSWDTH;
81 constexpr
static unsigned int ADDRWIDTH = ADDRWDTH;
82 constexpr
static unsigned int IDWIDTH = IDWDTH;
83 constexpr
static unsigned int USERWIDTH = USERWDTH;
89 template <
unsigned int BUSWDTH = 32,
unsigned int ADDRWDTH = 32>
struct axi4_lite_cfg {
90 static_assert(BUSWDTH > 0,
"BUSWIDTH shall be larger than 0");
91 static_assert(ADDRWDTH > 0,
"ADDRWDTH shall be larger than 0");
92 constexpr
static bool IS_LITE =
true;
93 constexpr
static unsigned int BUSWIDTH = BUSWDTH;
94 constexpr
static unsigned int ADDRWIDTH = ADDRWDTH;
95 constexpr
static unsigned int IDWIDTH = 0;
96 constexpr
static unsigned int USERWIDTH = 1;
111 template <
unsigned int BUSWDTH = 32,
unsigned int ADDRWDTH = 32,
unsigned int IDWDTH = 32,
unsigned int USERWDTH = 1,
112 unsigned int AWSNOOPWDTH = 3,
unsigned int RESPWDTH = 4>
115 static_assert(BUSWDTH > 0,
"BUSWIDTH shall be larger than 0");
117 static_assert(ADDRWDTH > 0,
"ADDRWDTH shall be larger than 0");
118 static_assert(IDWDTH > 0,
"IDWDTH shall be larger than 0");
119 constexpr
static bool IS_LITE =
false;
120 constexpr
static unsigned int BUSWIDTH = BUSWDTH;
121 constexpr
static unsigned int ADDRWIDTH = ADDRWDTH;
122 constexpr
static unsigned int IDWIDTH = IDWDTH;
123 constexpr
static unsigned int USERWIDTH = USERWDTH;
124 constexpr
static unsigned int AWSNOOPWIDTH = AWSNOOPWDTH;
125 constexpr
static unsigned int RESPWIDTH = RESPWDTH;
131 inline std::string concat(
const char* prefix,
const char* name) {
return std::string(prefix) + name; }
134 template <
typename CFG,
typename TYPES = master_types>
struct aw_axi_lite;
135 template <
typename CFG,
typename TYPES = master_types>
struct aw_axi {
136 typename TYPES::template m2s_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> aw_id{
"aw_id"};
137 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> aw_addr{
"aw_addr"};
138 typename TYPES::template s2m_t<bool> aw_ready{
"aw_ready"};
139 typename TYPES::template m2s_full_t<bool> aw_lock{
"aw_lock"};
140 typename TYPES::template m2s_t<bool> aw_valid{
"aw_valid"};
141 typename TYPES::template m2s_t<sc_dt::sc_uint<3>> aw_prot{
"aw_prot"};
142 typename TYPES::template m2s_full_t<sc_dt::sc_uint<3>> aw_size{
"aw_size"};
143 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> aw_cache{
"aw_cache"};
144 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> aw_burst{
"aw_burst"};
145 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> aw_qos{
"aw_qos"};
146 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> aw_region{
"aw_region"};
147 typename TYPES::template m2s_full_t<sc_dt::sc_uint<8>> aw_len{
"aw_len"};
148 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> aw_user{
"aw_user"};
151 aw_axi(
const char* prefix)
152 : aw_id{concat(prefix,
"aw_id").c_str()}
153 , aw_addr{concat(prefix,
"aw_addr").c_str()}
154 , aw_ready{concat(prefix,
"aw_ready").c_str()}
155 , aw_lock{concat(prefix,
"aw_lock").c_str()}
156 , aw_valid{concat(prefix,
"aw_valid").c_str()}
157 , aw_prot{concat(prefix,
"aw_prot").c_str()}
158 , aw_size{concat(prefix,
"aw_size").c_str()}
159 , aw_cache{concat(prefix,
"aw_cache").c_str()}
160 , aw_burst{concat(prefix,
"aw_burst").c_str()}
161 , aw_qos{concat(prefix,
"aw_qos").c_str()}
162 , aw_region{concat(prefix,
"aw_region").c_str()}
163 , aw_len{concat(prefix,
"aw_len").c_str()}
164 , aw_user{concat(prefix,
"aw_user").c_str()} {}
168 aw_addr.bind(o.aw_addr);
169 aw_ready.bind(o.aw_ready);
170 aw_lock.bind(o.aw_lock);
171 aw_valid.bind(o.aw_valid);
172 aw_prot.bind(o.aw_prot);
173 aw_size.bind(o.aw_size);
174 aw_cache.bind(o.aw_cache);
175 aw_burst.bind(o.aw_burst);
176 aw_qos.bind(o.aw_qos);
177 aw_region.bind(o.aw_region);
178 aw_len.bind(o.aw_len);
179 aw_user.bind(o.aw_user);
185 template <
typename CFG,
typename TYPES = master_types>
struct wdata_axi_lite;
186 template <
typename CFG,
typename TYPES = master_types>
struct wdata_axi {
187 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<CFG::IDWIDTH>> w_id{
"w_id"};
188 typename TYPES::template m2s_t<typename CFG::data_t> w_data{
"w_data"};
189 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::BUSWIDTH / 8>> w_strb{
"w_strb"};
190 typename TYPES::template m2s_full_t<bool> w_last{
"w_last"};
191 typename TYPES::template m2s_t<bool> w_valid{
"w_valid"};
192 typename TYPES::template s2m_t<bool> w_ready{
"w_ready"};
193 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> w_user{
"w_user"};
194 typename TYPES::template m2s_full_t<bool> w_ack{
"w_ack"};
195 typename TYPES::template m2s_opt_t<bool> w_trace{
"w_trace"};
199 : w_id{concat(prefix,
"w_id").c_str()}
200 , w_data{concat(prefix,
"w_data").c_str()}
201 , w_strb{concat(prefix,
"w_strb").c_str()}
202 , w_last{concat(prefix,
"w_last").c_str()}
203 , w_valid{concat(prefix,
"w_valid").c_str()}
204 , w_ready{concat(prefix,
"w_ready").c_str()}
205 , w_user{concat(prefix,
"w_user").c_str()}
206 , w_ack{concat(prefix,
"w_ack").c_str()}
207 , w_trace{concat(prefix,
"w_trace").c_str()} {}
211 w_data.bind(o.w_data);
212 w_strb.bind(o.w_strb);
213 w_last.bind(o.w_last);
214 w_valid.bind(o.w_valid);
215 w_ready.bind(o.w_ready);
216 w_user.bind(o.w_user);
218 w_trace.bind(o.w_trace);
226 template <
typename CFG,
typename TYPES = master_types>
struct b_axi_lite;
227 template <
typename CFG,
typename TYPES = master_types>
struct b_axi {
228 typename TYPES::template s2m_t<bool> b_valid{
"b_valid"};
229 typename TYPES::template m2s_t<bool> b_ready{
"b_ready"};
230 typename TYPES::template s2m_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> b_id{
"b_id"};
231 typename TYPES::template s2m_t<sc_dt::sc_uint<2>> b_resp{
"b_resp"};
232 typename TYPES::template s2m_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> b_user{
"b_user"};
233 typename TYPES::template s2m_opt_t<bool> b_trace{
"b_trace"};
236 b_axi(
const char* prefix)
237 : b_valid{concat(prefix,
"b_valid").c_str()}
238 , b_ready{concat(prefix,
"b_ready").c_str()}
239 , b_id{concat(prefix,
"b_id").c_str()}
240 , b_resp{concat(prefix,
"b_resp").c_str()}
241 , b_user{concat(prefix,
"b_user").c_str()}
242 , b_trace{concat(prefix,
"b_trace").c_str()} {}
245 b_valid.bind(o.b_valid);
246 b_ready.bind(o.b_ready);
248 b_resp.bind(o.b_resp);
249 b_user.bind(o.b_user);
250 b_trace.bind(o.b_trace);
256 template <
typename CFG,
typename TYPES = master_types>
struct ar_axi_lite;
257 template <
typename CFG,
typename TYPES = master_types>
struct ar_axi {
258 typename TYPES::template m2s_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> ar_id{
"ar_id"};
259 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> ar_addr{
"ar_addr"};
260 typename TYPES::template m2s_full_t<sc_dt::sc_uint<8>> ar_len{
"ar_len"};
261 typename TYPES::template m2s_full_t<sc_dt::sc_uint<3>> ar_size{
"ar_size"};
262 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> ar_burst{
"ar_burst"};
263 typename TYPES::template m2s_full_t<bool> ar_lock{
"ar_lock"};
264 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_cache{
"ar_cache"};
265 typename TYPES::template m2s_t<sc_dt::sc_uint<3>> ar_prot{
"ar_prot"};
266 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_qos{
"ar_qos"};
267 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_region{
"ar_region"};
268 typename TYPES::template m2s_t<bool> ar_valid{
"ar_valid"};
269 typename TYPES::template s2m_t<bool> ar_ready{
"ar_ready"};
270 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> ar_user{
"ar_user"};
273 ar_axi(
const char* prefix)
274 : ar_id{concat(prefix,
"ar_id").c_str()}
275 , ar_addr{concat(prefix,
"ar_addr").c_str()}
276 , ar_len{concat(prefix,
"ar_len").c_str()}
277 , ar_size{concat(prefix,
"ar_size").c_str()}
278 , ar_burst{concat(prefix,
"ar_burst").c_str()}
279 , ar_lock{concat(prefix,
"ar_lock").c_str()}
280 , ar_cache{concat(prefix,
"ar_cache").c_str()}
281 , ar_prot{concat(prefix,
"ar_prot").c_str()}
282 , ar_qos{concat(prefix,
"ar_qos").c_str()}
283 , ar_region{concat(prefix,
"ar_region").c_str()}
284 , ar_valid{concat(prefix,
"ar_valid").c_str()}
285 , ar_ready{concat(prefix,
"ar_ready").c_str()}
286 , ar_user{concat(prefix,
"ar_user").c_str()} {}
290 ar_addr.bind(o.ar_addr);
291 ar_len.bind(o.ar_len);
292 ar_size.bind(o.ar_size);
293 ar_burst.bind(o.ar_burst);
294 ar_lock.bind(o.ar_lock);
295 ar_cache.bind(o.ar_cache);
296 ar_prot.bind(o.ar_prot);
297 ar_qos.bind(o.ar_qos);
298 ar_region.bind(o.ar_region);
299 ar_valid.bind(o.ar_valid);
300 ar_ready.bind(o.ar_ready);
301 ar_user.bind(o.ar_user);
307 template <
typename CFG,
typename TYPES = master_types>
struct rresp_axi_lite;
308 template <
typename CFG,
typename TYPES = master_types>
struct rresp_axi {
309 typename TYPES::template s2m_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> r_id{
"r_id"};
310 typename TYPES::template s2m_t<typename CFG::data_t> r_data{
"r_data"};
311 typename TYPES::template s2m_t<sc_dt::sc_uint<2>> r_resp{
"r_resp"};
312 typename TYPES::template s2m_full_t<bool> r_last{
"r_last"};
313 typename TYPES::template s2m_t<bool> r_valid{
"r_valid"};
314 typename TYPES::template m2s_t<bool> r_ready{
"r_ready"};
315 typename TYPES::template s2m_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> r_user{
"r_user"};
316 typename TYPES::template s2m_opt_t<bool> r_trace{
"r_trace"};
320 : r_id{concat(prefix,
"r_id").c_str()}
321 , r_data{concat(prefix,
"r_data").c_str()}
322 , r_resp{concat(prefix,
"r_resp").c_str()}
323 , r_last{concat(prefix,
"r_last").c_str()}
324 , r_valid{concat(prefix,
"r_valid").c_str()}
325 , r_ready{concat(prefix,
"r_ready").c_str()}
326 , r_user{concat(prefix,
"r_user").c_str()}
327 , r_trace{concat(prefix,
"r_trace").c_str()} {}
331 r_data.bind(o.r_data);
332 r_resp.bind(o.r_resp);
333 r_last.bind(o.r_last);
334 r_valid.bind(o.r_valid);
335 r_ready.bind(o.r_ready);
336 r_user.bind(o.r_user);
337 r_trace.bind(o.r_trace);
344 template <
typename CFG,
typename TYPES = master_types>
struct rresp_ace {
345 typename TYPES::template s2m_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> r_id{
"r_id"};
346 typename TYPES::template s2m_t<typename CFG::data_t> r_data{
"r_data"};
347 typename TYPES::template s2m_t<sc_dt::sc_uint<CFG::RESPWIDTH>> r_resp{
"r_resp"};
348 typename TYPES::template s2m_full_t<bool> r_last{
"r_last"};
349 typename TYPES::template s2m_t<bool> r_valid{
"r_valid"};
350 typename TYPES::template m2s_t<bool> r_ready{
"r_ready"};
351 typename TYPES::template s2m_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> r_user{
"r_user"};
352 typename TYPES::template s2m_opt_t<bool> r_trace{
"r_trace"};
353 typename TYPES::template m2s_t<bool> r_ack{
"r_ack"};
357 : r_id{concat(prefix,
"r_id").c_str()}
358 , r_data{concat(prefix,
"r_data").c_str()}
359 , r_resp{concat(prefix,
"r_resp").c_str()}
360 , r_last{concat(prefix,
"r_last").c_str()}
361 , r_valid{concat(prefix,
"r_valid").c_str()}
362 , r_ready{concat(prefix,
"r_ready").c_str()}
363 , r_user{concat(prefix,
"r_user").c_str()}
364 , r_trace{concat(prefix,
"r_trace").c_str()}
365 , r_ack{concat(prefix,
"r_ack").c_str()} {}
369 r_data.bind(o.r_data);
370 r_resp.bind(o.r_resp);
371 r_last.bind(o.r_last);
372 r_valid.bind(o.r_valid);
373 r_ready.bind(o.r_ready);
374 r_user.bind(o.r_user);
376 r_trace.bind(o.r_trace);
383 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> aw_addr{
"aw_addr"};
384 typename TYPES::template s2m_t<bool> aw_ready{
"aw_ready"};
385 typename TYPES::template m2s_t<bool> aw_valid{
"aw_valid"};
386 typename TYPES::template m2s_t<sc_dt::sc_uint<3>> aw_prot{
"aw_prot"};
390 : aw_addr{concat(prefix,
"aw_addr").c_str()}
391 , aw_ready{concat(prefix,
"aw_ready").c_str()}
392 , aw_valid{concat(prefix,
"aw_valid").c_str()}
393 , aw_prot{concat(prefix,
"aw_prot").c_str()} {}
396 aw_addr.bind(o.aw_addr);
397 aw_ready.bind(o.aw_ready);
398 aw_valid.bind(o.aw_valid);
399 aw_prot.bind(o.aw_prot);
405 typename TYPES::template m2s_t<typename CFG::data_t> w_data{
"w_data"};
406 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::BUSWIDTH / 8>> w_strb{
"w_strb"};
407 typename TYPES::template m2s_t<bool> w_valid{
"w_valid"};
408 typename TYPES::template s2m_t<bool> w_ready{
"w_ready"};
412 : w_data{concat(prefix,
"w_data").c_str()}
413 , w_strb{concat(prefix,
"w_strb").c_str()}
414 , w_valid{concat(prefix,
"w_valid").c_str()}
415 , w_ready{concat(prefix,
"w_ready").c_str()} {}
418 w_data.bind(o.w_data);
419 w_strb.bind(o.w_strb);
420 w_valid.bind(o.w_valid);
421 w_ready.bind(o.w_ready);
427 typename TYPES::template s2m_t<bool> b_valid{
"b_valid"};
428 typename TYPES::template m2s_t<bool> b_ready{
"b_ready"};
429 typename TYPES::template s2m_t<sc_dt::sc_uint<2>> b_resp{
"b_resp"};
433 : b_valid{concat(prefix,
"b_valid").c_str()}
434 , b_ready{concat(prefix,
"b_ready").c_str()}
435 , b_resp{concat(prefix,
"b_resp").c_str()} {}
438 b_valid.bind(o.b_valid);
439 b_ready.bind(o.b_ready);
440 b_resp.bind(o.b_resp);
446 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> ar_addr{
"ar_addr"};
447 typename TYPES::template m2s_t<sc_dt::sc_uint<3>> ar_prot{
"ar_prot"};
448 typename TYPES::template m2s_t<bool> ar_valid{
"ar_valid"};
449 typename TYPES::template s2m_t<bool> ar_ready{
"ar_ready"};
453 : ar_addr{concat(prefix,
"ar_addr").c_str()}
454 , ar_prot{concat(prefix,
"ar_prot").c_str()}
455 , ar_valid{concat(prefix,
"ar_valid").c_str()}
456 , ar_ready{concat(prefix,
"ar_ready").c_str()} {}
459 ar_addr.bind(o.ar_addr);
460 ar_prot.bind(o.ar_prot);
461 ar_valid.bind(o.ar_valid);
462 ar_ready.bind(o.ar_ready);
468 typename TYPES::template s2m_t<typename CFG::data_t> r_data{
"r_data"};
469 typename TYPES::template s2m_t<sc_dt::sc_uint<2>> r_resp{
"r_resp"};
470 typename TYPES::template s2m_t<bool> r_valid{
"r_valid"};
471 typename TYPES::template m2s_t<bool> r_ready{
"r_ready"};
475 : r_data{concat(prefix,
"r_data").c_str()}
476 , r_resp{concat(prefix,
"r_resp").c_str()}
477 , r_valid{concat(prefix,
"r_valid").c_str()}
478 , r_ready{concat(prefix,
"r_ready").c_str()} {}
481 r_data.bind(o.r_data);
482 r_resp.bind(o.r_resp);
483 r_valid.bind(o.r_valid);
484 r_ready.bind(o.r_ready);
488 template <
typename CFG,
typename TYPES = master_types>
struct ar_ace {
489 typename TYPES::template m2s_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> ar_id{
"ar_id"};
490 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> ar_addr{
"ar_addr"};
491 typename TYPES::template m2s_full_t<sc_dt::sc_uint<8>> ar_len{
"ar_len"};
492 typename TYPES::template m2s_full_t<sc_dt::sc_uint<3>> ar_size{
"ar_size"};
493 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> ar_burst{
"ar_burst"};
494 typename TYPES::template m2s_t<bool> ar_lock{
"ar_lock"};
495 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_cache{
"ar_cache"};
496 typename TYPES::template m2s_t<sc_dt::sc_uint<3>> ar_prot{
"ar_prot"};
497 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_qos{
"ar_qos"};
498 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_region{
"ar_region"};
499 typename TYPES::template m2s_t<bool> ar_valid{
"ar_valid"};
500 typename TYPES::template s2m_t<bool> ar_ready{
"ar_ready"};
501 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> ar_domain{
"ar_domain"};
502 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> ar_snoop{
"ar_snoop"};
503 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> ar_bar{
"ar_bar"};
504 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<CFG::USERWIDTH>> ar_user{
"ar_user"};
505 typename TYPES::template m2s_opt_t<bool> ar_trace{
"ar_trace"};
506 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<4>> ar_vmidext{
"ar_vmidext"};
509 ar_ace(
const char* prefix)
510 : ar_id{concat(prefix,
"ar_id").c_str()}
511 , ar_addr{concat(prefix,
"ar_addr").c_str()}
512 , ar_len{concat(prefix,
"ar_len").c_str()}
513 , ar_size{concat(prefix,
"ar_size").c_str()}
514 , ar_burst{concat(prefix,
"ar_burst").c_str()}
515 , ar_lock{concat(prefix,
"ar_lock").c_str()}
516 , ar_cache{concat(prefix,
"ar_cache").c_str()}
517 , ar_prot{concat(prefix,
"ar_prot").c_str()}
518 , ar_qos{concat(prefix,
"ar_qos").c_str()}
519 , ar_region{concat(prefix,
"ar_region").c_str()}
520 , ar_valid{concat(prefix,
"ar_valid").c_str()}
521 , ar_ready{concat(prefix,
"ar_ready").c_str()}
522 , ar_domain{concat(prefix,
"ar_domain").c_str()}
523 , ar_snoop{concat(prefix,
"ar_snoop").c_str()}
524 , ar_bar{concat(prefix,
"ar_bar").c_str()}
525 , ar_user{concat(prefix,
"ar_user").c_str()}
526 , ar_trace{concat(prefix,
"ar_trace").c_str()}
527 , ar_vmidext{concat(prefix,
"ar_vmidext").c_str()} {}
531 ar_addr.bind(o.ar_addr);
532 ar_len.bind(o.ar_len);
533 ar_size.bind(o.ar_size);
534 ar_burst.bind(o.ar_burst);
535 ar_lock.bind(o.ar_lock);
536 ar_cache.bind(o.ar_cache);
537 ar_prot.bind(o.ar_prot);
538 ar_qos.bind(o.ar_qos);
539 ar_region.bind(o.ar_region);
540 ar_valid.bind(o.ar_valid);
541 ar_ready.bind(o.ar_ready);
542 ar_domain.bind(o.ar_domain);
543 ar_snoop.bind(o.ar_snoop);
544 ar_bar.bind(o.ar_bar);
545 ar_user.bind(o.ar_user);
546 ar_trace.bind(o.ar_trace);
550 template <
typename CFG,
typename TYPES = master_types>
struct aw_ace {
551 typename TYPES::template m2s_full_t<sc_dt::sc_uint<CFG::IDWIDTH>> aw_id{
"aw_id"};
552 typename TYPES::template m2s_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> aw_addr{
"aw_addr"};
553 typename TYPES::template s2m_t<bool> aw_ready{
"aw_ready"};
554 typename TYPES::template m2s_t<bool> aw_lock{
"aw_lock"};
555 typename TYPES::template m2s_t<bool> aw_valid{
"aw_valid"};
556 typename TYPES::template m2s_t<sc_dt::sc_uint<3>> aw_prot{
"aw_prot"};
557 typename TYPES::template m2s_full_t<sc_dt::sc_uint<3>> aw_size{
"aw_size"};
558 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> aw_cache{
"aw_cache"};
559 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> aw_burst{
"aw_burst"};
560 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> aw_qos{
"aw_qos"};
561 typename TYPES::template m2s_full_t<sc_dt::sc_uint<4>> aw_region{
"aw_region"};
562 typename TYPES::template m2s_full_t<sc_dt::sc_uint<8>> aw_len{
"aw_len"};
563 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> aw_domain{
"aw_domain"};
564 typename TYPES::template m2s_full_t<sc_dt::sc_uint<CFG::AWSNOOPWIDTH>> aw_snoop{
"aw_snoop"};
565 typename TYPES::template m2s_full_t<sc_dt::sc_uint<2>> aw_bar{
"aw_bar"};
566 typename TYPES::template m2s_t<bool> aw_unique{
"aw_unique"};
567 typename TYPES::template m2s_full_t<sc_dt::sc_uint<CFG::USERWIDTH>> aw_user{
"aw_user"};
568 typename TYPES::template m2s_t<bool> aw_stashniden{
"aw_stashniden"};
569 typename TYPES::template m2s_full_t<sc_dt::sc_uint<11>> aw_stashnid{
"aw_stashnid"};
570 typename TYPES::template m2s_t<bool> aw_stashlpiden{
"aw_stashlpiden"};
571 typename TYPES::template m2s_full_t<sc_dt::sc_uint<5>> aw_stashlpid{
"aw_stashlpid"};
572 typename TYPES::template m2s_opt_t<sc_dt::sc_uint<6>> aw_atop{
"aw_atop"};
573 typename TYPES::template m2s_opt_t<bool> aw_trace{
"aw_trace"};
576 aw_ace(
const char* prefix)
577 : aw_id{concat(prefix,
"aw_id").c_str()}
578 , aw_addr{concat(prefix,
"aw_addr").c_str()}
579 , aw_ready{concat(prefix,
"aw_ready").c_str()}
580 , aw_lock{concat(prefix,
"aw_lock").c_str()}
581 , aw_valid{concat(prefix,
"aw_valid").c_str()}
582 , aw_prot{concat(prefix,
"aw_prot").c_str()}
583 , aw_size{concat(prefix,
"aw_size").c_str()}
584 , aw_cache{concat(prefix,
"aw_cache").c_str()}
585 , aw_burst{concat(prefix,
"aw_burst").c_str()}
586 , aw_qos{concat(prefix,
"aw_qos").c_str()}
587 , aw_region{concat(prefix,
"aw_region").c_str()}
588 , aw_len{concat(prefix,
"aw_len").c_str()}
589 , aw_domain{concat(prefix,
"aw_domain").c_str()}
590 , aw_snoop{concat(prefix,
"aw_snoop").c_str()}
591 , aw_bar{concat(prefix,
"aw_bar").c_str()}
592 , aw_unique{concat(prefix,
"aw_unique").c_str()}
593 , aw_user{concat(prefix,
"aw_user").c_str()}
594 , aw_stashniden{concat(prefix,
"aw_stashniden").c_str()}
595 , aw_stashnid{concat(prefix,
"aw_stashnid").c_str()}
596 , aw_stashlpiden{concat(prefix,
"aw_stashlpiden").c_str()}
597 , aw_stashlpid{concat(prefix,
"aw_stashlpid").c_str()}
598 , aw_atop{concat(prefix,
"aw_atop").c_str()}
599 , aw_trace{concat(prefix,
"aw_trace").c_str()} {}
603 aw_addr.bind(o.aw_addr);
604 aw_ready.bind(o.aw_ready);
605 aw_lock.bind(o.aw_lock);
606 aw_valid.bind(o.aw_valid);
607 aw_prot.bind(o.aw_prot);
608 aw_size.bind(o.aw_size);
609 aw_cache.bind(o.aw_cache);
610 aw_burst.bind(o.aw_burst);
611 aw_qos.bind(o.aw_qos);
612 aw_region.bind(o.aw_region);
613 aw_len.bind(o.aw_len);
614 aw_domain.bind(o.aw_domain);
615 aw_snoop.bind(o.aw_snoop);
616 aw_bar.bind(o.aw_bar);
617 aw_unique.bind(o.aw_unique);
618 aw_user.bind(o.aw_user);
619 aw_stashniden.bind(o.aw_stashniden);
620 aw_stashnid.bind(o.aw_stashnid);
621 aw_stashlpiden.bind(o.aw_stashlpiden);
622 aw_stashlpid.bind(o.aw_stashlpid);
623 aw_atop.bind(o.aw_atop);
624 aw_trace.bind(o.aw_trace);
629 template <
typename CFG,
typename TYPES = master_types>
struct ac_ace {
630 typename TYPES::template s2m_t<bool> ac_valid{
"ac_valid"};
631 typename TYPES::template m2s_t<bool> ac_ready{
"ac_ready"};
632 typename TYPES::template s2m_t<sc_dt::sc_uint<CFG::ADDRWIDTH>> ac_addr{
"ac_addr"};
633 typename TYPES::template s2m_full_t<sc_dt::sc_uint<4>> ac_snoop{
"ac_snoop"};
634 typename TYPES::template s2m_full_t<sc_dt::sc_uint<3>> ac_prot{
"ac_prot"};
635 typename TYPES::template s2m_opt_t<sc_dt::sc_uint<4>> ac_vmidext{
"ac_vmidext"};
636 typename TYPES::template s2m_opt_t<bool> ac_trace{
"ac_trace"};
639 ac_ace(
const char* prefix)
640 : ac_valid{concat(prefix,
"ac_valid").c_str()}
641 , ac_ready{concat(prefix,
"ac_ready").c_str()}
642 , ac_addr{concat(prefix,
"ac_addr").c_str()}
643 , ac_snoop{concat(prefix,
"ac_snoop").c_str()}
644 , ac_prot{concat(prefix,
"ac_prot").c_str()}
645 , ac_vmidext{concat(prefix,
"ac_vmidext").c_str()}
646 , ac_trace{concat(prefix,
"ac_trace").c_str()} {}
649 ac_valid.bind(o.ac_valid);
650 ac_ready.bind(o.ac_ready);
651 ac_addr.bind(o.ac_addr);
652 ac_snoop.bind(o.ac_snoop);
653 ac_prot.bind(o.ac_prot);
658 template <
typename CFG,
typename TYPES = master_types>
struct cd_ace {
659 typename TYPES::template m2s_t<bool> cd_valid{
"cd_valid"};
660 typename TYPES::template s2m_t<bool> cd_ready{
"cd_ready"};
661 typename TYPES::template m2s_t<typename CFG::data_t> cd_data{
"cd_data"};
662 typename TYPES::template m2s_full_t<bool> cd_last{
"cd_last"};
665 cd_ace(
const char* prefix)
666 : cd_valid{concat(prefix,
"cd_valid").c_str()}
667 , cd_ready{concat(prefix,
"cd_ready").c_str()}
668 , cd_data{concat(prefix,
"cd_data").c_str()}
669 , cd_last{concat(prefix,
"cd_last").c_str()} {}
672 cd_valid.bind(o.cd_valid);
673 cd_ready.bind(o.cd_ready);
674 cd_data.bind(o.cd_data);
675 cd_last.bind(o.cd_last);
680 template <
typename CFG,
typename TYPES = master_types>
struct cr_ace {
681 typename TYPES::template m2s_t<bool> cr_valid{
"cr_valid"};
682 typename TYPES::template s2m_t<bool> cr_ready{
"cr_ready"};
683 typename TYPES::template m2s_t<sc_dt::sc_uint<5>> cr_resp{
"cr_resp"};
684 typename TYPES::template m2s_opt_t<bool> cr_trace{
"cr_trace"};
687 cr_ace(
const char* prefix)
688 : cr_valid{concat(prefix,
"cr_valid").c_str()}
689 , cr_ready{concat(prefix,
"cr_ready").c_str()}
690 , cr_resp{concat(prefix,
"cr_resp").c_str()}
691 , cr_trace{concat(prefix,
"cr_trace").c_str()} {}
694 cr_valid.bind(o.cr_valid);
695 cr_ready.bind(o.cr_ready);
696 cr_resp.bind(o.cr_resp);
709 ar_addr.bind(o.ar_addr);
710 ar_prot.bind(o.ar_prot);
711 ar_valid.bind(o.ar_valid);
712 ar_ready.bind(o.ar_ready);
715 template <
typename CFG,
typename TYPES>
716 template <
typename OTYPES>
717 inline void rresp_axi<CFG, TYPES>::bind_r(rresp_axi_lite<CFG, OTYPES>& o) {
718 r_data.bind(o.r_data);
719 r_resp.bind(o.r_resp);
720 r_valid.bind(o.r_valid);
721 r_ready.bind(o.r_ready);
724 template <
typename CFG,
typename TYPES>
template <
typename OTYPES>
inline void aw_axi<CFG, TYPES>::bind_aw(aw_axi_lite<CFG, OTYPES>& o) {
725 aw_addr.bind(o.aw_addr);
726 aw_ready.bind(o.aw_ready);
727 aw_valid.bind(o.aw_valid);
728 aw_prot.bind(o.aw_prot);
731 template <
typename CFG,
typename TYPES>
732 template <
typename OTYPES>
733 inline void wdata_axi<CFG, TYPES>::bind_w(wdata_axi_lite<CFG, OTYPES>& o) {
734 w_data.bind(o.w_data);
735 w_strb.bind(o.w_strb);
736 w_valid.bind(o.w_valid);
737 w_ready.bind(o.w_ready);
740 template <
typename CFG,
typename TYPES>
template <
typename OTYPES>
inline void b_axi<CFG, TYPES>::bind_b(b_axi_lite<CFG, OTYPES>& o) {
741 b_valid.bind(o.b_valid);
742 b_ready.bind(o.b_ready);
743 b_resp.bind(o.b_resp);
TLM2.0 components modeling AHB.
snoop address(AC) channel signals
read address channel signals
Write address channel signals.
write response channel signals
snoop data(cd) channel signals
snoop response(cr) channel signals
Read data channel signals.
write data channel signals