VPR-6.0

vpr/SRC/base/vpr_types.h File Reference

#include "arch_types.h"
Include dependency graph for vpr_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hash_logical_nets
struct  s_pb_stats
struct  s_pb
struct  s_logical_block
struct  t_tedge
struct  s_tnode
struct  s_net
struct  s_grid_tile
struct  s_bb
struct  s_place_region
struct  s_block
struct  s_file_name_opts
struct  s_packer_opts
struct  s_annealing_sched
struct  s_placer_opts
struct  s_router_opts
struct  s_det_routing_arch
struct  s_seg_details
struct  s_linked_f_pointer
struct  s_trace
struct  s_rr_node
struct  s_rr_indexed_data
struct  s_TokenPair

Defines

#define DEBUG   1
#define TOKENS   " \t\n"
#define MINOR   0
#define MAJOR   1
#define HUGE_FLOAT   1.e30
#define MAX_SHORT   32767
#define EQUAL_DEF   1e-6
#define HIGH_FANOUT_NET_LIM   64
#define FIRST_ITER_WIRELENTH_LIMIT   0.85
#define EMPTY   -1
#define NO_CLUSTER   -1
#define NEVER_CLUSTER   -2
#define NOT_VALID   -10000
#define UNDEFINED   -1
#define NO_FIXED_CHANNEL_WIDTH   -1
#define NO_PREVIOUS   -1
#define MODEL_LOGIC   "names"
#define MODEL_LATCH   "latch"
#define MODEL_INPUT   "input"
#define MODEL_OUTPUT   "output"

Typedefs

typedef size_t bitfield
typedef struct s_pb_stats t_pb_stats
typedef struct s_pb t_pb
typedef struct s_logical_block t_logical_block
typedef struct s_tnode t_tnode
typedef struct s_block t_block
typedef struct s_seg_details t_seg_details
typedef enum e_rr_type t_rr_type
typedef struct s_rr_node t_rr_node
typedef struct s_rr_indexed_data t_rr_indexed_data

Enumerations

enum  logical_block_types {
  VPACK_INPAD = -2, VPACK_OUTPAD, VPACK_COMB, VPACK_LATCH,
  VPACK_EMPTY
}
enum  e_cluster_seed { VPACK_TIMING, VPACK_MAX_INPUTS }
enum  e_block_pack_status { BLK_PASSED, BLK_FAILED_FEASIBLE, BLK_FAILED_ROUTE, BLK_STATUS_UNDEFINED }
enum  t_tnode_type {
  INPAD_SOURCE, INPAD_OPIN, OUTPAD_IPIN, OUTPAD_SINK,
  CB_IPIN, CB_OPIN, INTERMEDIATE_NODE, PRIMITIVE_IPIN,
  PRIMITIVE_OPIN, FF_IPIN, FF_OPIN, FF_SINK,
  FF_SOURCE, CONSTANT_GEN_SOURCE
}
enum  sched_type { AUTO_SCHED, USER_SCHED }
enum  pic_type { NO_PICTURE, PLACEMENT, ROUTING }
enum  place_c_types { LINEAR_CONG, NONLINEAR_CONG }
enum  e_operation { RUN_FLOW, TIMING_ANALYSIS_ONLY }
enum  pfreq { PLACE_NEVER, PLACE_ONCE, PLACE_ALWAYS }
enum  e_pad_loc_type { FREE, RANDOM, USER }
enum  e_packer_algorithm { PACK_GREEDY, PACK_BRUTE_FORCE }
enum  e_place_algorithm { BOUNDING_BOX_PLACE, NET_TIMING_DRIVEN_PLACE, PATH_TIMING_DRIVEN_PLACE }
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 }
enum  e_drivers { MULTI_BUFFERED, SINGLE }
enum  e_direction { INC_DIRECTION = 0, DEC_DIRECTION = 1, BI_DIRECTION = 2 }
enum  e_rr_type {
  SOURCE = 0, SINK, IPIN, OPIN,
  CHANX, CHANY, INTRA_CLUSTER_EDGE, NUM_RR_TYPES
}
enum  e_cost_indices {
  SOURCE_COST_INDEX = 0, SINK_COST_INDEX, OPIN_COST_INDEX, IPIN_COST_INDEX,
  CHANX_COST_INDEX_START
}

