24 static void Error(
INP const char *Token);
50 return Options->TimingAnalysis;
61 return Options->CreateEchoFile;
91 return Options->Generate_Post_Synthesis_Netlist;
207 name = (
char*)
my_malloc((strlen(default_name) + 40) *
sizeof(
char));
208 sprintf(name,
"%s.critical_path.out", default_name);
211 sprintf(name,
"%s.slack.out", default_name);
214 sprintf(name,
"%s.criticality.out", default_name);
251 head = Args = (
char **)
my_malloc(
sizeof(
char *) * (argc + 1));
252 memcpy(Args, argv, (
sizeof(
char *) * argc));
259 if (strncmp(
"--", *Args, 2) == 0) {
262 }
else if (strncmp(
"-", *Args, 1) == 0) {
265 }
else if (NULL == Options->ArchFile) {
267 vpr_printf(TIO_MESSAGE_INFO,
"Architecture file: %s\n", Options->ArchFile);
269 }
else if (NULL == Options->CircuitName) {
272 offset = strlen(Options->CircuitName) - 5;
273 if (offset > 0 && !strcmp(Options->CircuitName + offset,
".blif")) {
274 Options->CircuitName[offset] =
'\0';
276 vpr_printf(TIO_MESSAGE_INFO,
"Circuit name: %s.blif\n", Options->CircuitName);
287 char **tmp_argv = NULL;
292 ReadOptions(tmp_argc, tmp_argv, &SettingsFileOptions);
317 if (Options->Provenance[Token])
319 Options->Provenance[Token] = 0;
320 Options->Count[Token] = 1;
323 ++Options->Count[Token];
339 return ReadString(Args, &Options->SettingsFile);
344 return ReadInt(Args, &Options->GraphPause);
350 return ReadFloat(Args, &Options->constant_net_delay);
355 return ReadOnOff(Args, &Options->TimingAnalysis);
357 return ReadString(Args, &Options->out_file_prefix);
359 return ReadOnOff(Args, &Options->CreateEchoFile);
362 return ReadOnOff(Args, &Options->Generate_Post_Synthesis_Netlist);
365 return ReadOnOff(Args, &Options->global_clocks);
367 return ReadOnOff(Args, &Options->hill_climbing_flag);
369 return ReadOnOff(Args, &Options->sweep_hanging_nets_and_inputs);
371 return ReadOnOff(Args, &Options->timing_driven);
379 return ReadInt(Args, &Options->recompute_timing_after);
381 return ReadFloat(Args, &Options->block_delay);
383 return ReadOnOff(Args, &Options->allow_unrelated_clustering);
385 return ReadOnOff(Args, &Options->allow_early_exit);
387 return ReadFloat(Args, &Options->intra_cluster_net_delay);
389 return ReadFloat(Args, &Options->inter_cluster_net_delay);
391 return ReadOnOff(Args, &Options->connection_driven);
401 return ReadFloat(Args, &Options->PlaceInitT);
403 return ReadFloat(Args, &Options->PlaceExitT);
405 return ReadFloat(Args, &Options->PlaceAlphaT);
407 return ReadFloat(Args, &Options->PlaceInnerNum);
409 return ReadInt(Args, &Options->Seed);
411 return ReadFloat(Args, &Options->place_cost_exp);
413 return ReadInt(Args, &Options->PlaceChanWidth);
417 return ReadOnOff(Args, &Options->ShowPlaceTiming);
419 return ReadInt(Args, &Options->block_dist);
423 return ReadFloat(Args, &Options->PlaceTimingTradeoff);
425 return ReadInt(Args, &Options->RecomputeCritIter);
427 return ReadInt(Args, &Options->inner_loop_recompute_divider);
429 return ReadFloat(Args, &Options->place_exp_first);
431 return ReadFloat(Args, &Options->place_exp_last);
435 return ReadInt(Args, &Options->max_router_iterations);
437 return ReadInt(Args, &Options->bb_factor);
439 return ReadFloat(Args, &Options->initial_pres_fac);
441 return ReadFloat(Args, &Options->pres_fac_mult);
443 return ReadFloat(Args, &Options->acc_fac);
445 return ReadFloat(Args, &Options->first_iter_pres_fac);
447 return ReadFloat(Args, &Options->bend_cost);
453 return ReadInt(Args, &Options->RouteChanWidth);
461 return ReadFloat(Args, &Options->astar_fac);
463 return ReadFloat(Args, &Options->max_criticality);
465 return ReadFloat(Args, &Options->criticality_exp);
475 return ReadString(Args, &Options->CmosTechFile);
478 vpr_printf(TIO_MESSAGE_ERROR,
"Unexpected option '%s' on command line.\n", *PrevArgs);
498 if ((dest->Count[Token] || (!src->Count[Token])))
501 dest->Count[Token] = src->Count[Token];
502 dest->Provenance[Token] = id;
507 dest->BlifFile = src->BlifFile;
510 dest->NetFile = src->NetFile;
513 dest->PlaceFile = src->PlaceFile;
516 dest->RouteFile = src->RouteFile;
519 dest->SettingsFile = src->SettingsFile;
522 dest->SDCFile = src->SDCFile;
528 dest->GraphPause = src->GraphPause;
535 dest->constant_net_delay = src->constant_net_delay;
541 dest->TimingAnalysis = src->TimingAnalysis;
544 dest->out_file_prefix = src->out_file_prefix;
547 dest->CreateEchoFile = src->CreateEchoFile;
552 dest->global_clocks = src->global_clocks;
555 dest->hill_climbing_flag = src->hill_climbing_flag;
558 dest->sweep_hanging_nets_and_inputs = src->sweep_hanging_nets_and_inputs;
561 dest->timing_driven = src->timing_driven;
564 dest->cluster_seed_type = src->cluster_seed_type;
567 dest->alpha = src->alpha;
570 dest->beta = src->beta;
573 dest->recompute_timing_after = src->recompute_timing_after;
576 dest->block_delay = src->block_delay;
579 dest->allow_unrelated_clustering = src->allow_unrelated_clustering;
582 dest->allow_early_exit = src->allow_early_exit;
585 dest->intra_cluster_net_delay = src->intra_cluster_net_delay;
588 dest->inter_cluster_net_delay = src->inter_cluster_net_delay;
591 dest->connection_driven = src->connection_driven;
596 dest->packer_algorithm = src->packer_algorithm;
601 dest->PlaceAlgorithm = src->PlaceAlgorithm;
604 dest->PlaceInitT = src->PlaceInitT;
607 dest->PlaceExitT = src->PlaceExitT;
610 dest->PlaceAlphaT = src->PlaceAlphaT;
613 dest->PlaceInnerNum = src->PlaceInnerNum;
616 dest->Seed = src->Seed;
619 dest->place_cost_exp = src->place_cost_exp;
622 dest->PlaceChanWidth = src->PlaceChanWidth;
625 dest->PinFile = src->PinFile;
628 dest->ShowPlaceTiming = src->ShowPlaceTiming;
631 dest->block_dist = src->block_dist;
636 dest->PlaceTimingTradeoff = src->PlaceTimingTradeoff;
639 dest->RecomputeCritIter = src->RecomputeCritIter;
642 dest->inner_loop_recompute_divider = src->inner_loop_recompute_divider;
645 dest->place_exp_first = src->place_exp_first;
648 dest->place_exp_last = src->place_exp_last;
653 dest->max_router_iterations = src->max_router_iterations;
656 dest->bb_factor = src->bb_factor;
659 dest->initial_pres_fac = src->initial_pres_fac;
662 dest->pres_fac_mult = src->pres_fac_mult;
665 dest->acc_fac = src->acc_fac;
668 dest->first_iter_pres_fac = src->first_iter_pres_fac;
671 dest->bend_cost = src->bend_cost;
674 dest->RouteType = src->RouteType;
679 dest->RouteChanWidth = src->RouteChanWidth;
682 dest->RouterAlgorithm = src->RouterAlgorithm;
685 dest->base_cost_type = src->base_cost_type;
690 dest->astar_fac = src->astar_fac;
693 dest->max_criticality = src->max_criticality;
696 dest->criticality_exp = src->criticality_exp;
715 if (strcmp(*Args, Cur->
Str) == 0) {
737 if (strcmp(*Args, Cur->
Str) == 0) {
751 vpr_printf(TIO_MESSAGE_ERROR,
"Unexpected token '%s' on command line.\n", Token);
753 vpr_printf(TIO_MESSAGE_ERROR,
"Missing token at end of command line.\n");
897 char **PrevArgs = Args;
901 Len = 1 + strlen(*PrevArgs);
902 *PinFile = (
char *)
my_malloc(Len *
sizeof(
char));
903 memcpy(*PinFile, *PrevArgs, Len);
932 if ((**Args >
'9') || (**Args <
'0'))
946 if ((**Args !=
'-') && (**Args !=
'.')
947 && ((**Args >
'9') || (**Args <
'0'))) {
static char ** ReadString(INP char **Args, OUTP char **Val)
void setEchoEnabled(boolean echo_enabled)
int Count[OT_BASE_UNKNOWN]
static void Error(INP const char *Token)
static char ** ReadBaseCostType(INP char **Args, OUTP enum e_base_cost_type *BaseCostType)
boolean IsPostSynthesisEnabled(INP t_options *Options)
static char ** ReadClusterSeed(INP char **Args, OUTP enum e_cluster_seed *Type)
struct s_TokenPair OptionBaseTokenList[]
static char ** ReadPackerAlgorithm(INP char **Args, OUTP enum e_packer_algorithm *Algo)
boolean IsTimingEnabled(INP t_options *Options)
boolean IsEchoEnabled(INP t_options *Options)
static char ** ReadToken(INP char **Args, OUTP enum e_OptionArgToken *Token)
void * my_calloc(size_t nelem, size_t size)
static void MergeOptions(INOUTP t_options *dest, INP t_options *src, int id)
void ReadOptions(INP int argc, INP char **argv, OUTP t_options *Options)
static boolean * echoFileEnabled
static char ** ReadInt(INP char **Args, OUTP int *Val)
static boolean EchoEnabled
boolean getEchoEnabled(void)
void free_output_file_names()
void setAllEchoFileEnabled(boolean value)
static char ** ReadBaseToken(INP char **Args, OUTP enum e_OptionBaseToken *Token)
static void * my_malloc(int ibytes)
static char ** ReadFixPins(INP char **Args, OUTP char **PinFile)
void setOutputFileName(enum e_output_files ename, const char *name, const char *default_name)
boolean isEchoFileEnabled(enum e_echo_files echo_option)
static char ** ReadPlaceAlgorithm(INP char **Args, OUTP enum e_place_algorithm *Algo)
static char ** outputFileNames
struct s_TokenPair OptionArgTokenList[]
static char ** ReadOnOff(INP char **Args, OUTP boolean *Val)
boolean GetPostSynthesisOption(void)
static char ** ProcessOption(INP char **Args, INOUTP t_options *Options)
char * getOutputFileName(enum e_output_files ename)
static char ** echoFileNames
void setEchoFileEnabled(enum e_echo_files echo_option, boolean value)
static char ** ReadRouteType(INP char **Args, OUTP enum e_route_type *Type)
void SetPostSynthesisOption(boolean post_synthesis_enabled)
void free_echo_file_info()
int read_settings_file(char *file_name, char ***outv)
char * getEchoFileName(enum e_echo_files echo_option)
static char ** ReadFloat(INP char **Args, OUTP float *Val)
void alloc_and_load_echo_file_info()
void setEchoFileName(enum e_echo_files echo_option, const char *name)
char * my_strdup(const char *str)
void alloc_and_load_output_file_names(const char *default_name)
static char ** ReadRouterAlgorithm(INP char **Args, OUTP enum e_router_algorithm *Algo)
static boolean Generate_PostSynthesis_Netlist