Skip to content

Commit 178d2c8

Browse files
committed
recover to original files and fix the errno bug
1 parent 237dd87 commit 178d2c8

File tree

3 files changed

+114
-63
lines changed

3 files changed

+114
-63
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
include:
29+
- {test: "vtr_reg_nightly_test1", cores: "8", options: "", cmake: "" }
30+
- {test: "vtr_reg_nightly_test2", cores: "16", options: "", cmake: "" }
31+
- {test: "vtr_reg_nightly_test3", cores: "16", options: "", cmake: "" }
32+
- {test: "vtr_reg_nightly_test4", cores: "16", options: "", cmake: "" }
33+
- {test: "vtr_reg_nightly_test5", cores: "16", options: "", cmake: "" }
34+
- {test: "vtr_reg_strong", cores: "16", options: "", cmake: "-DVTR_ASSERT_LEVEL=3" }
2935
- {test: "vtr_reg_strong", cores: "16", options: "-skip_qor", cmake: "-DVTR_ASSERT_LEVEL=3 -DVTR_ENABLE_SANITIZE=ON"}
36+
- {test: "vtr_reg_yosys", cores: "16", options: "", cmake: "-DWITH_YOSYS=ON -DYOSYS_SV_UHDM_PLUGIN=ON" }
37+
- {test: "vtr_reg_yosys_odin", cores: "16", options: "", cmake: "-DODIN_USE_YOSYS=ON -DYOSYS_SV_UHDM_PLUGIN=ON"}
38+
- {test: "odin_tech_strong", cores: "16", options: "", cmake: "-DODIN_USE_YOSYS=ON" }
39+
- {test: "odin_reg_strong", cores: "16", options: "", cmake: "" }
3040

3141
env:
3242
DEBIAN_FRONTEND: "noninteractive"

vpr/src/base/gen/vpr_constraints_uxsdcxx.h

Lines changed: 20 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ enum class atok_t_vpr_constraints { TOOL_NAME };
148148
constexpr const char* atok_lookup_t_vpr_constraints[] = {"tool_name"};
149149

150150
/* Internal lexers. These convert the PugiXML node names to input tokens. */
151-
inline atok_t_add_atom lex_attr_t_add_atom(const char* in, const std::function<void(const char*)>* report_error) {std::printf("lex_attr_t_add_atom 151 errno: %d\n", errno);
152-
unsigned int len = strlen(in);std::printf("lex_attr_t_add_atom 152 errno: %d\n", errno);
151+
inline atok_t_add_atom lex_attr_t_add_atom(const char* in, const std::function<void(const char*)>* report_error) {
152+
unsigned int len = strlen(in);
153153
switch (len) {
154154
case 12:
155155
switch (*((triehash_uu64*)&in[0])) {
156-
case onechar('n', 0, 64) | onechar('a', 8, 64) | onechar('m', 16, 64) | onechar('e', 24, 64) | onechar('_', 32, 64) | onechar('p', 40, 64) | onechar('a', 48, 64) | onechar('t', 56, 64):std::printf("lex_attr_t_add_atom 156 errno: %d\n", errno);
157-
switch (*((triehash_uu32*)&in[8])) {std::printf("lex_attr_t_add_atom 157 errno: %d\n", errno);
158-
case onechar('t', 0, 32) | onechar('e', 8, 32) | onechar('r', 16, 32) | onechar('n', 24, 32):std::printf("lex_attr_t_add_atom 158 errno: %d\n", errno);
156+
case onechar('n', 0, 64) | onechar('a', 8, 64) | onechar('m', 16, 64) | onechar('e', 24, 64) | onechar('_', 32, 64) | onechar('p', 40, 64) | onechar('a', 48, 64) | onechar('t', 56, 64):
157+
switch (*((triehash_uu32*)&in[8])) {
158+
case onechar('t', 0, 32) | onechar('e', 8, 32) | onechar('r', 16, 32) | onechar('n', 24, 32):
159159
return atok_t_add_atom::NAME_PATTERN;
160160
break;
161161
default:
@@ -168,8 +168,8 @@ inline atok_t_add_atom lex_attr_t_add_atom(const char* in, const std::function<v
168168
break;
169169
default:
170170
break;
171-
}std::printf("lex_attr_t_add_atom 171 errno: %d\n", errno);
172-
noreturn_report(report_error, ("Found unrecognized attribute " + std::string(in) + " of <add_atom>.").c_str());std::printf("lex_attr_t_add_atom 172 errno: %d\n", errno);
171+
}
172+
noreturn_report(report_error, ("Found unrecognized attribute " + std::string(in) + " of <add_atom>.").c_str());
173173
}
174174

175175
inline atok_t_add_region lex_attr_t_add_region(const char* in, const std::function<void(const char*)>* report_error) {
@@ -427,17 +427,13 @@ template<std::size_t N>
427427
/* Internal loading functions, which validate and load a PugiXML DOM tree into memory. */
428428
inline int load_int(const char* in, const std::function<void(const char*)>* report_error) {
429429
int out;
430-
std::printf("before reading int errno:%d\n", errno);
431430
errno = 0;
432431
out = std::strtol(in, NULL, 10);
433-
if (errno != 0) {
434-
std::printf("after reading int errno:%d\n", errno);
432+
if (errno != 0)
435433
noreturn_report(report_error, ("Invalid value `" + std::string(in) + "` when loading into a int.").c_str());
436-
}
437434
return out;
438435
}
439436
inline void load_add_region_required_attributes(const pugi::xml_node& root, int* x_high, int* x_low, int* y_high, int* y_low, const std::function<void(const char*)>* report_error) {
440-
std::printf("load_add_region_required_attributes errno: %d\n", errno);
441437
std::bitset<5> astate = 0;
442438
for (pugi::xml_attribute attr = root.first_attribute(); attr; attr = attr.next_attribute()) {
443439
atok_t_add_region in = lex_attr_t_add_region(attr.name(), report_error);
@@ -473,23 +469,23 @@ inline void load_add_atom(const pugi::xml_node& root, T& out, Context& context,
473469
(void)root;
474470
(void)out;
475471
(void)context;
476-
(void)report_error;std::printf("load_add_atom 475 errno: %d\n", errno);
472+
(void)report_error;
477473
// Update current file offset in case an error is encountered.
478-
*offset_debug = root.offset_debug();std::printf("load_add_atom 477 errno: %d\n", errno);
474+
*offset_debug = root.offset_debug();
479475

480-
for (pugi::xml_attribute attr = root.first_attribute(); attr; attr = attr.next_attribute()) {std::printf("load_add_atom 479 errno: %d\n", errno);
481-
atok_t_add_atom in = lex_attr_t_add_atom(attr.name(), report_error);std::printf("load_add_atom 480 errno: %d\n", errno);
476+
for (pugi::xml_attribute attr = root.first_attribute(); attr; attr = attr.next_attribute()) {
477+
atok_t_add_atom in = lex_attr_t_add_atom(attr.name(), report_error);
482478
switch (in) {
483-
case atok_t_add_atom::NAME_PATTERN:std::printf("load_add_atom 482 errno: %d\n", errno);
484-
out.set_add_atom_name_pattern(attr.value(), context);std::printf("load_add_atom 483 errno: %d\n", errno);
479+
case atok_t_add_atom::NAME_PATTERN:
480+
out.set_add_atom_name_pattern(attr.value(), context);
485481
break;
486482
default:
487483
break; /* Not possible. */
488484
}
489485
}
490486

491-
if (root.first_child().type() == pugi::node_element) {std::printf("load_add_atom 490 errno: %d\n", errno);
492-
noreturn_report(report_error, "Unexpected child element in <add_atom>.");std::printf("load_add_atom 491 errno: %d\n", errno);}
487+
if (root.first_child().type() == pugi::node_element)
488+
noreturn_report(report_error, "Unexpected child element in <add_atom>.");
493489
}
494490

495491
template<class T, typename Context>
@@ -505,7 +501,6 @@ inline void load_add_region(const pugi::xml_node& root, T& out, Context& context
505501
atok_t_add_region in = lex_attr_t_add_region(attr.name(), report_error);
506502
switch (in) {
507503
case atok_t_add_region::SUBTILE:
508-
std::printf("out.set_add_region_subtile errno: %d\n", errno);
509504
out.set_add_region_subtile(load_int(attr.value(), report_error), context);
510505
break;
511506
case atok_t_add_region::X_HIGH:
@@ -537,46 +532,35 @@ constexpr int gstate_t_partition[NUM_T_PARTITION_STATES][NUM_T_PARTITION_INPUTS]
537532
};
538533
template<class T, typename Context>
539534
inline void load_partition(const pugi::xml_node& root, T& out, Context& context, const std::function<void(const char*)>* report_error, ptrdiff_t* offset_debug) {
540-
std::printf("load_partition errno: %d\n", errno);
541535
(void)root;
542536
(void)out;
543537
(void)context;
544538
(void)report_error;
545539
// Update current file offset in case an error is encountered.
546540
*offset_debug = root.offset_debug();
547-
std::printf("load_partition 546 errno: %d\n", errno);
541+
548542
for (pugi::xml_attribute attr = root.first_attribute(); attr; attr = attr.next_attribute()) {
549-
std::printf("load_partition 548 errno: %d\n", errno);
550543
atok_t_partition in = lex_attr_t_partition(attr.name(), report_error);
551-
std::printf("load_partition 550 errno: %d\n", errno);
552544
switch (in) {
553545
case atok_t_partition::NAME:
554546
out.set_partition_name(attr.value(), context);
555-
std::printf("load_partition 554 errno: %d\n", errno);
556547
break;
557548
default:
558549
break; /* Not possible. */
559550
}
560551
}
561-
std::printf("load_partition 560 errno: %d\n", errno);
562552

563553
// Preallocate arrays by counting child nodes (if any)
564554
size_t add_atom_count = 0;
565555
size_t add_region_count = 0;
566556
{
567557
int next, state = 1;
568558
for (pugi::xml_node node = root.first_child(); node; node = node.next_sibling()) {
569-
std::printf("load_partition 568 errno: %d\n", errno);
570559
*offset_debug = node.offset_debug();
571-
std::printf("load_partition 570 errno: %d\n", errno);
572560
gtok_t_partition in = lex_node_t_partition(node.name(), report_error);
573-
std::printf("load_partition 572 errno: %d\n", errno);
574561
next = gstate_t_partition[state][(int)in];
575-
std::printf("load_partition 574 errno: %d\n", errno);
576-
if (next == -1) {
562+
if (next == -1)
577563
dfa_error(gtok_lookup_t_partition[(int)in], gstate_t_partition[state], gtok_lookup_t_partition, 2, report_error);
578-
std::printf("load_partition 577 errno: %d\n", errno);
579-
}
580564
state = next;
581565
switch (in) {
582566
case gtok_t_partition::ADD_ATOM:
@@ -589,68 +573,43 @@ inline void load_partition(const pugi::xml_node& root, T& out, Context& context,
589573
break; /* Not possible. */
590574
}
591575
}
592-
std::printf("load_partition 591 errno: %d\n", errno);
593576

594577
out.preallocate_partition_add_atom(context, add_atom_count);
595-
std::printf("load_partition 594 errno: %d\n", errno);
596578
out.preallocate_partition_add_region(context, add_region_count);
597-
std::printf("load_partition 596 errno: %d\n", errno);
598579
}
599580
int next, state = 1;
600581
for (pugi::xml_node node = root.first_child(); node; node = node.next_sibling()) {
601-
std::printf("load_partition 600 errno: %d\n", errno);
602582
*offset_debug = node.offset_debug();
603-
std::printf("load_partition 602 errno: %d\n", errno);
604583
gtok_t_partition in = lex_node_t_partition(node.name(), report_error);
605-
std::printf("load_partition 604 errno: %d\n", errno);
606584
next = gstate_t_partition[state][(int)in];
607-
if (next == -1) {
585+
if (next == -1)
608586
dfa_error(gtok_lookup_t_partition[(int)in], gstate_t_partition[state], gtok_lookup_t_partition, 2, report_error);
609-
std::printf("load_partition 608 errno: %d\n", errno);
610-
}
611587
state = next;
612588
switch (in) {
613589
case gtok_t_partition::ADD_ATOM: {
614-
std::printf("load_partition 613 errno: %d\n", errno);
615590
auto child_context = out.add_partition_add_atom(context);
616-
std::printf("load_partition 615 errno: %d\n", errno);
617591
load_add_atom(node, out, child_context, report_error, offset_debug);
618-
std::printf("load_partition 617 errno: %d\n", errno);
619592
out.finish_partition_add_atom(child_context);
620-
std::printf("load_partition 619 errno: %d\n", errno);
621593
} break;
622594
case gtok_t_partition::ADD_REGION: {
623595
int add_region_x_high;
624-
std::printf("load_partition 623 errno: %d\n", errno);
625596
memset(&add_region_x_high, 0, sizeof(add_region_x_high));
626-
std::printf("load_partition 625 errno: %d\n", errno);
627597
int add_region_x_low;
628598
memset(&add_region_x_low, 0, sizeof(add_region_x_low));
629-
std::printf("load_partition 628 errno: %d\n", errno);
630599
int add_region_y_high;
631600
memset(&add_region_y_high, 0, sizeof(add_region_y_high));
632-
std::printf("load_partition 631 errno: %d\n", errno);
633601
int add_region_y_low;
634602
memset(&add_region_y_low, 0, sizeof(add_region_y_low));
635-
std::printf("load_partition 634 errno: %d\n", errno);
636603
load_add_region_required_attributes(node, &add_region_x_high, &add_region_x_low, &add_region_y_high, &add_region_y_low, report_error);
637-
std::printf("load_partition 636 errno: %d\n", errno);
638604
auto child_context = out.add_partition_add_region(context, add_region_x_high, add_region_x_low, add_region_y_high, add_region_y_low);
639-
std::printf("load_partition 638 errno: %d\n", errno);
640605
load_add_region(node, out, child_context, report_error, offset_debug);
641-
std::printf("load_partition 640 errno: %d\n", errno);
642606
out.finish_partition_add_region(child_context);
643-
std::printf("load_partition 642 errno: %d\n", errno);
644607
} break;
645608
default:
646609
break; /* Not possible. */
647610
}
648611
}
649-
std::printf("load_partition 648 errno: %d\n", errno);
650-
if (state != 0) {
651-
dfa_error("end of input", gstate_t_partition[state], gtok_lookup_t_partition, 2, report_error);
652-
std::printf("load_partition 651 errno: %d\n", errno);
653-
}
612+
if (state != 0) dfa_error("end of input", gstate_t_partition[state], gtok_lookup_t_partition, 2, report_error);
654613
}
655614

656615
constexpr int NUM_T_PARTITION_LIST_STATES = 2;
@@ -661,7 +620,6 @@ constexpr int gstate_t_partition_list[NUM_T_PARTITION_LIST_STATES][NUM_T_PARTITI
661620
};
662621
template<class T, typename Context>
663622
inline void load_partition_list(const pugi::xml_node& root, T& out, Context& context, const std::function<void(const char*)>* report_error, ptrdiff_t* offset_debug) {
664-
std::printf("load_partition_list errno: %d\n", errno);
665623
(void)root;
666624
(void)out;
667625
(void)context;
@@ -717,7 +675,6 @@ inline void load_partition_list(const pugi::xml_node& root, T& out, Context& con
717675

718676
template<class T, typename Context>
719677
inline void load_vpr_constraints(const pugi::xml_node& root, T& out, Context& context, const std::function<void(const char*)>* report_error, ptrdiff_t* offset_debug) {
720-
std::printf("load_vpr_constraints errno: %d\n", errno);
721678
(void)root;
722679
(void)out;
723680
(void)context;
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
1+
regression_tests/vtr_reg_strong/koios
2+
regression_tests/vtr_reg_strong/strong_absorb_buffers
3+
regression_tests/vtr_reg_strong/strong_analysis_only
4+
regression_tests/vtr_reg_strong/strong_analytic_placer
5+
regression_tests/vtr_reg_strong/strong_bidir
6+
regression_tests/vtr_reg_strong/strong_binary
7+
regression_tests/vtr_reg_strong/strong_blocks_with_no_inputs
8+
regression_tests/vtr_reg_strong/strong_bounding_box
9+
regression_tests/vtr_reg_strong/strong_breadth_first
10+
regression_tests/vtr_reg_strong/strong_check_route_options
11+
regression_tests/vtr_reg_strong/strong_cin_tie_off
12+
regression_tests/vtr_reg_strong/strong_clock_aliases
13+
regression_tests/vtr_reg_strong/strong_clock_aliases_set_delay
14+
regression_tests/vtr_reg_strong/strong_clock_buf
15+
regression_tests/vtr_reg_strong/strong_clock_modeling
16+
regression_tests/vtr_reg_strong/strong_clock_pll
17+
regression_tests/vtr_reg_strong/strong_constant_outputs
18+
regression_tests/vtr_reg_strong/strong_custom_grid
19+
regression_tests/vtr_reg_strong/strong_custom_pin_locs
20+
regression_tests/vtr_reg_strong/strong_custom_switch_block
21+
regression_tests/vtr_reg_strong/strong_dedicated_clock
22+
regression_tests/vtr_reg_strong/strong_default_fc_pinlocs
23+
regression_tests/vtr_reg_strong/strong_depop
24+
regression_tests/vtr_reg_strong/strong_detailed_timing
25+
regression_tests/vtr_reg_strong/strong_eblif_vpr
26+
regression_tests/vtr_reg_strong/strong_eblif_vpr_write
27+
regression_tests/vtr_reg_strong/strong_echo_files
28+
regression_tests/vtr_reg_strong/strong_equivalent_sites
29+
regression_tests/vtr_reg_strong/strong_fc_abs
30+
regression_tests/vtr_reg_strong/strong_fix_clusters
31+
regression_tests/vtr_reg_strong/strong_fix_pins_random
32+
regression_tests/vtr_reg_strong/strong_flyover_wires
33+
regression_tests/vtr_reg_strong/strong_fpu_hard_block_arch
34+
regression_tests/vtr_reg_strong/strong_fracturable_luts
35+
regression_tests/vtr_reg_strong/strong_full_stats
36+
regression_tests/vtr_reg_strong/strong_func_formal_flow
37+
regression_tests/vtr_reg_strong/strong_func_formal_vpr
38+
regression_tests/vtr_reg_strong/strong_global_nonuniform
39+
regression_tests/vtr_reg_strong/strong_global_routing
40+
regression_tests/vtr_reg_strong/strong_graphics_commands
41+
regression_tests/vtr_reg_strong/strong_manual_annealing
42+
regression_tests/vtr_reg_strong/strong_mcnc
43+
regression_tests/vtr_reg_strong/strong_minimax_budgets
44+
regression_tests/vtr_reg_strong/strong_multiclock
45+
regression_tests/vtr_reg_strong/strong_no_timing
46+
regression_tests/vtr_reg_strong/strong_pack
47+
regression_tests/vtr_reg_strong/strong_pack_and_place
48+
regression_tests/vtr_reg_strong/strong_pack_disable
49+
regression_tests/vtr_reg_strong/strong_pack_modes
50+
regression_tests/vtr_reg_strong/strong_place
51+
regression_tests/vtr_reg_strong/strong_place_delay_calc_method
52+
regression_tests/vtr_reg_strong/strong_place_delay_model
53+
regression_tests/vtr_reg_strong/strong_place_effort_scaling
54+
regression_tests/vtr_reg_strong/strong_place_quench_slack
55+
regression_tests/vtr_reg_strong/strong_post_routing_sync
56+
regression_tests/vtr_reg_strong/strong_power
57+
regression_tests/vtr_reg_strong/strong_route_only
58+
regression_tests/vtr_reg_strong/strong_route_reconverge
59+
regression_tests/vtr_reg_strong/strong_router_init_timing
60+
regression_tests/vtr_reg_strong/strong_router_lookahead
61+
regression_tests/vtr_reg_strong/strong_router_update_lb_delays
62+
regression_tests/vtr_reg_strong/strong_routing_differing_modes
63+
regression_tests/vtr_reg_strong/strong_routing_modes
64+
regression_tests/vtr_reg_strong/strong_scale_delay_budgets
65+
regression_tests/vtr_reg_strong/strong_sdc
66+
regression_tests/vtr_reg_strong/strong_soft_multipliers
67+
regression_tests/vtr_reg_strong/strong_sub_tiles
68+
regression_tests/vtr_reg_strong/strong_sub_tiles_directs
69+
regression_tests/vtr_reg_strong/strong_sweep_constant_outputs
70+
regression_tests/vtr_reg_strong/strong_target_pin_util
171
regression_tests/vtr_reg_strong/strong_tight_floorplan
72+
regression_tests/vtr_reg_strong/strong_timing
73+
regression_tests/vtr_reg_strong/strong_timing_report_detail
74+
regression_tests/vtr_reg_strong/strong_timing_update_diff
75+
regression_tests/vtr_reg_strong/strong_timing_update_type
76+
regression_tests/vtr_reg_strong/strong_titan
77+
regression_tests/vtr_reg_strong/strong_two_chains
78+
regression_tests/vtr_reg_strong/strong_unroute_analysis
79+
regression_tests/vtr_reg_strong/strong_verify_rr_graph
80+
regression_tests/vtr_reg_strong/strong_verify_rr_graph_bin
81+
regression_tests/vtr_reg_strong/strong_verify_rr_graph_titan
82+
regression_tests/vtr_reg_strong/koios
83+
regression_tests/vtr_reg_strong/koios_no_complex_dsp
84+
regression_tests/vtr_reg_strong/strong_timing_fail
85+
regression_tests/vtr_reg_strong/strong_timing_no_fail

0 commit comments

Comments
 (0)