@@ -312,60 +312,65 @@ BOOST_AUTO_TEST_CASE(full_lut_econd) {
312312 " The generated register LUT does not match the expected LUT" );
313313}
314314
315-
316315BOOST_AUTO_TEST_CASE (read_three_aligner_params) {
317316 pflib::Compiler c = pflib::Compiler::get (" econd" );
318-
317+
319318 std::map<int , std::map<int , uint8_t >> registers;
320-
319+
321320 // First, set all registers to zero to avoid warnings
322321 auto reg_lut = c.build_register_byte_lut ();
323322 for (const auto & [reg_addr, nbytes] : reg_lut) {
324323 for (size_t i = 0 ; i < nbytes; i++) {
325324 registers[0 ][reg_addr + i] = 0 ;
326325 }
327326 }
328-
327+
329328 // Now overwrite with our three parameters of interest
330- c.compile (" ALIGNER" , " GLOBAL_MATCH_PATTERN_VAL" , 10760600711006082389ULL , registers);
329+ c.compile (" ALIGNER" , " GLOBAL_MATCH_PATTERN_VAL" , 10760600711006082389ULL ,
330+ registers);
331331 c.compile (" ALIGNER" , " GLOBAL_IDLE_HDR_VAL" , 12 , registers);
332332 c.compile (" ALIGNER" , " GLOBAL_ORBSYN_CNT_LOAD_VAL" , 3514 , registers);
333-
333+
334334 // Decompile
335335 auto chip_params = c.decompile (registers, true , true );
336336 auto aligner_it = chip_params.find (" ALIGNER" );
337337 if (aligner_it != chip_params.end ()) {
338338 const auto & params = aligner_it->second ;
339-
339+
340340 auto check_param = [&](const std::string& param_name, uint64_t expected) {
341341 auto it = params.find (param_name);
342342 if (it != params.end ()) {
343343 bool match = (it->second == expected);
344344 std::cout << param_name << " :" << std::endl;
345- std::cout << " Found: " << std::dec << it->second
346- << " (0x" << std::hex << std::uppercase << it->second << " )" << std::endl;
347- std::cout << " Expected: " << std::dec << expected
348- << " (0x" << std::hex << std::uppercase << expected << " )" << std::endl;
349- std::cout << " Status: " << (match ? " PASS ✓" : " FAIL ✗" ) << std::endl << std::endl;
345+ std::cout << " Found: " << std::dec << it->second << " (0x"
346+ << std::hex << std::uppercase << it->second << " )"
347+ << std::endl;
348+ std::cout << " Expected: " << std::dec << expected << " (0x"
349+ << std::hex << std::uppercase << expected << " )" << std::endl;
350+ std::cout << " Status: " << (match ? " PASS ✓" : " FAIL ✗" )
351+ << std::endl
352+ << std::endl;
350353 BOOST_CHECK_EQUAL (it->second , expected);
351354 } else {
352355 std::cout << param_name << " :" << std::endl;
353356 std::cout << " Status: NOT FOUND ✗" << std::endl;
354- std::cout << " Expected: " << std::dec << expected
355- << " (0x" << std::hex << std::uppercase << expected << " )" << std::endl << std::endl;
357+ std::cout << " Expected: " << std::dec << expected << " (0x"
358+ << std::hex << std::uppercase << expected << " )" << std::endl
359+ << std::endl;
356360 BOOST_FAIL (" Parameter not found: " + param_name);
357361 }
358362 };
359-
363+
360364 check_param (" GLOBAL_MATCH_PATTERN_VAL" , 10760600711006082389ULL );
361365 check_param (" GLOBAL_IDLE_HDR_VAL" , 12 );
362366 check_param (" GLOBAL_ORBSYN_CNT_LOAD_VAL" , 3514 );
363367 } else {
364- std::cout << " ERROR: ALIGNER page not found in decompiled output!" << std::endl;
368+ std::cout << " ERROR: ALIGNER page not found in decompiled output!"
369+ << std::endl;
365370 BOOST_FAIL (" ALIGNER page not found" );
366371 }
367-
372+
368373 std::cout << " === End of Test ===" << std::endl;
369- } // end of BOOST_AUTO_TEST_CASE(read_three_aligner_params)
374+ } // end of BOOST_AUTO_TEST_CASE(read_three_aligner_params)
370375
371376BOOST_AUTO_TEST_SUITE_END ()
0 commit comments