@@ -1075,6 +1075,76 @@ struct ParseTimingUpdateType {
1075
1075
}
1076
1076
};
1077
1077
1078
+ struct ParsePostSynthNetlistUnconnInputHandling {
1079
+ ConvertedValue<e_post_synth_netlist_unconn_handling> from_str (std::string str) {
1080
+ ConvertedValue<e_post_synth_netlist_unconn_handling> conv_value;
1081
+ if (str == " unconnected" )
1082
+ conv_value.set_value (e_post_synth_netlist_unconn_handling::UNCONNECTED);
1083
+ else if (str == " nets" )
1084
+ conv_value.set_value (e_post_synth_netlist_unconn_handling::NETS);
1085
+ else if (str == " gnd" )
1086
+ conv_value.set_value (e_post_synth_netlist_unconn_handling::GND);
1087
+ else if (str == " vcc" )
1088
+ conv_value.set_value (e_post_synth_netlist_unconn_handling::VCC);
1089
+ else {
1090
+ std::stringstream msg;
1091
+ msg << " Invalid conversion from '" << str << " ' to e_post_synth_netlist_unconn_handling (expected one of: " << argparse::join (default_choices (), " , " ) << " )" ;
1092
+ conv_value.set_error (msg.str ());
1093
+ }
1094
+ return conv_value;
1095
+ }
1096
+
1097
+ ConvertedValue<std::string> to_str (e_post_synth_netlist_unconn_handling val) {
1098
+ ConvertedValue<std::string> conv_value;
1099
+ if (val == e_post_synth_netlist_unconn_handling::NETS)
1100
+ conv_value.set_value (" nets" );
1101
+ else if (val == e_post_synth_netlist_unconn_handling::GND)
1102
+ conv_value.set_value (" gnd" );
1103
+ else if (val == e_post_synth_netlist_unconn_handling::VCC)
1104
+ conv_value.set_value (" vcc" );
1105
+ else {
1106
+ VTR_ASSERT (val == e_post_synth_netlist_unconn_handling::UNCONNECTED);
1107
+ conv_value.set_value (" unconnected" );
1108
+ }
1109
+ return conv_value;
1110
+ }
1111
+
1112
+ std::vector<std::string> default_choices () {
1113
+ return {" unconnected" , " nets" , " gnd" , " vcc" };
1114
+ }
1115
+ };
1116
+
1117
+ struct ParsePostSynthNetlistUnconnOutputHandling {
1118
+ ConvertedValue<e_post_synth_netlist_unconn_handling> from_str (std::string str) {
1119
+ ConvertedValue<e_post_synth_netlist_unconn_handling> conv_value;
1120
+ if (str == " unconnected" )
1121
+ conv_value.set_value (e_post_synth_netlist_unconn_handling::UNCONNECTED);
1122
+ else if (str == " nets" )
1123
+ conv_value.set_value (e_post_synth_netlist_unconn_handling::NETS);
1124
+ else {
1125
+ std::stringstream msg;
1126
+ msg << " Invalid conversion from '" << str << " ' to e_post_synth_netlist_unconn_handling (expected one of: " << argparse::join (default_choices (), " , " ) << " )" ;
1127
+ conv_value.set_error (msg.str ());
1128
+ }
1129
+ return conv_value;
1130
+ }
1131
+
1132
+ ConvertedValue<std::string> to_str (e_post_synth_netlist_unconn_handling val) {
1133
+ ConvertedValue<std::string> conv_value;
1134
+ if (val == e_post_synth_netlist_unconn_handling::NETS)
1135
+ conv_value.set_value (" nets" );
1136
+ else {
1137
+ VTR_ASSERT (val == e_post_synth_netlist_unconn_handling::UNCONNECTED);
1138
+ conv_value.set_value (" unconnected" );
1139
+ }
1140
+ return conv_value;
1141
+ }
1142
+
1143
+ std::vector<std::string> default_choices () {
1144
+ return {" unconnected" , " nets" };
1145
+ }
1146
+ };
1147
+
1078
1148
argparse::ArgumentParser create_arg_parser (std::string prog_name, t_options& args) {
1079
1149
std::string description =
1080
1150
" Implements the specified circuit onto the target FPGA architecture"
@@ -2419,6 +2489,26 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
2419
2489
.default_value (" -1" )
2420
2490
.show_in (argparse::ShowIn::HELP_ONLY);
2421
2491
2492
+ analysis_grp.add_argument <e_post_synth_netlist_unconn_handling, ParsePostSynthNetlistUnconnInputHandling>(args.post_synth_netlist_unconn_input_handling , " --post_synth_netlist_unconn_inputs" )
2493
+ .help (
2494
+ " Controls how unconnected input cell ports are handled in the post-synthesis netlist\n "
2495
+ " * unconnected: leave unconnected\n "
2496
+ " * nets: connect each unconnected input pin to its own separate\n "
2497
+ " undriven net\n "
2498
+ " * gnd: tie all to ground (1'b0)\n "
2499
+ " * vcc: tie all to VCC (1'b1)\n " )
2500
+ .default_value (" unconnected" )
2501
+ .show_in (argparse::ShowIn::HELP_ONLY);
2502
+
2503
+ analysis_grp.add_argument <e_post_synth_netlist_unconn_handling, ParsePostSynthNetlistUnconnOutputHandling>(args.post_synth_netlist_unconn_output_handling , " --post_synth_netlist_unconn_outputs" )
2504
+ .help (
2505
+ " Controls how unconnected output cell ports are handled in the post-synthesis netlist\n "
2506
+ " * unconnected: leave unconnected\n "
2507
+ " * nets: connect each unconnected input pin to its own separate\n "
2508
+ " undriven net\n " )
2509
+ .default_value (" unconnected" )
2510
+ .show_in (argparse::ShowIn::HELP_ONLY);
2511
+
2422
2512
auto & power_grp = parser.add_argument_group (" power analysis options" );
2423
2513
2424
2514
power_grp.add_argument <bool , ParseOnOff>(args.do_power , " --power" )
0 commit comments