Detailed Description

This file contains the major data types used by VPR

This document is divided into generally 4 major sections:

1. Global data types and constants 2. Packing specific data types 3. Placement specific data types 4. Routing specific data types

Definition in file vpr_types.h.


Define Documentation

#define DEBUG   1

Definition at line 25 of file vpr_types.h.

#define EMPTY   -1

Definition at line 66 of file vpr_types.h.

#define EQUAL_DEF   1e-6

used in some if == equations to allow very close values to be considered equal

Definition at line 59 of file vpr_types.h.

#define FIRST_ITER_WIRELENTH_LIMIT   0.85

If used wirelength exceeds this value in first iteration of routing, do not route

Definition at line 64 of file vpr_types.h.

#define HIGH_FANOUT_NET_LIM   64

All nets with this number of sinks or more are considered high fanout nets

Definition at line 62 of file vpr_types.h.

#define HUGE_FLOAT   1.e30

Definition at line 55 of file vpr_types.h.

#define MAJOR   1

Definition at line 53 of file vpr_types.h.

#define MAX_SHORT   32767

Definition at line 57 of file vpr_types.h.

#define MINOR   0

For update_screen. Denotes importance of update.

Definition at line 52 of file vpr_types.h.

#define MODEL_INPUT   "input"

Built-in library models

Definition at line 222 of file vpr_types.h.

#define MODEL_LATCH   "latch"

Built-in library models

Definition at line 221 of file vpr_types.h.

#define MODEL_LOGIC   "names"

Built-in library models

Definition at line 220 of file vpr_types.h.

#define MODEL_OUTPUT   "output"

Built-in library models

Definition at line 223 of file vpr_types.h.

#define NEVER_CLUSTER   -2

Definition at line 75 of file vpr_types.h.

#define NO_CLUSTER   -1

Definition at line 74 of file vpr_types.h.

#define NO_FIXED_CHANNEL_WIDTH   -1

Definition at line 545 of file vpr_types.h.

#define NO_PREVIOUS   -1

Definition at line 748 of file vpr_types.h.

#define NOT_VALID   -10000

Marks gains that aren't valid Ensure no gain can ever be this negative!

Definition at line 76 of file vpr_types.h.

#define TOKENS   " \t\n"

Input file parsing.

Definition at line 46 of file vpr_types.h.

#define UNDEFINED   -1

Definition at line 79 of file vpr_types.h.


Typedef Documentation

typedef size_t bitfield

< Prints all sorts of intermediate data

Definition at line 50 of file vpr_types.h.

typedef struct s_block t_block

Definition at line 417 of file vpr_types.h.

Definition at line 216 of file vpr_types.h.

typedef struct s_pb t_pb

Definition at line 185 of file vpr_types.h.

typedef struct s_pb_stats t_pb_stats

Definition at line 159 of file vpr_types.h.

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.
typedef struct s_rr_node 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.
  • direction: if the node represents a track, this field indicates the direction of the track. Otherwise the value contained in the field should be ignored. (UDSD by AY)
  • drivers: if the node represents a track, this field indicates the driving architecture of the track. Otherwise the value contained in the field should be ignored. (UDSD by AY)
typedef enum e_rr_type 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.
typedef struct s_seg_details 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.
  • direction: The direction of a routing track. (UDSD by AY)
  • drivers: How do signals driving a routing track connect to the track? (UDSD by AY)
  • index: index of the segment type used for this track.
typedef struct s_tnode t_tnode

Definition at line 295 of file vpr_types.h.


Enumeration Type Documentation

Enumerator:
INTRINSIC_DELAY 
DELAY_NORMALIZED 
DEMAND_ONLY 

Definition at line 542 of file vpr_types.h.

Enumerator:
BLK_PASSED 
BLK_FAILED_FEASIBLE 
BLK_FAILED_ROUTE 
BLK_STATUS_UNDEFINED 

Definition at line 105 of file vpr_types.h.

