@@ -13,6 +13,7 @@ typedef logic [BUS_CONFIG.address_width-1:0] pzcorebus_addrss
13
13
typedef logic [get_length_width(BUS_CONFIG , 1 )- 1 : 0 ] pzcorebus_length ; \
14
14
typedef logic [get_unpacked_length_width(BUS_CONFIG )- 1 : 0 ] pzcorebus_unpacked_length ; \
15
15
typedef logic [get_burst_length_width(BUS_CONFIG )- 1 : 0 ] pzcorebus_burst_length ; \
16
+ typedef logic [get_request_param_width(BUS_CONFIG , 1 )- 1 : 0 ] pzcorebus_request_param ; \
16
17
typedef logic [get_request_info_width(BUS_CONFIG , 1 )- 1 : 0 ] pzcorebus_request_info ; \
17
18
typedef logic [get_response_info_width(BUS_CONFIG , 1 )- 1 : 0 ] pzcorebus_response_info ; \
18
19
typedef logic [BUS_CONFIG .data_width- 1 : 0 ] pzcorebus_data ; \
@@ -34,6 +35,7 @@ pzcorebus_command_type mcmd; \
34
35
pzcorebus_id mid; \
35
36
pzcorebus_addrss maddr; \
36
37
pzcorebus_length mlength; \
38
+ pzcorebus_request_param mparam; \
37
39
pzcorebus_request_info minfo; \
38
40
logic sdata_accept; \
39
41
logic mdata_valid; \
@@ -69,6 +71,9 @@ function automatic pzcorebus_packed_command get_packed_command(); \
69
71
if (COMMAND_POSITION_LIST .mlength.width > 0 ) begin \
70
72
`pzcorebus_if_get_packer (packer, COMMAND_POSITION_LIST .mlength) = mlength; \
71
73
end \
74
+ if (COMMAND_POSITION_LIST .mparam.width > 0 ) begin \
75
+ `pzcorebus_if_get_packer (packer, COMMAND_POSITION_LIST .mparam) = mparam; \
76
+ end \
72
77
if (COMMAND_POSITION_LIST .minfo.width > 0 ) begin \
73
78
`pzcorebus_if_get_packer (packer, COMMAND_POSITION_LIST .minfo) = minfo; \
74
79
end \
@@ -93,7 +98,13 @@ function automatic void put_packed_command(pzcorebus_packed_command command); \
93
98
else begin \
94
99
mlength = '0 ; \
95
100
end \
96
- if (BUS_CONFIG .request_info_width > 0 ) begin \
101
+ if (COMMAND_POSITION_LIST .mparam.width > 0 ) begin \
102
+ mparam = `pzcorebus_if_get_packer (packer, COMMAND_POSITION_LIST .mparam); \
103
+ end \
104
+ else begin \
105
+ mparam = '0 ; \
106
+ end \
107
+ if (COMMAND_POSITION_LIST .minfo.width > 0 ) begin \
97
108
minfo = `pzcorebus_if_get_packer (packer, COMMAND_POSITION_LIST .minfo); \
98
109
end \
99
110
else begin \
@@ -121,7 +132,13 @@ function automatic pzcorebus_command get_command(); \
121
132
else begin \
122
133
command.length = '0 ; \
123
134
end \
124
- if (BUS_CONFIG .request_info_width > 0 ) begin \
135
+ if (COMMAND_POSITION_LIST .mparam.width > 0 ) begin \
136
+ command.param = mparam; \
137
+ end \
138
+ else begin \
139
+ command.param = '0 ; \
140
+ end \
141
+ if (COMMAND_POSITION_LIST .minfo.width > 0 ) begin \
125
142
command.info = minfo; \
126
143
end \
127
144
else begin \
@@ -152,7 +169,13 @@ function automatic void put_command(pzcorebus_command command); \
152
169
else begin \
153
170
mlength = '0 ; \
154
171
end \
155
- if (BUS_CONFIG .request_info_width > 0 ) begin \
172
+ if (COMMAND_POSITION_LIST .mparam.width > 0 ) begin \
173
+ mparam = command.param; \
174
+ end \
175
+ else begin \
176
+ mparam = '0 ; \
177
+ end \
178
+ if (COMMAND_POSITION_LIST .minfo.width > 0 ) begin \
156
179
minfo = command.info; \
157
180
end \
158
181
else begin \
@@ -392,25 +415,18 @@ endfunction \
392
415
localparam int DATA_SIZE = BUS_CONFIG .data_width / BUS_CONFIG .unit_data_width; \
393
416
localparam int LENGTH_OFFSET_LSB = $clog2 (BUS_CONFIG .unit_data_width / 8 ); \
394
417
localparam int LENGTH_OFFSET_WIDTH = (DATA_SIZE > 1 ) ? $clog2 (DATA_SIZE ) : 1 ; \
395
- localparam int BURST_OFFSET = DATA_SIZE - 1 ; \
396
- localparam int BURST_SHIFT = $clog2 (DATA_SIZE ); \
397
418
\
398
419
function automatic pzcorebus_unpacked_length get_length (); \
399
420
case (1'b1 ) \
400
421
`pzcorebus_csr_profile (BUS_CONFIG ): return pzcorebus_unpacked_length ' (1 ); \
401
- is_atomic_command (): return pzcorebus_unpacked_length ' (DATA_SIZE ); \
402
422
is_message_command (): return pzcorebus_unpacked_length ' (0 ); \
403
423
default : return unpack_length (); \
404
424
endcase \
405
425
endfunction \
406
426
\
407
427
function automatic pzcorebus_unpacked_length get_aligned_length (); \
408
428
pzcorebus_unpacked_length offset; \
409
- logic no_offset; \
410
- no_offset = \
411
- (! `pzcorebus_memoy_h_profile (BUS_CONFIG )) || (DATA_SIZE == 1 ) || \
412
- is_atomic_command () || is_message_command (); \
413
- if (no_offset) begin \
429
+ if ((DATA_SIZE == 1 ) || is_atomic_command () || is_message_command ()) begin \
414
430
offset = pzcorebus_unpacked_length ' (0 ); \
415
431
end \
416
432
else begin \
@@ -420,20 +436,21 @@ function automatic pzcorebus_unpacked_length get_aligned_length(); \
420
436
endfunction \
421
437
\
422
438
function automatic pzcorebus_burst_length get_burst_length (); \
423
- if (`pzcorebus_memoy_h_profile (BUS_CONFIG )) begin \
424
- pzcorebus_unpacked_length length; \
425
- length = get_aligned_length () + pzcorebus_unpacked_length ' (BURST_OFFSET ); \
426
- return pzcorebus_burst_length ' (length >> BURST_SHIFT ); \
439
+ if ((DATA_SIZE == 1 ) || `pzcorebus_csr_profile (BUS_CONFIG )) begin \
440
+ return pzcorebus_burst_length ' (get_length ()); \
427
441
end \
428
442
else begin \
429
- return pzcorebus_burst_length ' (get_length ()); \
443
+ pzcorebus_unpacked_length length; \
444
+ length = get_aligned_length () + pzcorebus_unpacked_length ' (DATA_SIZE - 1 ); \
445
+ return pzcorebus_burst_length ' (length / DATA_SIZE ); \
430
446
end \
431
447
endfunction \
432
448
\
433
449
function automatic pzcorebus_unpacked_length get_response_length (); \
434
450
case (1'b1 ) \
435
451
is_posted_command (): return pzcorebus_unpacked_length ' (0 ); \
436
- is_read_command (): return unpack_length (); \
452
+ is_read_command (), \
453
+ is_atomic_command (): return unpack_length (); \
437
454
default : return pzcorebus_unpacked_length ' (DATA_SIZE ); \
438
455
endcase \
439
456
endfunction
@@ -448,7 +465,7 @@ function automatic pzcorebus_packed_response get_packed_response(); \
448
465
`pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .sid) = sid; \
449
466
`pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .serror) = serror; \
450
467
`pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .sdata) = sdata; \
451
- if (BUS_CONFIG .response_info_width > 0 ) begin \
468
+ if (RESPONSE_POSITION_LIST .sinfo.width > 0 ) begin \
452
469
`pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .sinfo) = sinfo; \
453
470
end \
454
471
if (`pzcorebus_memoy_h_profile (BUS_CONFIG )) begin \
@@ -467,7 +484,7 @@ function automatic void put_packed_response(pzcorebus_packed_response response);
467
484
sid = `pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .sid); \
468
485
serror = `pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .serror); \
469
486
sdata = `pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .sdata); \
470
- if (BUS_CONFIG .response_info_width > 0 ) begin \
487
+ if (RESPONSE_POSITION_LIST .sinfo.width > 0 ) begin \
471
488
sinfo = `pzcorebus_if_get_packer (packer, RESPONSE_POSITION_LIST .sinfo); \
472
489
end \
473
490
else begin \
@@ -493,7 +510,7 @@ function automatic pzcorebus_response get_response(); \
493
510
response.id = sid; \
494
511
response.error = serror; \
495
512
response.data = sdata; \
496
- response.info = (BUS_CONFIG .response_info_width > 0 ) ? sinfo : '0 ; \
513
+ response.info = (RESPONSE_POSITION_LIST .sinfo.width > 0 ) ? sinfo : '0 ; \
497
514
response.unit_enable = (`pzcorebus_memoy_h_profile (BUS_CONFIG )) ? sresp_uniten : '0 ; \
498
515
response.last = (`pzcorebus_memoy_profile (BUS_CONFIG ) ) ? sresp_last : '0 ; \
499
516
return response; \
@@ -504,7 +521,7 @@ function automatic void put_response(pzcorebus_response response); \
504
521
sid = response.id; \
505
522
serror = response.error; \
506
523
sdata = response.data; \
507
- if (BUS_CONFIG .response_info_width > 0 ) begin \
524
+ if (RESPONSE_POSITION_LIST .sinfo.width > 0 ) begin \
508
525
sinfo = response.info; \
509
526
end \
510
527
else begin \
@@ -552,6 +569,7 @@ modport request_master ( \
552
569
output mid, \
553
570
output maddr, \
554
571
output mlength, \
572
+ output mparam, \
555
573
output minfo, \
556
574
input sdata_accept, \
557
575
output mdata_valid, \
@@ -604,6 +622,7 @@ modport command_master ( \
604
622
output mcmd, \
605
623
output mid, \
606
624
output maddr, \
625
+ output mparam, \
607
626
output mlength, \
608
627
output minfo, \
609
628
import put_packed_command, \
@@ -659,6 +678,7 @@ modport request_slave ( \
659
678
input mid, \
660
679
input maddr, \
661
680
input mlength, \
681
+ input mparam, \
662
682
input minfo, \
663
683
output sdata_accept, \
664
684
input mdata_valid, \
@@ -712,6 +732,7 @@ modport command_slave ( \
712
732
input mid, \
713
733
input maddr, \
714
734
input mlength, \
735
+ input mparam, \
715
736
input minfo, \
716
737
import get_packed_command, \
717
738
import get_command, \
@@ -766,6 +787,7 @@ modport request_monitor ( \
766
787
input mid, \
767
788
input maddr, \
768
789
input mlength, \
790
+ input mparam, \
769
791
input minfo, \
770
792
input sdata_accept, \
771
793
input mdata_valid, \
0 commit comments