VPR-6.0
|
00001 #include <assert.h> 00002 #include "util.h" 00003 #include "vpr_types.h" 00004 #include "globals.h" 00005 #include "OptionTokens.h" 00006 #include "ReadOptions.h" 00007 #include "read_xml_arch_file.h" 00008 #include "SetupVPR.h" 00009 00010 /******** Function Prototypes ********/ 00011 00012 static void ShowPlacerOpts(INP t_options Options, 00013 INP struct s_placer_opts PlacerOpts, 00014 INP struct s_annealing_sched AnnealSched); 00015 static void ShowOperation(INP enum e_operation Operation); 00016 static void ShowRouterOpts(INP struct s_router_opts RouterOpts); 00017 static void ShowAnnealSched(INP struct s_annealing_sched AnnealSched); 00018 static void ShowRoutingArch(INP struct s_det_routing_arch RoutingArch); 00019 00020 00021 /******** Function Implementations ********/ 00022 00023 void 00024 ShowSetup(INP t_options Options, 00025 INP t_arch Arch, 00026 INP boolean TimingEnabled, 00027 INP enum e_operation Operation, 00028 INP struct s_file_name_opts FileNameOpts, 00029 INP struct s_placer_opts PlacerOpts, 00030 INP struct s_annealing_sched AnnealSched, 00031 INP struct s_router_opts RouterOpts, 00032 INP struct s_det_routing_arch RoutingArch, 00033 INP t_segment_inf * Segments, 00034 INP t_timing_inf Timing) 00035 { 00036 int i, j, num_p_inputs, num_p_outputs; 00037 int *num_blocks_type; 00038 num_blocks_type = my_calloc(num_types, sizeof(int)); 00039 00040 printf("Timing analysis: %s\n", (TimingEnabled ? "ON" : "OFF")); 00041 printf("\n"); 00042 00043 printf("Circuit netlist file: %s\n", FileNameOpts.NetFile); 00044 printf("Circuit placement file: %s\n", FileNameOpts.PlaceFile); 00045 printf("Circuit routing file: %s\n", FileNameOpts.RouteFile); 00046 00047 ShowOperation(Operation); 00048 printf("Placer: %s\n", (PlacerOpts.doPlacement ? "ENABLED" : "DISABLED")); 00049 printf("Router: %s\n", (RouterOpts.doRouting ? "ENABLED" : "DISABLED")); 00050 00051 if(PlacerOpts.doPlacement) { 00052 ShowPlacerOpts(Options, PlacerOpts, AnnealSched); 00053 } 00054 if(RouterOpts.doRouting) 00055 { 00056 ShowRouterOpts(RouterOpts); 00057 } 00058 00059 if(DETAILED == RouterOpts.route_type) 00060 ShowRoutingArch(RoutingArch); 00061 00062 printf("\n"); 00063 printf("Netlist num_nets: %d\n", num_nets); 00064 printf("Netlist num_blocks: %d\n", num_blocks); 00065 00066 for(i = 0; i < num_types; i++) 00067 { 00068 num_blocks_type[i] = 0; 00069 } 00070 /* Count I/O input and output pads */ 00071 num_p_inputs = 0; 00072 num_p_outputs = 0; 00073 00074 for(i = 0; i < num_blocks; i++) 00075 { 00076 num_blocks_type[block[i].type->index]++; 00077 if(block[i].type == IO_TYPE) 00078 { 00079 for(j = 0; j < IO_TYPE->num_pins; j++) 00080 { 00081 if(block[i].nets[j] != OPEN) 00082 { 00083 if(IO_TYPE-> 00084 class_inf[IO_TYPE->pin_class[j]]. 00085 type == DRIVER) 00086 { 00087 num_p_inputs++; 00088 } 00089 else 00090 { 00091 assert(IO_TYPE-> 00092 class_inf[IO_TYPE-> 00093 pin_class[j]]. 00094 type == RECEIVER); 00095 num_p_outputs++; 00096 } 00097 } 00098 } 00099 } 00100 } 00101 00102 for(i = 0; i < num_types; i++) 00103 { 00104 if(IO_TYPE != &type_descriptors[i]) { 00105 printf("Netlist %s blocks: %d\n", type_descriptors[i].name, num_blocks_type[i]); 00106 } 00107 } 00108 00109 /* Print out each block separately instead */ 00110 printf("Netlist inputs pins: %d\n", num_p_inputs); 00111 printf("Netlist output pins: %d\n", num_p_outputs); 00112 printf("\n"); 00113 free(num_blocks_type); 00114 } 00115 00116 00117 static void 00118 ShowRoutingArch(INP struct s_det_routing_arch RoutingArch) 00119 { 00120 00121 printf("RoutingArch.directionality: "); 00122 switch (RoutingArch.directionality) 00123 { 00124 case BI_DIRECTIONAL: 00125 printf("BI_DIRECTIONAL\n"); 00126 break; 00127 case UNI_DIRECTIONAL: 00128 printf("UNI_DIRECTIONAL\n"); 00129 break; 00130 default: 00131 printf("<Unknown>\n"); 00132 exit(1); 00133 } 00134 00135 printf("RoutingArch.switch_block_type: "); 00136 switch (RoutingArch.switch_block_type) 00137 { 00138 case SUBSET: 00139 printf("SUBSET\n"); 00140 break; 00141 case WILTON: 00142 printf("WILTON\n"); 00143 break; 00144 case UNIVERSAL: 00145 printf("UNIVERSAL\n"); 00146 break; 00147 case FULL: 00148 printf("FULL\n"); 00149 break; 00150 default: 00151 printf("<Unknown>\n"); 00152 exit(1); 00153 } 00154 00155 printf("RoutingArch.Fs: %d\n", RoutingArch.Fs); 00156 00157 printf("\n"); 00158 } 00159 00160 00161 static void 00162 ShowAnnealSched(INP struct s_annealing_sched AnnealSched) 00163 { 00164 00165 printf("AnnealSched.type: "); 00166 switch (AnnealSched.type) 00167 { 00168 case AUTO_SCHED: 00169 printf("AUTO_SCHED\n"); 00170 break; 00171 case USER_SCHED: 00172 printf("USER_SCHED\n"); 00173 break; 00174 default: 00175 printf("<Unknown>\n"); 00176 exit(1); 00177 } 00178 00179 printf("AnnealSched.inner_num: %f\n", AnnealSched.inner_num); 00180 00181 if(USER_SCHED == AnnealSched.type) 00182 { 00183 printf("AnnealSched.init_t: %f\n", AnnealSched.init_t); 00184 printf("AnnealSched.alpha_t: %f\n", AnnealSched.alpha_t); 00185 printf("AnnealSched.exit_t: %f\n", AnnealSched.exit_t); 00186 } 00187 } 00188 00189 00190 static void 00191 ShowRouterOpts(INP struct s_router_opts RouterOpts) 00192 { 00193 00194 printf("RouterOpts.route_type: "); 00195 switch (RouterOpts.route_type) 00196 { 00197 case GLOBAL: 00198 printf("GLOBAL\n"); 00199 break; 00200 case DETAILED: 00201 printf("DETAILED\n"); 00202 break; 00203 default: 00204 printf("<Unknown>\n"); 00205 exit(1); 00206 } 00207 00208 if(DETAILED == RouterOpts.route_type) 00209 { 00210 printf("RouterOpts.router_algorithm: "); 00211 switch (RouterOpts.router_algorithm) 00212 { 00213 case BREADTH_FIRST: 00214 printf("BREADTH_FIRST\n"); 00215 break; 00216 case TIMING_DRIVEN: 00217 printf("TIMING_DRIVEN\n"); 00218 break; 00219 case DIRECTED_SEARCH: 00220 printf("DIRECTED_SEARCH\n"); 00221 break; 00222 default: 00223 printf("<Unknown>\n"); 00224 exit(1); 00225 } 00226 00227 printf("RouterOpts.base_cost_type: "); 00228 switch (RouterOpts.base_cost_type) 00229 { 00230 case INTRINSIC_DELAY: 00231 printf("INTRINSIC_DELAY\n"); 00232 break; 00233 case DELAY_NORMALIZED: 00234 printf("DELAY_NORMALIZED\n"); 00235 break; 00236 case DEMAND_ONLY: 00237 printf("DEMAND_ONLY\n"); 00238 break; 00239 default: 00240 printf("<Unknown>\n"); 00241 exit(1); 00242 } 00243 00244 printf("RouterOpts.fixed_channel_width: "); 00245 if(NO_FIXED_CHANNEL_WIDTH == RouterOpts.fixed_channel_width) 00246 { 00247 printf("NO_FIXED_CHANNEL_WIDTH\n"); 00248 } 00249 else 00250 { 00251 printf("%d\n", RouterOpts.fixed_channel_width); 00252 } 00253 00254 printf("RouterOpts.acc_fac: %f\n", RouterOpts.acc_fac); 00255 printf("RouterOpts.bb_factor: %d\n", RouterOpts.bb_factor); 00256 printf("RouterOpts.bend_cost: %f\n", RouterOpts.bend_cost); 00257 printf("RouterOpts.first_iter_pres_fac: %f\n", 00258 RouterOpts.first_iter_pres_fac); 00259 printf("RouterOpts.initial_pres_fac: %f\n", 00260 RouterOpts.initial_pres_fac); 00261 printf("RouterOpts.pres_fac_mult: %f\n", 00262 RouterOpts.pres_fac_mult); 00263 printf("RouterOpts.max_router_iterations: %d\n", 00264 RouterOpts.max_router_iterations); 00265 00266 if(TIMING_DRIVEN == RouterOpts.router_algorithm) 00267 { 00268 printf("RouterOpts.astar_fac: %f\n", 00269 RouterOpts.astar_fac); 00270 printf("RouterOpts.criticality_exp: %f\n", 00271 RouterOpts.criticality_exp); 00272 printf("RouterOpts.max_criticality: %f\n", 00273 RouterOpts.max_criticality); 00274 } 00275 } 00276 else 00277 { 00278 assert(GLOBAL == RouterOpts.route_type); 00279 00280 printf("RouterOpts.router_algorithm: "); 00281 switch (RouterOpts.router_algorithm) 00282 { 00283 case BREADTH_FIRST: 00284 printf("BREADTH_FIRST\n"); 00285 break; 00286 case TIMING_DRIVEN: 00287 printf("TIMING_DRIVEN\n"); 00288 break; 00289 case DIRECTED_SEARCH: 00290 printf("DIRECTED_SEARCH\n"); 00291 break; 00292 default: 00293 printf("<Unknown>\n"); 00294 exit(1); 00295 } 00296 00297 printf("RouterOpts.base_cost_type: "); 00298 switch (RouterOpts.base_cost_type) 00299 { 00300 case INTRINSIC_DELAY: 00301 printf("INTRINSIC_DELAY\n"); 00302 break; 00303 case DELAY_NORMALIZED: 00304 printf("DELAY_NORMALIZED\n"); 00305 break; 00306 case DEMAND_ONLY: 00307 printf("DEMAND_ONLY\n"); 00308 break; 00309 default: 00310 printf("<Unknown>\n"); 00311 exit(1); 00312 } 00313 00314 printf("RouterOpts.fixed_channel_width: "); 00315 if(NO_FIXED_CHANNEL_WIDTH == RouterOpts.fixed_channel_width) 00316 { 00317 printf("NO_FIXED_CHANNEL_WIDTH\n"); 00318 } 00319 else 00320 { 00321 printf("%d\n", RouterOpts.fixed_channel_width); 00322 } 00323 00324 printf("RouterOpts.acc_fac: %f\n", RouterOpts.acc_fac); 00325 printf("RouterOpts.bb_factor: %d\n", RouterOpts.bb_factor); 00326 printf("RouterOpts.bend_cost: %f\n", RouterOpts.bend_cost); 00327 printf("RouterOpts.first_iter_pres_fac: %f\n", 00328 RouterOpts.first_iter_pres_fac); 00329 printf("RouterOpts.initial_pres_fac: %f\n", 00330 RouterOpts.initial_pres_fac); 00331 printf("RouterOpts.pres_fac_mult: %f\n", 00332 RouterOpts.pres_fac_mult); 00333 printf("RouterOpts.max_router_iterations: %d\n", 00334 RouterOpts.max_router_iterations); 00335 if(TIMING_DRIVEN == RouterOpts.router_algorithm) 00336 { 00337 printf("RouterOpts.astar_fac: %f\n", 00338 RouterOpts.astar_fac); 00339 printf("RouterOpts.criticality_exp: %f\n", 00340 RouterOpts.criticality_exp); 00341 printf("RouterOpts.max_criticality: %f\n", 00342 RouterOpts.max_criticality); 00343 } 00344 } 00345 printf("\n"); 00346 } 00347 00348 00349 static void 00350 ShowOperation(INP enum e_operation Operation) 00351 { 00352 printf("Operation: "); 00353 switch (Operation) 00354 { 00355 case RUN_FLOW: 00356 printf("RUN_FLOW\n"); 00357 break; 00358 case TIMING_ANALYSIS_ONLY: 00359 printf("TIMING_ANALYSIS_ONLY\n"); 00360 break; 00361 default: 00362 printf("<Unknown>\n"); 00363 exit(1); 00364 } 00365 printf("\n"); 00366 } 00367 00368 00369 static void 00370 ShowPlacerOpts(INP t_options Options, 00371 INP struct s_placer_opts PlacerOpts, 00372 INP struct s_annealing_sched AnnealSched) 00373 { 00374 00375 printf("PlacerOpts.place_freq: "); 00376 switch (PlacerOpts.place_freq) 00377 { 00378 case PLACE_ONCE: 00379 printf("PLACE_ONCE\n"); 00380 break; 00381 case PLACE_ALWAYS: 00382 printf("PLACE_ALWAYS\n"); 00383 break; 00384 case PLACE_NEVER: 00385 printf("PLACE_NEVER\n"); 00386 break; 00387 default: 00388 printf("<Unknown>\n"); 00389 exit(1); 00390 } 00391 if((PLACE_ONCE == PlacerOpts.place_freq) || 00392 (PLACE_ALWAYS == PlacerOpts.place_freq)) 00393 { 00394 00395 printf("PlacerOpts.place_algorithm: "); 00396 switch (PlacerOpts.place_algorithm) 00397 { 00398 case BOUNDING_BOX_PLACE: 00399 printf("BOUNDING_BOX_PLACE\n"); 00400 break; 00401 case NET_TIMING_DRIVEN_PLACE: 00402 printf("NET_TIMING_DRIVEN_PLACE\n"); 00403 break; 00404 case PATH_TIMING_DRIVEN_PLACE: 00405 printf("PATH_TIMING_DRIVEN_PLACE\n"); 00406 break; 00407 default: 00408 printf("<Unknown>\n"); 00409 exit(1); 00410 } 00411 00412 printf("PlacerOpts.place_cost_type: "); 00413 switch (PlacerOpts.place_cost_type) 00414 { 00415 case LINEAR_CONG: 00416 printf("LINEAR_CONG\n"); 00417 break; 00418 case NONLINEAR_CONG: 00419 printf("NONLINEAR_CONG\n"); 00420 break; 00421 default: 00422 printf("<Unknown>\n"); 00423 exit(1); 00424 } 00425 00426 printf("PlacerOpts.pad_loc_type: "); 00427 switch (PlacerOpts.pad_loc_type) 00428 { 00429 case FREE: 00430 printf("FREE\n"); 00431 break; 00432 case RANDOM: 00433 printf("RANDOM\n"); 00434 break; 00435 case USER: 00436 printf("USER '%s'\n", PlacerOpts.pad_loc_file); 00437 break; 00438 default: 00439 printf("<Unknown>\n"); 00440 exit(1); 00441 } 00442 00443 printf("PlacerOpts.place_cost_exp: %f\n", 00444 PlacerOpts.place_cost_exp); 00445 00446 if((LINEAR_CONG == PlacerOpts.place_cost_type) || 00447 (Options.Count[OT_PLACE_CHAN_WIDTH])) 00448 { 00449 printf("PlacerOpts.place_chan_width: %d\n", 00450 PlacerOpts.place_chan_width); 00451 } 00452 00453 if(NONLINEAR_CONG == PlacerOpts.place_cost_type) 00454 { 00455 printf("PlacerOpts.num_regions: %d\n", 00456 PlacerOpts.num_regions); 00457 } 00458 00459 if((NET_TIMING_DRIVEN_PLACE == PlacerOpts.place_algorithm) || 00460 (PATH_TIMING_DRIVEN_PLACE == PlacerOpts.place_algorithm)) 00461 { 00462 printf("PlacerOpts.inner_loop_recompute_divider: %d\n", 00463 PlacerOpts.inner_loop_recompute_divider); 00464 printf("PlacerOpts.recompute_crit_iter: %d\n", 00465 PlacerOpts.recompute_crit_iter); 00466 printf("PlacerOpts.timing_tradeoff: %f\n", 00467 PlacerOpts.timing_tradeoff); 00468 printf("PlacerOpts.td_place_exp_first: %f\n", 00469 PlacerOpts.td_place_exp_first); 00470 printf("PlacerOpts.td_place_exp_last: %f\n", 00471 PlacerOpts.td_place_exp_last); 00472 } 00473 00474 printf("PlaceOpts.seed: %d\n", PlacerOpts.seed); 00475 00476 ShowAnnealSched(AnnealSched); 00477 } 00478 printf("\n"); 00479 00480 }