Selection algorithm for selecting next seed

Enumerator:
VPACK_TIMING 
VPACK_MAX_INPUTS 

Definition at line 92 of file vpr_types.h.

Gives the index of the SOURCE, SINK, OPIN, IPIN, etc. member of rr_indexed_data.

Enumerator:
SOURCE_COST_INDEX 
SINK_COST_INDEX 
OPIN_COST_INDEX 
IPIN_COST_INDEX 
CHANX_COST_INDEX_START 

Definition at line 869 of file vpr_types.h.

Enumerator:
INC_DIRECTION 
DEC_DIRECTION 
BI_DIRECTION 

Definition at line 658 of file vpr_types.h.

{
    INC_DIRECTION = 0,
    DEC_DIRECTION = 1,
    BI_DIRECTION = 2
};                              /* UDSD by AY */
enum e_drivers
Enumerator:
MULTI_BUFFERED 
SINGLE 

Definition at line 655 of file vpr_types.h.

{ MULTI_BUFFERED, SINGLE }; /* legacy routing drivers by Andy Ye (remove or integrate in future) */

Map netlist to FPGA or timing analyze only

Enumerator:
RUN_FLOW 
TIMING_ANALYSIS_ONLY 

Definition at line 317 of file vpr_types.h.

Enumerator:
PACK_GREEDY 
PACK_BRUTE_FORCE 

Definition at line 434 of file vpr_types.h.

Are the pads free to be moved, locked in a random configuration, or locked in user-specified positions?

Enumerator:
FREE 
RANDOM 
USER 

Definition at line 328 of file vpr_types.h.

{ FREE, RANDOM, USER };
Enumerator:
BOUNDING_BOX_PLACE 
NET_TIMING_DRIVEN_PLACE 
PATH_TIMING_DRIVEN_PLACE 

Definition at line 481 of file vpr_types.h.

Enumerator:
GLOBAL 
DETAILED 

Definition at line 538 of file vpr_types.h.

Enumerator:
BREADTH_FIRST 
TIMING_DRIVEN 
DIRECTED_SEARCH 

Definition at line 540 of file vpr_types.h.

enum e_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.
Enumerator:
SOURCE 
SINK 
IPIN 
OPIN 
CHANX 
CHANY 
INTRA_CLUSTER_EDGE 
NUM_RR_TYPES 

Definition at line 726 of file vpr_types.h.

netlist blocks are assigned one of these types

Enumerator:
VPACK_INPAD 
VPACK_OUTPAD 
VPACK_COMB 
VPACK_LATCH 
VPACK_EMPTY 

Definition at line 84 of file vpr_types.h.

enum pfreq
Enumerator:
PLACE_NEVER 
PLACE_ONCE 
PLACE_ALWAYS 

Definition at line 321 of file vpr_types.h.

enum pic_type

What's on screen?

Enumerator:
NO_PICTURE 
PLACEMENT 
ROUTING 

Definition at line 308 of file vpr_types.h.

For the placer. Different types of cost functions that can be used. Nonlinear placement is deprecated

Enumerator:
LINEAR_CONG 
NONLINEAR_CONG 

Definition at line 313 of file vpr_types.h.

enum sched_type

Annealing schedule

Enumerator:
AUTO_SCHED 
USER_SCHED 

Definition at line 304 of file vpr_types.h.

  • type: What is this tnode? (Pad pin, clb pin, subblock pin, etc.)
  • ipin: Number of the CLB or subblock pin this tnode represents, if applicable.
  • isubblk: Number of the subblock this tnode is part of, if applicable.
  • iblk: Number of the block (CLB or PAD) this tnode is part of.
Enumerator:
INPAD_SOURCE 
INPAD_OPIN 
OUTPAD_IPIN 
OUTPAD_SINK 
CB_IPIN 
CB_OPIN 
INTERMEDIATE_NODE 
PRIMITIVE_IPIN 
PRIMITIVE_OPIN 
FF_IPIN 
FF_OPIN 
FF_SINK 
FF_SOURCE 
CONSTANT_GEN_SOURCE 

Definition at line 249 of file vpr_types.h.