📄 vpr_types.h
字号:
typedef struct s_chan_width_dist{ float chan_width_io; t_chan chan_x_dist; t_chan chan_y_dist;}t_chan_width_dist;/* chan_width_io: The relative width of the I/O channel between the pads * * and logic array. * * chan_x_dist: Describes the x-directed channel width distribution. * * chan_y_dist: Describes the y-directed channel width distribution. */struct s_class{ enum e_pin_type type; int num_pins; int *pinlist;};typedef struct s_class t_class;/* type: DRIVER or RECEIVER (what is this pinclass?) * * num_pins: The number of logically equivalent pins forming this * * class. * * pinlist[]: List of clb pin numbers which belong to this class. */struct s_place_region{ float capacity; float inv_capacity; float occupancy; float cost;};/* capacity: Capacity of this region, in tracks. * * occupancy: Expected number of tracks that will be occupied. * * cost: Current cost of this usage. */struct s_subblock{ char *name; int clock; int *outputs; int *inputs;};typedef struct s_subblock t_subblock;/* This structure stores the contents of each logic block, in terms * * of the basic LUTs that make up the cluster. This information is * * used only for timing analysis. Note that it is possible to * * describe essentially arbitrary timing patterns inside a logic * * block via the correct pattern of LUTs. * * name: Name of this subblock. * * output: Number of the clb pin which the LUT output drives, or OPEN * * clock: Number of clb pin that drives the clock (or OPEN) * * inputs: [0..sub_block_lut_size-1]. Number of clb pin that drives * * this input, or number of subblock output + pins_per_clb if * * this pin is driven by a subblock output, or OPEN if unused. */struct s_subblock_data{ t_subblock **subblock_inf; int *num_subblocks_per_block; int num_ff; int num_const_gen;};typedef struct s_subblock_data t_subblock_data;/* This structure contains all the information relevant to subblocks (what's * * in each logic block). This makes it easy to pass around the subblock * * data all at once. This stuff is used only for timing analysis. * * subblock_inf: [0..num_blocks-1][0..num_subblock_per_block[iblk]-1]. * * Contents of each logic block. Not valid for IO blocks. * * num_subblock_per_block: [0..num_blocks-1]. Number of subblocks in each * * block. Between 0 and type->max_subblocks * * num_ff: Number of flip flops in the input netlist (i.e. clocked sblks). * * num_const_gen: Number of subblock constant generators in the netlist. */struct s_annealing_sched{ enum sched_type type; float inner_num; float init_t; float alpha_t; float exit_t;};/* Annealing schedule information for the placer. The schedule type * * is either USER_SCHED or AUTO_SCHED. Inner_num is multiplied by * * num_blocks^4/3 to find the number of moves per temperature. The * * remaining information is used only for USER_SCHED, and have the * * obvious meanings. */enum e_place_algorithm{ BOUNDING_BOX_PLACE, NET_TIMING_DRIVEN_PLACE, PATH_TIMING_DRIVEN_PLACE};struct s_placer_opts{ enum e_place_algorithm place_algorithm; float timing_tradeoff; int block_dist; enum place_c_types place_cost_type; float place_cost_exp; int place_chan_width; enum e_pad_loc_type pad_loc_type; char *pad_loc_file; enum pfreq place_freq; int num_regions; int recompute_crit_iter; boolean enable_timing_computations; int inner_loop_recompute_divider; float td_place_exp_first; int seed; float td_place_exp_last;};/* Various options for the placer. * * place_algorithm: BOUNDING_BOX_PLACE or NET_TIMING_DRIVEN_PLACE, or * * PATH_TIMING_DRIVEN_PLACE * * timing_tradeoff: When TIMING_DRIVEN_PLACE mode, what is the tradeoff * * timing driven and BOUNDING_BOX_PLACE. * * block_dist: Initial guess of how far apart blocks on the critical path * * This is used to compute the initial slacks and criticalities * * place_cost_type: LINEAR_CONG or NONLINEAR_CONG. * * place_cost_exp: Power to which denominator is raised for linear_cong. * * place_chan_width: The channel width assumed if only one placement is * * performed. * * pad_loc_type: Are pins FREE, fixed randomly, or fixed from a file. * * pad_loc_file: File to read pin locations form if pad_loc_type * * is USER. * * place_freq: Should the placement be skipped, done once, or done for each * * channel width in the binary search. * * num_regions: Used only with NONLINEAR_CONG; in that case, congestion is * * computed on an array of num_regions x num_regions basis. * * recompute_crit_iter: how many temperature stages pass before we recompute * * criticalities based on average point to point delay * * enable_timing_computations: in bounding_box mode, normally, timing * * information is not produced, this causes the information * * to be computed. in *_TIMING_DRIVEN modes, this has no effect* * inner_loop_crit_divider: (move_lim/inner_loop_crit_divider) determines how* * many inner_loop iterations pass before a recompute of * * criticalities is done. * * td_place_exp_first: exponent that is used on the timing_driven criticlity * * it is the value that the exponent starts at. * * td_place_exp_last: value that the criticality exponent will be at the end */enum e_route_type{ GLOBAL, DETAILED };enum e_router_algorithm{ BREADTH_FIRST, TIMING_DRIVEN, DIRECTED_SEARCH };enum e_base_cost_type{ INTRINSIC_DELAY, DELAY_NORMALIZED, DEMAND_ONLY };#define NO_FIXED_CHANNEL_WIDTH -1struct s_router_opts{ float first_iter_pres_fac; float initial_pres_fac; float pres_fac_mult; float acc_fac; float bend_cost; int max_router_iterations; int bb_factor; enum e_route_type route_type; int fixed_channel_width; enum e_router_algorithm router_algorithm; enum e_base_cost_type base_cost_type; float astar_fac; float max_criticality; float criticality_exp; boolean verify_binary_search; boolean full_stats;};/* All the parameters controlling the router's operation are in this * * structure. * * first_iter_pres_fac: Present sharing penalty factor used for the * * very first (congestion mapping) Pathfinder iteration. * * initial_pres_fac: Initial present sharing penalty factor for * * Pathfinder; used to set pres_fac on 2nd iteration. * * pres_fac_mult: Amount by which pres_fac is multiplied each * * routing iteration. * * acc_fac: Historical congestion cost multiplier. Used unchanged * * for all iterations. * * bend_cost: Cost of a bend (usually non-zero only for global routing). * * max_router_iterations: Maximum number of iterations before giving * * up. * * bb_factor: Linear distance a route can go outside the net bounding * * box. * * route_type: GLOBAL or DETAILED. * * fixed_channel_width: Only attempt to route the design once, with the * * channel width given. If this variable is * * == NO_FIXED_CHANNEL_WIDTH, do a binary search * * on channel width. * * router_algorithm: BREADTH_FIRST or TIMING_DRIVEN. Selects the desired * * routing algorithm. * * base_cost_type: Specifies how to compute the base cost of each type of * * rr_node. INTRINSIC_DELAY -> base_cost = intrinsic delay * * of each node. DELAY_NORMALIZED -> base_cost = "demand" * * x average delay to route past 1 FB. DEMAND_ONLY -> * * expected demand of this node (old breadth-first costs). * * * * The following parameters are used only by the timing-driven router. * * * * astar_fac: Factor (alpha) used to weight expected future costs to * * target in the timing_driven router. astar_fac = 0 leads to * * an essentially breadth-first search, astar_fac = 1 is near * * the usual astar algorithm and astar_fac > 1 are more * * aggressive. * * max_criticality: The maximum criticality factor (from 0 to 1) any sink * * will ever have (i.e. clip criticality to this number). * * criticality_exp: Set criticality to (path_length(sink) / longest_path) ^ * * criticality_exp (then clip to max_criticality). */enum e_directionality{ UNI_DIRECTIONAL, BI_DIRECTIONAL }; /* UDSD by AY */enum e_switch_block_type{ SUBSET, WILTON, UNIVERSAL, FULL }; /* UDSD Modifications by WMF */typedef enum e_switch_block_type t_switch_block_type;enum e_Fc_type{ ABSOLUTE, FRACTIONAL };struct s_det_routing_arch{ enum e_directionality directionality; /* UDSD by AY */ int Fs; enum e_switch_block_type switch_block_type; int num_segment; short num_switch; short global_route_switch; short delayless_switch; short wire_to_ipin_switch; float R_minW_nmos; float R_minW_pmos;};/* Defines the detailed routing architecture of the FPGA. Only important * * if the route_type is DETAILED. * * (UDSD by AY) directionality: Should the tracks be uni-directional or * * bi-directional? * * Fc_type: Are the Fc values below absolute numbers, or fractions of W? * * Fc_output: Number of tracks to which each clb output pin connect in * * each channel to which it is adjacent. * * Fc_input: Number of tracks to which each clb input pin connects. * * Fc_pad: Number of tracks to which each I/O pad connects. * * switch_block_type: Pattern of switches at each switch block. I * * assume Fs is always 3. If the type is SUBSET, I use a * * Xilinx-like switch block where track i in one channel always * * connects to track i in other channels. If type is WILTON, * * I use a switch block where track i does not always connect * * to track i in other channels. See Steve Wilton, Phd Thesis, * * University of Toronto, 1996. The UNIVERSAL switch block is * * from Y. W. Chang et al, TODAES, Jan. 1996, pp. 80 - 101. * * num_segment: Number of distinct segment types in the FPGA. * * num_switch: Number of distinct switch types (pass transistors or * * buffers) in the FPGA. * * delayless_switch: Index of a zero delay switch (used to connect things * * that should have no delay). * * wire_to_ipin_switch: Index of a switch used to connect wire segments * * to clb or pad input pins (IPINs). * * R_minW_nmos: Resistance (in Ohms) of a minimum width nmos transistor. * * Used only in the FPGA area model. * * R_minW_pmos: Resistance (in Ohms) of a minimum width pmos transistor. */enum e_drivers{ MULTI_BUFFERED, MULTI_MUXED, MULTI_MERGED, SINGLE }; /* UDSD by AY */typedef struct s_segment_inf{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -