@@ -47,12 +47,11 @@ enum class EdgeDirection
4747
4848struct Segment // A Segment is a 2-pin connection
4949{
50- bool xFirst; // route x-direction first (only for L route)
51- bool HVH; // TRUE = HVH or false = VHV (only for Z route)
52-
5350 int16_t x1, y1, x2, y2; // coordinates of two endpoints
54- int netID; // the netID of the net this segment belonging to
55- int16_t Zpoint; // The coordinates of Z point (x for HVH and y for VHV)
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)
5655};
5756
5857struct FrNet // A Net is a set of connected MazePoints
@@ -67,7 +66,7 @@ struct FrNet // A Net is a set of connected MazePoints
6766 int getMaxLayer () const { return max_layer_; }
6867 int getMinLayer () const { return min_layer_; }
6968 int getNumPins () const { return pin_x_.size (); }
70- int getLayerEdgeCost (int layer) const ;
69+ int8_t getLayerEdgeCost (int layer) const ;
7170
7271 int getPinX (int idx) const { return pin_x_[idx]; }
7372 int getPinY (int idx) const { return pin_y_[idx]; }
@@ -84,7 +83,7 @@ struct FrNet // A Net is a set of connected MazePoints
8483 int min_layer,
8584 int max_layer,
8685 float slack,
87- std::vector<int >* edge_cost_per_layer);
86+ std::vector<int8_t >* edge_cost_per_layer);
8887 void setMaxLayer (int max_layer) { max_layer_ = max_layer; }
8988 void setMinLayer (int min_layer) { min_layer_ = min_layer; }
9089 void setSlack (float slack) { slack_ = slack; }
@@ -103,7 +102,7 @@ struct FrNet // A Net is a set of connected MazePoints
103102 int max_layer_;
104103 float slack_;
105104 // Non-null when an NDR has been applied to the net.
106- std::unique_ptr<std::vector<int >> edge_cost_per_layer_;
105+ std::unique_ptr<std::vector<int8_t >> edge_cost_per_layer_;
107106};
108107
109108struct Edge // An Edge is the routing track holder between two adjacent
0 commit comments