⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 用c++写的用于FPGA设计中布图布线的工具源码
💻 C
📖 第 1 页 / 共 3 页
字号:
      if (*constant_net_delay < 0.) {	printf("Error:  -timing_analyze_only_with_net_delay value must "	       "be > 0.\n");	exit(1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-init_t") == 0) {      annealing_sched->init_t = read_float_option (argc, argv, i);      if (annealing_sched->init_t < 0) {	printf("Error:  -init_t value must be nonnegative 0.\n");	exit(1);      }      annealing_sched->type = USER_SCHED;      i += 2;      continue;    }    if (strcmp(argv[i],"-alpha_t") == 0) {      annealing_sched->alpha_t = read_float_option (argc, argv, i);      if ((annealing_sched->alpha_t <= 0) || 	  (annealing_sched->alpha_t >= 1.)) {	printf("Error:  -alpha_t value must be between 0. and 1.\n");	exit(1);      }      annealing_sched->type = USER_SCHED;      i += 2;      continue;    }    if (strcmp(argv[i],"-exit_t") == 0) {      annealing_sched->exit_t = read_float_option (argc, argv, i);      if (annealing_sched->exit_t <= 0.) {	printf("Error:  -exit_t value must be greater than 0.\n");	exit(1);      }      annealing_sched->type = USER_SCHED;      i += 2;      continue;    }    if (strcmp(argv[i],"-inner_num") == 0) {      annealing_sched->inner_num = read_float_option (argc, argv, i);      if (annealing_sched->inner_num <= 0.) {	printf("Error:  -inner_num value must be greater than 0.\n");	exit(1);      }      i += 2;      continue;    }    if (strcmp(argv[i],"-seed") == 0) {      seed = read_int_option (argc, argv, i);      i += 2;      continue;    }    if (strcmp(argv[i],"-place_cost_exp") == 0) {       placer_opts->place_cost_exp = read_float_option (argc, argv, i);       if (placer_opts->place_cost_exp < 0.) {	printf("Error:  -place_cost_exp value must be nonnegative.\n");	exit(1);      }       i += 2;      continue;    }    if (strcmp(argv[i],"-td_place_exp_first") == 0) {       placer_opts->td_place_exp_first = read_float_option (argc, argv, i);       if (placer_opts->td_place_exp_first < 0.) {	printf("Error:  -td_place_exp_first value must be nonnegative.\n");	exit(1);      }       i += 2;      continue;    }    if (strcmp(argv[i],"-td_place_exp_last") == 0) {       placer_opts->td_place_exp_last = read_float_option (argc, argv, i);       if (placer_opts->td_place_exp_last < 0.) {	printf("Error:  -td_place_exp_last value must be nonnegative.\n");	exit(1);      }       i += 2;      continue;    }    if (strcmp(argv[i],"-place_algorithm") == 0) {      if (argc <= i+1) {	printf("Error:  -place_algorithm option requires a "               "string parameter.\n");	exit (1);      }                 if (strcmp(argv[i+1], "bounding_box") == 0) {	placer_opts->place_algorithm = BOUNDING_BOX_PLACE;      }      else if (strcmp(argv[i+1], "net_timing_driven") == 0) {	placer_opts->place_algorithm = NET_TIMING_DRIVEN_PLACE;      }      else if (strcmp(argv[i+1], "path_timing_driven") == 0) {	placer_opts->place_algorithm = PATH_TIMING_DRIVEN_PLACE;      }      else {	printf("Error:  -place_algorithm must be bounding_box, "	       "net_timing_driven, or path_timing_driven\n");	exit (1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-timing_tradeoff") == 0) {       placer_opts->timing_tradeoff = read_float_option (argc, argv, i);       if (placer_opts->timing_tradeoff < 0.) {	printf("Error:  -timing_tradeoff value must be nonnegative.\n");	exit(1);      }       i += 2;      continue;    }    if (strcmp(argv[i],"-enable_timing_computations") == 0) {      if (argc <= i+1) {	printf ("Error:  -enable_timing_computations option requires a string "		"parameter.\n");	exit (1);      }       if (strcmp(argv[i+1], "on") == 0) {	placer_opts->enable_timing_computations= TRUE;      }       else if (strcmp(argv[i+1], "off") == 0) {	placer_opts->enable_timing_computations = FALSE;      }       else {	printf("Error:  -enable_timing_computations must be on or off.\n");	exit (1);      }       i += 2;      continue;    }    if (strcmp(argv[i],"-block_dist") == 0) {       placer_opts->block_dist = read_int_option (argc, argv, i);       if (placer_opts->block_dist < 0.) {	printf("Error:  -block_dist value must be nonnegative.\n");	exit(1);      }       i += 2;      continue;    }    if (strcmp(argv[i],"-place_cost_type") == 0) {      if (argc <= i+1) {	printf("Error:  -place_cost_type option requires a "               "string parameter.\n");	exit (1);      }                 if (strcmp(argv[i+1], "linear") == 0) {	placer_opts->place_cost_type = LINEAR_CONG;      }      else if (strcmp(argv[i+1], "nonlinear") == 0) {	placer_opts->place_cost_type = NONLINEAR_CONG;      }      else {	printf("Error:  -place_cost_type must be linear or nonlinear.\n");	exit (1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-num_regions") == 0) {      placer_opts->num_regions = read_int_option (argc, argv, i);      if (placer_opts->num_regions <= 0.) {	printf("Error:  -num_regions value must be greater than 0.\n");	exit(1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-place_chan_width") == 0) {      placer_opts->place_chan_width = read_int_option (argc, argv, i);      if (placer_opts->place_chan_width <= 0.) {	printf("Error:  -place_chan_width value must be greater than 0.\n");	exit(1);      }      i += 2;      do_one_nonlinear_place = TRUE;      continue;    }      if (strcmp(argv[i],"-max_router_iterations") == 0) {       router_opts->max_router_iterations = read_int_option (argc, argv, i);      if (router_opts->max_router_iterations < 0) {	printf("Error:  -max_router_iterations value is less than 0.\n");	exit(1);      }      i += 2;      continue;    }        if (strcmp(argv[i],"-bb_factor") == 0) {      router_opts->bb_factor = read_int_option (argc, argv, i);      if (router_opts->bb_factor < 0) {	printf("Error:  -bb_factor is less than 0.\n");	exit (1);      }      i += 2;      continue;    }    if (strcmp(argv[i],"-router_algorithm") == 0) {      if (argc <= i+1) {	printf("Error:  -router_algorithm option requires a string "	       "parameter.\n");	exit (1);      }                 if (strcmp(argv[i+1], "breadth_first") == 0) {	router_opts->router_algorithm = BREADTH_FIRST;      }      else if (strcmp(argv[i+1], "timing_driven") == 0) {	router_opts->router_algorithm = TIMING_DRIVEN;      }      else {	printf("Error:  -router_algorithm must be breadth_first or "	       "timing_driven.\n");	exit (1);      }      i += 2;      continue;    }    if (strcmp(argv[i],"-first_iter_pres_fac") == 0) {      router_opts->first_iter_pres_fac = read_float_option (argc, argv, i);      if (router_opts->first_iter_pres_fac < 0.) {	printf("Error:  -first_iter_pres_fac must be nonnegative.\n");	exit (1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-initial_pres_fac") == 0) {       router_opts->initial_pres_fac = read_float_option (argc, argv, i);      if (router_opts->initial_pres_fac <= 0.) { 	printf("Error:  -initial_pres_fac must be greater than 0.\n");	exit (1);       }       i += 2;       continue;     }       if (strcmp(argv[i],"-pres_fac_mult") == 0) {      router_opts->pres_fac_mult = read_float_option (argc, argv, i);      if (router_opts->pres_fac_mult <= 0.) {	printf("Error:  -pres_fac_mult must be greater than "               "0.\n");	exit (1);      }        i += 2;       continue;    }    if (strcmp(argv[i],"-acc_fac") == 0) {       router_opts->acc_fac = read_float_option (argc, argv, i);      if (router_opts->acc_fac < 0.) { 	printf("Error:  -acc_fac must be nonnegative.\n");	exit (1);       }          i += 2;        continue;     }       if (strcmp(argv[i],"-astar_fac") == 0) {       router_opts->astar_fac = read_float_option (argc, argv, i);      if (router_opts->astar_fac < 0.) { 	printf("Error:  -astar_fac must be nonnegative.\n");	exit (1);       }          i += 2;        continue;     }       if (strcmp(argv[i],"-max_criticality") == 0) {      router_opts->max_criticality = read_float_option (argc, argv, i);      if (router_opts->max_criticality < 0. || router_opts->max_criticality	  >= 1.) {	printf("Error:  -max_criticality must be greater than or equal\n"	       "to 0 and less than 1.\n");	exit (1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-criticality_exp") == 0) {      router_opts->criticality_exp = read_float_option (argc, argv, i);      if (router_opts->criticality_exp < 0.) {	printf("Error:  -criticality_exp must be non-negative.\n");	exit (1);      }      i += 2;      continue;    }      if (strcmp(argv[i],"-base_cost_type") == 0) {      if (argc <= i+1) {	printf("Error:  -base_cost_type option requires a string "	       "parameter.\n");	exit (1);      }                 if (strcmp(argv[i+1], "intrinsic_delay") == 0) {	router_opts->base_cost_type = INTRINSIC_DELAY;      }      else if (strcmp(argv[i+1], "delay_normalized") == 0) {	router_opts->base_cost_type = DELAY_NORMALIZED;      }      else if (strcmp(argv[i+1], "demand_only") == 0) {	router_opts->base_cost_type = DEMAND_ONLY;      }      else {	printf("Error:  -base_cost_type must be intrinsic_delay, "	       "delay_normalized or demand_only.\n");	exit (1);      }      base_cost_type_set = TRUE;      i += 2;      continue;    }    if (strcmp(argv[i],"-bend_cost") == 0) {       router_opts->bend_cost = read_float_option (argc, argv, i);       if (router_opts->bend_cost < 0.) {	printf("Error:  -bend_cost cannot be less than 0.\n");	exit (1);      }       bend_cost_set = TRUE;      i += 2;      continue;    }      if (strcmp(argv[i],"-route_type") == 0) {      if (argc <= i+1) {	printf("Error:  -route_type option requires a "               "string parameter.\n");	exit (1);      }      if (strcmp(argv[i+1], "global") == 0) {	router_opts->route_type = GLOBAL;      }      else if (strcmp(argv[i+1], "detailed") == 0) {	router_opts->route_type = DETAILED;      }      else {	printf("Error:  -route_type must be global or detailed.\n");	exit (1);      }      i += 2;      continue;     }      if (strcmp(argv[i],"-route_chan_width") == 0) {      router_opts->fixed_channel_width = read_int_option (argc, argv, i);      if (router_opts->fixed_channel_width <= 0) {	printf("Error:  -route_chan_width value must be greater than 0.\n");	exit(1);      }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -