@@ -47,11 +47,15 @@ enum class EdgeDirection
4747
4848struct Segment // A Segment is a 2-pin connection
4949{
50- int16_t x1, y1, x2, y2; // coordinates of two endpoints
51- int16_t Zpoint; // The coordinates of Z point (x for HVH and y for VHV)
52- int8_t cost; // the netID of the net this segment belonging to
53- bool xFirst : 1 ; // route x-direction first (only for L route)
54- bool HVH : 1 ; // TRUE = HVH or false = VHV (only for Z route)
50+ Segment (int16_t x1, int16_t y1, int16_t x2, int16_t y2, int8_t cost)
51+ : x1(x1), y1(y1), x2(x2), y2(y2), cost(cost)
52+ {
53+ }
54+ const int16_t x1, y1, x2, y2; // coordinates of two endpoints (x1 <= x2)
55+ int16_t Zpoint; // The coordinates of Z point (x for HVH and y for VHV)
56+ const int8_t cost; // the netID of the net this segment belonging to
57+ bool xFirst : 1 ; // route x-direction first (only for L route)
58+ bool HVH : 1 ; // TRUE = HVH or false = VHV (only for Z route)
5559};
5660
5761struct FrNet // A Net is a set of connected MazePoints
@@ -61,7 +65,7 @@ struct FrNet // A Net is a set of connected MazePoints
6165 float getSlack () const { return slack_; }
6266 odb::dbNet* getDbNet () const { return db_net_; }
6367 int getDriverIdx () const { return driver_idx_; }
64- int getEdgeCost () const { return edge_cost_; }
68+ int8_t getEdgeCost () const { return edge_cost_; }
6569 const char * getName () const ;
6670 int getMaxLayer () const { return max_layer_; }
6771 int getMinLayer () const { return min_layer_; }
@@ -79,7 +83,7 @@ struct FrNet // A Net is a set of connected MazePoints
7983 void reset (odb::dbNet* db_net,
8084 bool is_clock,
8185 int driver_idx,
82- int edge_cost,
86+ int8_t edge_cost,
8387 int min_layer,
8488 int max_layer,
8589 float slack,
@@ -97,7 +101,7 @@ struct FrNet // A Net is a set of connected MazePoints
97101 bool is_clock_; // flag that indicates if net is a clock net
98102 bool is_critical_;
99103 int driver_idx_;
100- int edge_cost_;
104+ int8_t edge_cost_;
101105 int min_layer_;
102106 int max_layer_;
103107 float slack_;
0 commit comments