@@ -36,7 +36,7 @@ TEST(auto_configure, simple) {
36
36
#define VERSIONIDSTRINGIFY (x ) #x
37
37
#define VERSIONIDTOSTR (x ) VERSIONIDSTRINGIFY(x)
38
38
#define DEVICE_FIELDS " 23"
39
- #define DEVICE_FIELDS_DEV_GLOBAL " 30 "
39
+ #define DEVICE_FIELDS_DEV_GLOBAL " 36 "
40
40
#define DEVICE_FIELDS_OLD " 18"
41
41
#define BOARDNAME " de4_gen2x4_swdimm"
42
42
#define BOARDNAME2 " pcie385_a7"
@@ -99,10 +99,11 @@ TEST(auto_configure, simple) {
99
99
100
100
// Device global autodiscovery entries
101
101
#define NUM_DEV_GLOBAL " 2"
102
- #define NUM_DEV_GLOBAL_FIELD " 3" // containing dev_globa_name, address, size
103
- #define DEV_GLOBAL_1 \
104
- " kernel15_dev_global 4096 2048" // in format of dev_globa_name, address, size
105
- #define DEV_GLOBAL_2 " kernel15_dev_global2 2048 1024"
102
+ #define NUM_DEV_GLOBAL_FIELD \
103
+ " 6" // contains dev_globa_name, address, size, host_access, init_mode,
104
+ // implement_in_csr with the above format
105
+ #define DEV_GLOBAL_1 " kernel15_dev_global 4096 2048 0 1 0"
106
+ #define DEV_GLOBAL_2 " kernel15_dev_global2 2048 1024 2 0 1"
106
107
107
108
int parsed;
108
109
std::string err_str;
@@ -283,8 +284,18 @@ TEST(auto_configure, simple) {
283
284
m_device_def.autodiscovery_def .device_global_mem_defs .end ());
284
285
CHECK_EQUAL (4096 , kernel15_dev_global->second .address );
285
286
CHECK_EQUAL (2048 , kernel15_dev_global->second .size );
287
+ CHECK_EQUAL (ACL_DEVICE_GLOBAL_HOST_ACCESS_NONE,
288
+ kernel15_dev_global->second .host_access );
289
+ CHECK_EQUAL (ACL_DEVICE_GLOBAL_INIT_MODE_RESET,
290
+ kernel15_dev_global->second .init_mode );
291
+ CHECK_EQUAL (false , kernel15_dev_global->second .implement_in_csr );
286
292
CHECK_EQUAL (2048 , kernel15_dev_global2->second .address );
287
293
CHECK_EQUAL (1024 , kernel15_dev_global2->second .size );
294
+ CHECK_EQUAL (ACL_DEVICE_GLOBAL_HOST_ACCESS_WRITE_ONLY,
295
+ kernel15_dev_global2->second .host_access );
296
+ CHECK_EQUAL (ACL_DEVICE_GLOBAL_INIT_MODE_REPROGRAM,
297
+ kernel15_dev_global2->second .init_mode );
298
+ CHECK_EQUAL (true , kernel15_dev_global2->second .implement_in_csr );
288
299
289
300
// Check a second parsing.
290
301
// It should allocate a new string for the name.
@@ -482,11 +493,13 @@ TEST(auto_configure, many_ok_forward_compatibility) {
482
493
// sections and subsections to check forward compatibility
483
494
484
495
std::string str (VERSIONIDTOSTR (
485
- ACL_AUTO_CONFIGURE_VERSIONID) " 29 "
496
+ ACL_AUTO_CONFIGURE_VERSIONID) " 49 "
486
497
" sample40byterandomhash000000000000000000 "
487
- " a10gx 0 1 15 DDR 2 1 6 0 2147483648 100 "
488
- " 100 100 100 200 200 200 200 0 0 0 0 2 "
489
- " 1 name1 name2 0 0 47 "
498
+ " a10gx 0 1 17 DDR 2 1 6 0 2147483648 100 "
499
+ " 100 100 100 0 - 0 200 200 200 200 0 0 0 "
500
+ " 2 9 ms_dev_global1 2048 1024 3 0 0 300 "
501
+ " 300 300 ms_dev_global2 4096 1024 1 1 1 "
502
+ " 300 300 300 0 0 400 400 47 "
490
503
" 40 external_sort_stage_0 0 128 1 0 0 1 0 "
491
504
" 1 0 1 10 0 0 4 1 0 0 0 500 500 500 0 0 "
492
505
" 0 0 1 1 1 3 1 1 1 3 1 0 0 800 800 800 "
@@ -677,10 +690,10 @@ TEST(auto_configure, many_ok_forward_compatibility) {
677
690
678
691
TEST (auto_configure, many_limit_check) {
679
692
std::string str (VERSIONIDTOSTR (
680
- ACL_AUTO_CONFIGURE_VERSIONID) " 15 "
693
+ ACL_AUTO_CONFIGURE_VERSIONID) " 19 "
681
694
" sample40byterandomhash000000000000000000 "
682
- " a10gx 0 1 7 DDR 2 1 2 0 2147483648 0 0 0 "
683
- " 0 75 "
695
+ " a10gx 0 1 9 DDR 2 1 2 0 2147483648 0 - 0 "
696
+ " 0 0 0 0 0 75 " // 75 kernels
684
697
" 31 external_sort_stage_0 0 128 1 0 0 1 0 "
685
698
" 1 0 1 6 0 0 4 1 0 0 0 0 0 0 1 1 1 3 1 1 1 "
686
699
" 3 1 "
@@ -1193,14 +1206,14 @@ TEST(auto_configure, kernel_arg_info) {
1193
1206
1194
1207
TEST (auto_configure, hostpipe) {
1195
1208
std::string str (VERSIONIDTOSTR (
1196
- ACL_AUTO_CONFIGURE_VERSIONID) " 46 "
1209
+ ACL_AUTO_CONFIGURE_VERSIONID) " 49 "
1197
1210
" sample40byterandomhash000000000000000000 "
1198
1211
" a10gx_hostpipe 0 1 15 DDR 2 1 6 0 "
1199
1212
" 2147483648 0 100 100 100 100 200 200 200 "
1200
1213
" 200 "
1201
1214
" 2 9 host_to_dev 1 0 32 32768 300 300 300 "
1202
1215
" 300 dev_to_host 0 1 32 32768 300 300 300 "
1203
- " 300 400 1 3 name3 400 0 "
1216
+ " 300 400 1 6 dev_global_3 1024 2048 0 0 0 "
1204
1217
" 1 29 foo 0 128 1 0 0 1 0 1 0 0 0 0 0 0 1 "
1205
1218
" 1 1 3 1 1 1 3 1 0 0 800 800 800 900 "
1206
1219
" 900"
@@ -1230,10 +1243,10 @@ TEST(auto_configure, hostpipe) {
1230
1243
1231
1244
TEST (auto_configure, streaming) {
1232
1245
const std::string config_str{
1233
- " 23 26 " RANDOM_HASH
1246
+ " 23 29 " RANDOM_HASH
1234
1247
" pac_a10 0 1 13 DDR 2 2 24 1 2 0 4294967296 4294967296 8589934592 0 - 0 "
1235
- " 0 0 0 1 3 device_global_name 256 128 1 105 _ZTS3CRCILi0EE 0 256 1 0 0 1 "
1236
- " 0 1 0 9 8 0 0 8 1 0 0 1 k0_ZTS3CRCILi0EE_arg0 8 2 1 8 1024 0 3 1 "
1248
+ " 0 0 0 1 6 device_global_name 256 128 0 0 0 1 105 _ZTS3CRCILi0EE 0 256 1 "
1249
+ " 0 0 1 0 1 0 9 8 0 0 8 1 0 0 1 k0_ZTS3CRCILi0EE_arg0 8 2 1 8 1024 0 3 1 "
1237
1250
" k0_ZTS3CRCILi0EE_arg1 8 0 0 8 1 0 0 1 k0_ZTS3CRCILi0EE_arg2 7 0 0 8 1 0 "
1238
1251
" 0 0 7 0 0 8 1 0 0 0 7 2 1 8 1024 0 2 0 7 0 0 8 1 0 0 0 7 0 0 8 1 0 0 0 "
1239
1252
" 7 0 0 8 1 0 0 0 0 0 1 2 64 4096 1 1 1 3 1 1 1 3 1 0 1 "
0 commit comments