@@ -36,7 +36,7 @@ TEST(auto_configure, simple) {
3636#define VERSIONIDSTRINGIFY (x ) #x
3737#define VERSIONIDTOSTR (x ) VERSIONIDSTRINGIFY (x)
3838#define DEVICE_FIELDS " 23"
39- #define DEVICE_FIELDS_DEV_GLOBAL " 30 "
39+ #define DEVICE_FIELDS_DEV_GLOBAL " 36 "
4040#define DEVICE_FIELDS_OLD " 18"
4141#define BOARDNAME " de4_gen2x4_swdimm"
4242#define BOARDNAME2 " pcie385_a7"
@@ -99,10 +99,11 @@ TEST(auto_configure, simple) {
9999
100100// Device global autodiscovery entries
101101#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"
106107
107108 int parsed;
108109 std::string err_str;
@@ -283,8 +284,18 @@ TEST(auto_configure, simple) {
283284 m_device_def.autodiscovery_def .device_global_mem_defs .end ());
284285 CHECK_EQUAL (4096 , kernel15_dev_global->second .address );
285286 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 );
286292 CHECK_EQUAL (2048 , kernel15_dev_global2->second .address );
287293 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 );
288299
289300 // Check a second parsing.
290301 // It should allocate a new string for the name.
@@ -482,11 +493,13 @@ TEST(auto_configure, many_ok_forward_compatibility) {
482493 // sections and subsections to check forward compatibility
483494
484495 std::string str (VERSIONIDTOSTR (
485- ACL_AUTO_CONFIGURE_VERSIONID ) " 29 "
496+ ACL_AUTO_CONFIGURE_VERSIONID ) " 49 "
486497 " 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 "
490503 " 40 external_sort_stage_0 0 128 1 0 0 1 0 "
491504 " 1 0 1 10 0 0 4 1 0 0 0 500 500 500 0 0 "
492505 " 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) {
677690
678691TEST (auto_configure, many_limit_check) {
679692 std::string str (VERSIONIDTOSTR (
680- ACL_AUTO_CONFIGURE_VERSIONID ) " 15 "
693+ ACL_AUTO_CONFIGURE_VERSIONID ) " 19 "
681694 " 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
684697 " 31 external_sort_stage_0 0 128 1 0 0 1 0 "
685698 " 1 0 1 6 0 0 4 1 0 0 0 0 0 0 1 1 1 3 1 1 1 "
686699 " 3 1 "
@@ -1193,14 +1206,14 @@ TEST(auto_configure, kernel_arg_info) {
11931206
11941207TEST (auto_configure, hostpipe) {
11951208 std::string str (VERSIONIDTOSTR (
1196- ACL_AUTO_CONFIGURE_VERSIONID ) " 46 "
1209+ ACL_AUTO_CONFIGURE_VERSIONID ) " 49 "
11971210 " sample40byterandomhash000000000000000000 "
11981211 " a10gx_hostpipe 0 1 15 DDR 2 1 6 0 "
11991212 " 2147483648 0 100 100 100 100 200 200 200 "
12001213 " 200 "
12011214 " 2 9 host_to_dev 1 0 32 32768 300 300 300 "
12021215 " 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 "
12041217 " 1 29 foo 0 128 1 0 0 1 0 1 0 0 0 0 0 0 1 "
12051218 " 1 1 3 1 1 1 3 1 0 0 800 800 800 900 "
12061219 " 900"
@@ -1230,10 +1243,10 @@ TEST(auto_configure, hostpipe) {
12301243
12311244TEST (auto_configure, streaming) {
12321245 const std::string config_str{
1233- " 23 26 " RANDOM_HASH
1246+ " 23 29 " RANDOM_HASH
12341247 " 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 "
12371250 " k0_ZTS3CRCILi0EE_arg1 8 0 0 8 1 0 0 1 k0_ZTS3CRCILi0EE_arg2 7 0 0 8 1 0 "
12381251 " 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 "
12391252 " 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