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

📄 vpr_types.h

📁 用c++写的用于FPGA设计中布图布线的工具源码
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifndef SPEC#define DEBUG 1     /* Echoes input & checks error conditions */                    /* Only causes about a 1% speed degradation in V 3.10 */#endif/*#define PRINT_SINK_DELAYS*/ /*prints the sink delays to files*//*#define PRINT_NET_SLACKS*/ /*prints out all slacks in the circuit*//*#define PRINT_PLACE_CRIT_PATH*/ /*prints out placement estimated critical path*//*#define PRINT_NET_DELAYS*/ /*prints out delays for all connections*//*#define PRINT_TIMING_GRAPH*/ /*prints out the timing graph */#ifdef SPEC#define NO_GRAPHICS    /* Rips out graphics (for non-X11 systems)      */#define NDEBUG         /* Turns off assertion checking for extra speed */#endif#define TOKENS " \t\n"   /* Input file parsing. *//*#define VERBOSE 1*/      /* Prints all sorts of intermediate data *//* Block Types */enum e_block_types {CLB, OUTPAD, INPAD, IO, ILLEGAL};enum e_pin_type {OPEN = -1, DRIVER = 0, RECEIVER = 1};/* Pin is unconnected, driving a net or in the fanout, respectively. */enum e_side {TOP = 0, BOTTOM = 1, LEFT = 2, RIGHT = 3};#define MINOR 0  /* For update_screen.  Denotes importance of update. */#define MAJOR 1#define HUGE_FLOAT 1.e30/* Want to avoid overflows of shorts.  OPINs can have edges to 4 * width if  * * they are on all 4 sides, so set MAX_CHANNEL_WIDTH to 8000.                */#define MAX_CHANNEL_WIDTH 8000#define MAX_SHORT 32767enum sched_type {AUTO_SCHED, USER_SCHED};   /* Annealing schedule */enum pic_type {NO_PICTURE, PLACEMENT, ROUTING};  /* What's on screen? *//* For the placer.  Different types of cost functions that can be used. */enum place_c_types {LINEAR_CONG, NONLINEAR_CONG};enum e_operation {PLACE_AND_ROUTE, PLACE_ONLY, ROUTE_ONLY,                   TIMING_ANALYSIS_ONLY};enum pfreq {PLACE_NEVER, PLACE_ONCE, PLACE_ALWAYS};/* Are the pads free to be moved, locked in a random configuration, or * * locked in user-specified positions?                                 */enum e_pad_loc_type {FREE, RANDOM, USER};                                struct s_net {char *name; int num_pins; int *blocks; int *blk_pin; };/* name:  ASCII net name for informative annotations in the output.          * * num_pins:  Number of pins on this net.                                    * * blocks: [0..num_pins-1]. Contains the blocks to which the pins of this    * *         net connect.  Output in pins[0], inputs in other entries.         * * blk_pin: [0..num_pins-1]. Contains the number of the pin (on a block) to  * *          which each net terminal connects.  Since I/O pads have only one  * *          pin, I set blk_pin to OPEN for them (it should only be used for  * *          clb pins).  For clbs, it is the block pin number, as expected.   */struct s_block {char *name; enum e_block_types type; int *nets; int x;        int y;}; /* name:  Taken from the net which it drives.                        * * type:  CLB, INPAD or OUTPAD                                       * * nets[]:  List of nets connected to this block.  If nets[i] = OPEN *            no net is connected to pin i.                            * * x,y:  physical location of the placed block.                      */ struct s_clb {enum e_block_types type; int occ; union { int block;           int *io_blocks;} u;};/* type: CLB, IO or ILLEGAL.                                         * * occ:  number of logical blocks in this physical group.            * * u.block: number of the block occupying this group if it is a CLB. * * u.io_blocks[]: numbers of other blocks occupying groups (for      * *                IO's), up to u.io_blocks[occ - 1]                   */struct s_bb {int xmin; int xmax; int ymin; int ymax;};/* Stores the bounding box of a net in terms of the minimum and  * * maximum coordinates of the blocks forming the net, clipped to * * the region (1..nx, 1..ny).                                    */enum e_stat {UNIFORM, GAUSSIAN, PULSE, DELTA};typedef struct {enum e_stat type; float peak; float width; float xpeak;          float dc; } t_chan;/* Width is standard dev. for Gaussian.  xpeak is where peak     * * occurs. dc is the dc offset for Gaussian and pulse waveforms. */typedef struct {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;};   /* 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.                       */typedef struct {char *name; int output; int clock; int *inputs;} 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. */typedef struct {t_subblock **subblock_inf; int *num_subblocks_per_block;        int max_subblocks_per_block; int subblock_lut_size; int num_ff;        int num_const_gen; struct s_linked_vptr *chunk_head_ptr;}         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.  0 for IOs, between 1 and max_subblocks_per_block * *                  for CLBs.                                                * * max_subblocks_per_block:  Maximum number of subblocks any logic block can * *                           have.                                           * * subblock_lut_size:  Number of inputs to each subblock LUT.                * * 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.    * * chunk_head_ptr: Points to the start of the list of memory chunks used for * *                 subblock storage.  Needed to free the subblock data.      */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;       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};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;}; /* 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   *

⌨️ 快捷键说明

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