52 len = strlen(Options->CircuitName) + 6;
53 if (Options->out_file_prefix != NULL ) {
54 len += strlen(Options->out_file_prefix);
57 if (Options->out_file_prefix == NULL ) {
61 Options->CircuitName);
65 if (Options->BlifFile == NULL ) {
66 len = strlen(Options->CircuitName) + 6;
67 if (Options->out_file_prefix != NULL ) {
68 len += strlen(Options->out_file_prefix);
70 Options->BlifFile = (
char*)
my_calloc(len,
sizeof(
char));
71 if (Options->out_file_prefix == NULL ) {
72 sprintf(Options->BlifFile,
"%s.blif", Options->CircuitName);
74 sprintf(Options->BlifFile,
"%s%s.blif", Options->out_file_prefix,
75 Options->CircuitName);
79 if (Options->NetFile == NULL ) {
80 len = strlen(Options->CircuitName) + 5;
81 if (Options->out_file_prefix != NULL ) {
82 len += strlen(Options->out_file_prefix);
84 Options->NetFile = (
char*)
my_calloc(len,
sizeof(
char));
85 if (Options->out_file_prefix == NULL ) {
86 sprintf(Options->NetFile,
"%s.net", Options->CircuitName);
88 sprintf(Options->NetFile,
"%s%s.net", Options->out_file_prefix,
89 Options->CircuitName);
93 if (Options->PlaceFile == NULL ) {
94 len = strlen(Options->CircuitName) + 7;
95 if (Options->out_file_prefix != NULL ) {
96 len += strlen(Options->out_file_prefix);
98 Options->PlaceFile = (
char*)
my_calloc(len,
sizeof(
char));
99 if (Options->out_file_prefix == NULL ) {
100 sprintf(Options->PlaceFile,
"%s.place", Options->CircuitName);
102 sprintf(Options->PlaceFile,
"%s%s.place", Options->out_file_prefix,
103 Options->CircuitName);
107 if (Options->RouteFile == NULL ) {
108 len = strlen(Options->CircuitName) + 7;
109 if (Options->out_file_prefix != NULL ) {
110 len += strlen(Options->out_file_prefix);
112 Options->RouteFile = (
char*)
my_calloc(len,
sizeof(
char));
113 if (Options->out_file_prefix == NULL ) {
114 sprintf(Options->RouteFile,
"%s.route", Options->CircuitName);
116 sprintf(Options->RouteFile,
"%s%s.route", Options->out_file_prefix,
117 Options->CircuitName);
120 if (Options->ActFile == NULL ) {
121 len = strlen(Options->CircuitName) + 7;
122 if (Options->out_file_prefix != NULL ) {
123 len += strlen(Options->out_file_prefix);
125 Options->ActFile = (
char*)
my_calloc(len,
sizeof(
char));
126 if (Options->out_file_prefix == NULL ) {
127 sprintf(Options->ActFile,
"%s.act", Options->CircuitName);
129 sprintf(Options->ActFile,
"%s%s.act", Options->out_file_prefix,
130 Options->CircuitName);
134 if (Options->PowerFile == NULL ) {
135 len = strlen(Options->CircuitName) + 7;
136 if (Options->out_file_prefix != NULL ) {
137 len += strlen(Options->out_file_prefix);
139 Options->PowerFile = (
char*)
my_calloc(len,
sizeof(
char));
140 if (Options->out_file_prefix == NULL ) {
141 sprintf(Options->PowerFile,
"%s.power", Options->CircuitName);
143 sprintf(Options->ActFile,
"%s%s.power", Options->out_file_prefix,
144 Options->CircuitName);
150 FileNameOpts->CircuitName = Options->CircuitName;
151 FileNameOpts->ArchFile = Options->ArchFile;
152 FileNameOpts->BlifFile = Options->BlifFile;
153 FileNameOpts->NetFile = Options->NetFile;
154 FileNameOpts->PlaceFile = Options->PlaceFile;
155 FileNameOpts->RouteFile = Options->RouteFile;
156 FileNameOpts->ActFile = Options->ActFile;
157 FileNameOpts->PowerFile = Options->PowerFile;
158 FileNameOpts->CmosTechFile = Options->CmosTechFile;
159 FileNameOpts->out_file_prefix = Options->out_file_prefix;
167 if (readArchFile ==
TRUE) {
172 *user_models = Arch->models;
173 *library_models = Arch->model_library;
195 *Segments = Arch->Segments;
196 RoutingArch->num_segment = Arch->num_segments;
198 SetupSwitches(*Arch, RoutingArch, Arch->Switches, Arch->num_switches);
200 SetupTiming(*Options, *Arch, TimingEnabled, *Operation, *PlacerOpts,
201 *RouterOpts, Timing);
211 PlacerOpts->seed = 1;
213 PlacerOpts->seed = Options->Seed;
217 vpr_printf(TIO_MESSAGE_INFO,
"Building complex block graph.\n");
226 *GraphPause = Options->GraphPause;
229 *ShowGraphics =
FALSE;
231 *ShowGraphics =
TRUE;
233 *ShowGraphics =
FALSE;
static void SetupTiming(INP t_options Options, INP t_arch Arch, INP boolean TimingEnabled, INP enum e_operation Operation, INP struct s_placer_opts PlacerOpts, INP struct s_router_opts RouterOpts, OUTP t_timing_inf *Timing)
static void SetupRouterOpts(INP t_options Options, INP boolean TimingEnabled, OUTP struct s_router_opts *RouterOpts)
void EchoArch(INP const char *EchoFile, INP const t_type_descriptor *Types, INP int NumTypes, struct s_arch *arch)
void * my_calloc(size_t nelem, size_t size)
static void SetupSwitches(INP t_arch Arch, INOUTP struct s_det_routing_arch *RoutingArch, INP struct s_switch_inf *ArchSwitches, INP int NumArchSwitches)
void alloc_and_load_all_pb_graphs(boolean load_power_structures)
boolean getEchoEnabled(void)
void XmlReadArch(INP const char *ArchFile, INP boolean timing_enabled, OUTP struct s_arch *arch, OUTP t_type_descriptor **Types, OUTP int *NumTypes)
static void SetupAnnealSched(INP t_options Options, OUTP struct s_annealing_sched *AnnealSched)
static void SetupPlacerOpts(INP t_options Options, INP boolean TimingEnabled, OUTP struct s_placer_opts *PlacerOpts)
void echo_pb_graph(char *filename)
char * default_output_name
static void SetupOperation(INP t_options Options, OUTP enum e_operation *Operation)
boolean isEchoFileEnabled(enum e_echo_files echo_option)
static void SetupPackerOpts(INP t_options Options, INP boolean TimingEnabled, INP t_arch Arch, INP char *net_file, OUTP struct s_packer_opts *PackerOpts)
static void SetupPowerOpts(t_options Options, t_power_opts *power_opts, t_arch *Arch)
static void SetupRoutingArch(INP t_arch Arch, OUTP struct s_det_routing_arch *RoutingArch)
float grid_logic_tile_area
struct s_type_descriptor * type_descriptors
char * getEchoFileName(enum e_echo_files echo_option)
void alloc_and_load_output_file_names(const char *default_name)
float ipin_mux_trans_size
void my_srandom(int seed)