📄 vpr_types.h
字号:
* rr_node. INTRINSIC_DELAY -> base_cost = intrinsic delay * * of each node. DELAY_NORMALIZED -> base_cost = "demand" * * x average delay to route past 1 CLB. 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_switch_block_type {SUBSET, WILTON, UNIVERSAL};enum e_Fc_type {ABSOLUTE, FRACTIONAL};struct s_det_routing_arch {enum e_Fc_type Fc_type; float Fc_output; float Fc_input; float Fc_pad; enum e_switch_block_type switch_block_type; int num_segment; short num_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. * * 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. */typedef struct {float frequency; int length; short wire_switch; short opin_switch; float frac_cb; float frac_sb; boolean longline; float Rmetal; float Cmetal;} t_segment_inf;/* Lists all the important information about a certain segment type. Only * * used if the route_type is DETAILED. [0 .. det_routing_arch.num_segment] * * frequency: Fraction of tracks which are of this segment type. * * length: Length (in clbs) of the segment. * * wire_switch: Index of the switch type that connects other wires *to* * * this segment. * * opin_switch: Index of the switch type that connects output pins (OPINs) * * *to* this segment. * * frac_cb: The fraction of logic blocks along its length to which this * * segment can connect. (i.e. internal population). * * frac_sb: The fraction of the length + 1 switch blocks along the segment * * to which the segment can connect. Segments that aren't long * * lines must connect to at least two switch boxes. * * Cmetal: Capacitance of a routing track, per unit logic block length. * * Rmetal: Resistance of a routing track, per unit logic block length. */struct s_switch_inf {boolean buffered; float R; float Cin; float Cout; float Tdel;};/* Lists all the important information about a switch type. * * [0 .. det_routing_arch.num_switch] * * buffered: Does this switch include a buffer? * * R: Equivalent resistance of the buffer/switch. * * Cin: Input capacitance. * * Cout: Output capacitance. * * Tdel: Intrinsic delay. The delay through an unloaded switch is * * Tdel + R * Cout. */typedef struct {int length; int start; boolean longline; boolean *sb; boolean *cb; short wire_switch; short opin_switch; float Rmetal; float Cmetal; int index;} t_seg_details;/* Lists detailed information about segmentation. [0 .. W-1]. * * length: length of segment. * * start: index at which a segment starts in channel 0. * * longline: TRUE if this segment spans the entire channel. * * sb: [0..length]: TRUE for every channel intersection, relative to the * * segment start, at which there is a switch box. * * cb: [0..length-1]: TRUE for every logic block along the segment at * * which there is a connection box. * * wire_switch: Index of the switch type that connects other wires *to* * * this segment. * * opin_switch: Index of the switch type that connects output pins (OPINs) * * *to* this segment. * * Cmetal: Capacitance of a routing track, per unit logic block length. * * Rmetal: Resistance of a routing track, per unit logic block length. * * index: index of the segment type used for this track. */typedef struct {float T_comb; float T_seq_in; float T_seq_out;} t_T_subblock;/* Gives the delays through a subblock. * * T_comb: The delay from input to output when the subblock is used in * * combinational mode (clock input is open). * * T_seq_in: The delay from subblock input to storage element when the * * subblock is in sequential mode (clock input not open). The * * delay includes any combinational logic delay (e.g. a LUT) * * done before the signal is latched, plus the setup time. * * T_seq_out: The delay from storage element to subblock output when the * * subblock is in sequential mode. Includes clock_to_Q plus * * any combinational path (muxes, etc.) on the output. */typedef struct {boolean timing_analysis_enabled; float C_ipin_cblock; float T_ipin_cblock; float T_sblk_opin_to_sblk_ipin; float T_clb_ipin_to_sblk_ipin; float T_sblk_opin_to_clb_opin; float T_ipad; float T_opad; t_T_subblock *T_subblock;} t_timing_inf;/* C_ipin_cblock: Capacitance added to a routing track by the isolation * * buffer between a track and the Cblocks at an (i,j) loc. * * T_ipin_cblock: Delay through an input pin connection box (from a * * routing track to a logic block input pin). * * T_sblk_opin_to_sblk_ipin: Delay through the local interconnect * * (muxes, wires or whatever) in a clb containing multiple subblocks. * * That is, the delay from a subblock output to the input of another * * subblock in the same clb. * * T_clb_ipin_to_sblk_ipin: Delay from a clb input pin to any subblock * * input pin (e.g. the mux delay in an Altera 8K clb). * * T_sblk_opin_to_clb_opin: Delay from a subblock output to a clb output. * * Will be 0 in many architectures. * * T_ipad: Delay through an input pad. * * T_opad: Delay through an output pad. * * *T_subblock: Array giving the delay through each subblock. * * [0..max_subblocks_per_block - 1] */struct s_linked_f_pointer {struct s_linked_f_pointer *next; float *fptr;};/* A linked list of float pointers. Used for keeping track of * * which pathcosts in the router have been changed. *//* Uncomment lines below to save some memory, at the cost of debugging ease. *//*enum e_rr_type {SOURCE, SINK, IPIN, OPIN, CHANX, CHANY}; *//* typedef short t_rr_type */typedef enum {SOURCE, SINK, IPIN, OPIN, CHANX, CHANY} t_rr_type;/* Type of a routing resource node. x-directed channel segment, * * y-directed channel segment, input pin to a clb to pad, output * * from a clb or pad (i.e. output pin of a net) and: * * SOURCE: A dummy node that is a logical output within a block * * -- i.e., the gate that generates a signal. * * SINK: A dummy node that is a logical input within a block * * -- i.e. the gate that needs a signal. */struct s_trace {int index; short iswitch; struct s_trace *next;};/* Basic element used to store the traceback (routing) of each net. * * index: Array index (ID) of this routing resource node. * * iswitch: Index of the switch type used to go from this rr_node to * * the next one in the routing. OPEN if there is no next node * * (i.e. this node is the last one (a SINK) in a branch of the * * net's routing). * * next: pointer to the next traceback element in this route. */#define NO_PREVIOUS -1typedef struct {short xlow; short xhigh; short ylow; short yhigh; short ptc_num; short cost_index; short occ; short capacity; short num_edges; t_rr_type type; int *edges; short *switches; float R; float C; } t_rr_node;/* Main structure describing one routing resource node. Everything in * * this structure should describe the graph -- information needed only * * to store algorithm-specific data should be stored in one of the * * parallel rr_node_?? structures. * * * * xlow, xhigh, ylow, yhigh: Integer coordinates (see route.c for * * coordinate system) of the ends of this routing resource. * * xlow = xhigh and ylow = yhigh for pins or for segments of * * length 1. These values are used to decide whether or not this * * node should be added to the expansion heap, based on things * * like whether it's outside the net bounding box or is moving * * further away from the target, etc. * * type: What is this routing resource? * * ptc_num: Pin, track or class number, depending on rr_node type. * * Needed to properly draw. * * cost_index: An integer index into the table of routing resource indexed * * data (this indirection allows quick dynamic changes of rr * * base costs, and some memory storage savings for fields that * * have only a few distinct values). * * occ: Current occupancy (usage) of this node. * * capacity: Capacity of this node (number of routes that can use it). * * num_edges: Number of edges exiting this node. That is, the number * * of nodes to which it connects. * * edges[0..num_edges-1]: Array of indices of the neighbours of this * * node. * * switches[0..num_edges-1]: Array of switch indexes for each of the * * edges leaving this node. * * * * The following parameters are only needed for timing analysis. * * R: Resistance to go through this node. This is only metal * * resistance (end to end, so conservative) -- it doesn't include the * * switch that leads to another rr_node. * * C: Total capacitance of this node. Includes metal capacitance, the * * input capacitance of all switches hanging off the node, the * * output capacitance of all switches to the node, and the connection * * box buffer capacitances hanging off it. */typedef struct {float base_cost; float saved_base_cost; int ortho_cost_index; int seg_index; float inv_length; float T_linear; float T_quadratic; float C_load; } t_rr_indexed_data;/* Data that is pointed to by the .cost_index member of t_rr_node. It's * * purpose is to store the base_cost so that it can be quickly changed * * and to store fields that have only a few different values (like * * seg_index) or whose values should be an average over all rr_nodes of a * * certain type (like T_linear etc., which are used to predict remaining * * delay in the timing_driven router). * * * * base_cost: The basic cost of using an rr_node. * * ortho_cost_index: The index of the type of rr_node that generally * * connects to this type of rr_node, but runs in the * * orthogonal direction (e.g. vertical if the direction * * of this member is horizontal). * * seg_index: Index into segment_inf of this segment type if this type of * * rr_node is an CHANX or CHANY; OPEN (-1) otherwise. * * inv_length: 1/length of this type of segment. * * T_linear: Delay through N segments of this type is N * T_linear + N^2 * * * T_quadratic. For buffered segments all delay is T_linear. * * T_quadratic: Dominant delay for unbuffered segments, 0 for buffered * * segments. * * C_load: Load capacitance seen by the driver for each segment added to * * the chain driven by the driver. 0 for buffered segments. */enum e_cost_indices {SOURCE_COST_INDEX = 0, SINK_COST_INDEX, OPIN_COST_INDEX, IPIN_COST_INDEX, CHANX_COST_INDEX_START};/* Gives the index of the SOURCE, SINK, OPIN, IPIN, etc. member of * * rr_indexed_data. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -