#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "util.h"
#include "vpr_types.h"
#include "globals.h"
#include "graphics.h"
#include "read_netlist.h"
#include "print_netlist.h"
#include "draw.h"
#include "place_and_route.h"
#include "stats.h"
#include "path_delay.h"
#include "OptionTokens.h"
#include "ReadOptions.h"
#include "xml_arch.h"
#include "SetupVPR.h"
#include "rr_graph.h"
Go to the source code of this file.
Functions | |
static void | PrintUsage () |
static void | PrintTitle () |
static void | freeArch (t_arch *Arch) |
int | main (int argc, char **argv) |
Variables | |
int | Fs_seed = -1 |
boolean | WMF_DEBUG = FALSE |
int | W_seed = -1 |
int | binary_search = -1 |
char * | OutFilePrefix = NULL |
float | grid_logic_tile_area = 0 |
float | ipin_mux_trans_size = 0 |
int | num_nets = 0 |
struct s_net * | net = NULL |
int | num_blocks = 0 |
struct s_block * | block = NULL |
int | num_types = 0 |
struct s_type_descriptor * | type_descriptors = NULL |
t_type_ptr | IO_TYPE = NULL |
t_type_ptr | EMPTY_TYPE = NULL |
t_type_ptr | FILL_TYPE = NULL |
int | nx = 0 |
int | ny = 0 |
int * | chan_width_x = NULL |
int * | chan_width_y = NULL |
struct s_grid_tile ** | grid = NULL |
struct s_trace ** | trace_head = NULL |
struct s_trace ** | trace_tail = NULL |
int | num_rr_nodes = 0 |
t_rr_node * | rr_node = NULL |
t_ivec *** | rr_node_indices = NULL |
int | num_rr_indexed_data = 0 |
t_rr_indexed_data * | rr_indexed_data = NULL |
int ** | net_rr_terminals = NULL |
struct s_switch_inf * | switch_inf = NULL |
int ** | rr_blk_source = NULL |
static void freeArch | ( | t_arch * | Arch | ) | [static] |
Definition at line 258 of file main.c.
00259 { 00260 int i; 00261 for(i = 0; i < Arch->num_switches; i++) { 00262 if(Arch->Switches->name != NULL) { 00263 free(Arch->Switches[i].name); 00264 } 00265 } 00266 free(Arch->Switches); 00267 for(i = 0; i < Arch->num_segments; i++) { 00268 if(Arch->Segments->cb != NULL) { 00269 free(Arch->Segments[i].cb); 00270 } 00271 if(Arch->Segments->sb != NULL) { 00272 free(Arch->Segments[i].sb); 00273 } 00274 } 00275 free(Arch->Segments); 00276 }
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 108 of file main.c.
00110 { 00111 t_options Options; 00112 t_arch Arch = { 0 }; 00113 00114 enum e_operation Operation; 00115 struct s_placer_opts PlacerOpts; 00116 struct s_annealing_sched AnnealSched; 00117 struct s_router_opts RouterOpts; 00118 struct s_det_routing_arch RoutingArch; 00119 t_segment_inf *Segments; 00120 t_timing_inf Timing; 00121 t_subblock_data Subblocks; 00122 boolean ShowGraphics; 00123 boolean TimingEnabled; 00124 int GraphPause; 00125 00126 00127 /* Print title message */ 00128 PrintTitle(); 00129 00130 /* Print usage message if no args */ 00131 if(argc < 2) 00132 { 00133 PrintUsage(); 00134 exit(1); 00135 } 00136 00137 /* Read in available inputs */ 00138 ReadOptions(argc, argv, &Options); 00139 00140 /* Determine whether timing is on or off */ 00141 TimingEnabled = IsTimingEnabled(Options); 00142 00143 /* Use inputs to configure VPR */ 00144 SetupVPR(Options, TimingEnabled, &Arch, &Operation, &PlacerOpts, 00145 &AnnealSched, &RouterOpts, &RoutingArch, &Segments, 00146 &Timing, &Subblocks, &ShowGraphics, &GraphPause); 00147 00148 /* Check inputs are reasonable */ 00149 CheckOptions(Options, TimingEnabled); 00150 CheckArch(Arch, TimingEnabled); 00151 00152 /* Verify settings don't conflict or otherwise not make sense */ 00153 CheckSetup(Operation, PlacerOpts, AnnealSched, RouterOpts, 00154 RoutingArch, Segments, Timing, Subblocks, Arch.Chans); 00155 00156 /* Output the current settings to console. */ 00157 ShowSetup(Options, Arch, TimingEnabled, Operation, PlacerOpts, 00158 AnnealSched, RouterOpts, RoutingArch, Segments, Timing, 00159 Subblocks); 00160 00161 if(Operation == TIMING_ANALYSIS_ONLY) { 00162 do_constant_net_delay_timing_analysis( 00163 Timing, Subblocks, Options.constant_net_delay); 00164 return 0; 00165 } 00166 00167 /* Startup X graphics */ 00168 set_graphics_state(ShowGraphics, GraphPause, RouterOpts.route_type); 00169 if(ShowGraphics) 00170 { 00171 init_graphics("VPR: Versatile Place and Route for FPGAs"); 00172 alloc_draw_structs(); 00173 } 00174 00175 /* Do the actual operation */ 00176 place_and_route(Operation, PlacerOpts, Options.PlaceFile, 00177 Options.NetFile, Options.ArchFile, Options.RouteFile, 00178 AnnealSched, RouterOpts, RoutingArch, 00179 Segments, Timing, &Subblocks, Arch.Chans); 00180 00181 /* Close down X Display */ 00182 if(ShowGraphics) 00183 close_graphics(); 00184 00185 /* free data structures */ 00186 free(Options.PlaceFile); 00187 free(Options.NetFile); 00188 free(Options.ArchFile); 00189 free(Options.RouteFile); 00190 00191 freeArch(&Arch); 00192 00193 /* Return 0 to single success to scripts */ 00194 return 0; 00195 }
static void PrintTitle | ( | ) | [static] |
Definition at line 243 of file main.c.
00244 { 00245 puts(""); 00246 puts("VPR FPGA Placement and Routing."); 00247 puts("Version: Version 5.0.2"); 00248 puts("Compiled: " __DATE__ "."); 00249 puts("Original VPR by V. Betz."); 00250 puts("Timing-driven placement enhancements by A. Marquardt."); 00251 puts("Single-drivers enhancements by Andy Ye with additions by."); 00252 puts("Mark Fang, Jason Luu, Ted Campbell"); 00253 puts("Heterogeneous stucture support by Jason Luu and Ted Campbell."); 00254 puts("This code is licensed only for non-commercial use."); 00255 puts(""); 00256 }
static void PrintUsage | ( | ) | [static] |
Definition at line 201 of file main.c.
00202 { 00203 puts("Usage: vpr circuit.net fpga.arch placed.out routed.out [Options ...]"); 00204 puts(""); 00205 puts("General Options: [-nodisp] [-auto <int>] [-route_only]"); 00206 puts("\t[-place_only] [-timing_analyze_only_with_net_delay <float>]"); 00207 puts("\t[-fast] [-full_stats] [-timing_analysis on | off] [-outfile_prefix <string>]"); 00208 puts(""); 00209 puts("Placer Options:"); 00210 puts("\t[-place_algorithm bounding_box | net_timing_driven | path_timing_driven]"); 00211 puts("\t[-init_t <float>] [-exit_t <float>]"); 00212 puts("\t[-alpha_t <float>] [-inner_num <float>] [-seed <int>]"); 00213 puts("\t[-place_cost_exp <float>] [-place_cost_type linear | nonlinear]"); 00214 puts("\t[-place_chan_width <int>] [-num_regions <int>] "); 00215 puts("\t[-fix_pins random | <file.pads>]"); 00216 puts("\t[-enable_timing_computations on | off]"); 00217 puts("\t[-block_dist <int>]"); 00218 puts(""); 00219 puts("Placement Options Valid Only for Timing-Driven Placement:"); 00220 puts("\t[-timing_tradeoff <float>]"); 00221 puts("\t[-recompute_crit_iter <int>]"); 00222 puts("\t[-inner_loop_recompute_divider <int>]"); 00223 puts("\t[-td_place_exp_first <float>]"); 00224 puts("\t[-td_place_exp_last <float>]"); 00225 puts(""); 00226 puts("Router Options: [-max_router_iterations <int>] [-bb_factor <int>]"); 00227 puts("\t[-initial_pres_fac <float>] [-pres_fac_mult <float>]"); 00228 puts("\t[-acc_fac <float>] [-first_iter_pres_fac <float>]"); 00229 puts("\t[-bend_cost <float>] [-route_type global | detailed]"); 00230 puts("\t[-verify_binary_search] [-route_chan_width <int>]"); 00231 puts("\t[-router_algorithm breadth_first | timing_driven]"); 00232 puts("\t[-base_cost_type intrinsic_delay | delay_normalized | demand_only]"); 00233 puts(""); 00234 puts("Routing options valid only for timing-driven routing:"); 00235 puts("\t[-astar_fac <float>] [-max_criticality <float>]"); 00236 puts("\t[-criticality_exp <float>]"); 00237 puts(""); 00238 }
int binary_search = -1 |
int* chan_width_x = NULL |
int* chan_width_y = NULL |
t_type_ptr EMPTY_TYPE = NULL |
t_type_ptr FILL_TYPE = NULL |
struct s_grid_tile** grid = NULL |
float grid_logic_tile_area = 0 |
t_type_ptr IO_TYPE = NULL |
float ipin_mux_trans_size = 0 |
int** net_rr_terminals = NULL |
int num_blocks = 0 |
int num_rr_indexed_data = 0 |
int num_rr_nodes = 0 |
char* OutFilePrefix = NULL |
int** rr_blk_source = NULL |
t_rr_indexed_data* rr_indexed_data = NULL |
t_ivec*** rr_node_indices = NULL |
struct s_switch_inf* switch_inf = NULL |
struct s_trace** trace_head = NULL |
struct s_trace** trace_tail = NULL |
struct s_type_descriptor* type_descriptors = NULL |