@@ -90,15 +90,15 @@ struct DebugPoint {
9090 StringRef comment;
9191};
9292
93- // An OpenPath represents a path from a fan-in with an associated
93+ // An OpenPath represents a path from a start point with an associated
9494// delay and history of debug points.
9595struct OpenPath {
9696 OpenPath (circt::igraph::InstancePath path, Value value, size_t bitPos,
9797 int64_t delay = 0 , llvm::ImmutableList<DebugPoint> history = {})
98- : fanIn (path, value, bitPos), delay(delay), history(history) {}
98+ : startPoint (path, value, bitPos), delay(delay), history(history) {}
9999 OpenPath () = default ;
100100
101- const Object &getFanIn () const { return fanIn ; }
101+ const Object &getStartPoint () const { return startPoint ; }
102102 int64_t getDelay () const { return delay; }
103103 const llvm::ImmutableList<DebugPoint> &getHistory () const { return history; }
104104
@@ -108,54 +108,56 @@ struct OpenPath {
108108 llvm::ImmutableListFactory<DebugPoint> *debugPointFactory,
109109 circt::igraph::InstancePath path);
110110
111- Object fanIn ;
111+ Object startPoint ;
112112 int64_t delay;
113113 // History of debug points represented by linked lists.
114- // The head of the list is the farthest point from the fanIn .
114+ // The head of the list is the farthest point from the start point .
115115 llvm::ImmutableList<DebugPoint> history;
116116};
117117
118- // A DataflowPath represents a complete timing path from a fanout to a fanin
119- // with associated delay information. This is the primary result type for
120- // longest path analysis, containing both endpoints and path history.
118+ // A DataflowPath represents a complete timing path from a end point to a
119+ // start point with associated delay information. This is the primary result
120+ // type for longest path analysis, containing both end points and path history.
121121class DataflowPath {
122122public:
123- // FanOut can be either an internal circuit object or a module output port
123+ // end point can be either an internal circuit object or a module output port
124124 // This flexibility allows representing both closed paths
125125 // (register-to-register) and open paths (register-to-output) in a unified way
126126 using OutputPort = std::tuple<hw::HWModuleOp, size_t , size_t >;
127- using FanOutType = std::variant<Object, OutputPort>;
127+ using EndPointType = std::variant<Object, OutputPort>;
128128
129- // Constructor for paths with Object fanout (internal circuit nodes)
130- DataflowPath (Object fanOut , OpenPath fanIn , hw::HWModuleOp root)
131- : fanOut(fanOut ), path(fanIn ), root(root) {}
129+ // Constructor for paths with Object end point (internal circuit nodes)
130+ DataflowPath (Object endPoint , OpenPath startPoint , hw::HWModuleOp root)
131+ : endPoint(endPoint ), path(startPoint ), root(root) {}
132132
133- // Constructor for paths with port fanout (module output ports)
134- DataflowPath (OutputPort fanOut , OpenPath fanIn , hw::HWModuleOp root)
135- : fanOut(fanOut ), path(fanIn ), root(root) {}
133+ // Constructor for paths with port end point (module output ports)
134+ DataflowPath (OutputPort endPoint , OpenPath startPoint , hw::HWModuleOp root)
135+ : endPoint(endPoint ), path(startPoint ), root(root) {}
136136
137137 DataflowPath () = default ;
138138
139139 int64_t getDelay () const { return path.delay ; }
140- const Object &getFanIn () const { return path.fanIn ; }
141- const FanOutType &getFanOut () const { return fanOut; }
142- const Object &getFanOutAsObject () const { return std::get<Object>(fanOut); }
143- const OutputPort &getFanOutAsPort () const {
144- return std::get<OutputPort>(fanOut);
140+ const Object &getStartPoint () const { return path.startPoint ; }
141+ const EndPointType &getEndPoint () const { return endPoint; }
142+ const Object &getEndPointAsObject () const {
143+ return std::get<Object>(endPoint);
144+ }
145+ const OutputPort &getEndPointAsPort () const {
146+ return std::get<OutputPort>(endPoint);
145147 }
146148 hw::HWModuleOp getRoot () const { return root; }
147149 const llvm::ImmutableList<DebugPoint> &getHistory () const {
148150 return path.history ;
149151 }
150152 const OpenPath &getPath () const { return path; }
151153
152- // Get source location for the fanout point (for diagnostics)
153- Location getFanOutLoc ();
154+ // Get source location for the end point (for diagnostics)
155+ Location getEndPointLoc ();
154156
155157 void setDelay (int64_t delay) { path.delay = delay; }
156158
157159 void print (llvm::raw_ostream &os);
158- void printFanOut (llvm::raw_ostream &os);
160+ void printEndPoint (llvm::raw_ostream &os);
159161
160162 // Path elaboration for hierarchical analysis
161163 // Prepends instance path information to create full hierarchical paths
@@ -165,9 +167,9 @@ class DataflowPath {
165167 circt::igraph::InstancePath path);
166168
167169private:
168- FanOutType fanOut; // Either Object or (port_index, bit_index)
169- OpenPath path; // The actual timing path with history
170- hw::HWModuleOp root; // Root module for this path
170+ EndPointType endPoint; // Either Object or (port_index, bit_index)
171+ OpenPath path; // The actual timing path with history
172+ hw::HWModuleOp root; // Root module for this path
171173};
172174
173175// JSON serialization for DataflowPath
@@ -198,7 +200,7 @@ struct LongestPathAnalysisOptions {
198200 // / are queried. Disables parallel processing.
199201 bool lazyComputation = false ;
200202
201- // / Keep only the maximum delay path per fanout point.
203+ // / Keep only the maximum delay path per end point.
202204 // / Focuses on finding maximum delays, discarding non-critical paths.
203205 // / Significantly faster and uses less memory when only delay bounds
204206 // / are needed rather than complete path enumeration.
@@ -225,7 +227,7 @@ class LongestPathAnalysis {
225227 const LongestPathAnalysisOptions &option = {});
226228 ~LongestPathAnalysis ();
227229
228- // Return all longest paths to each Fanin for the given value and bit
230+ // Return all longest paths to each start point for the given value and bit
229231 // position.
230232 LogicalResult computeGlobalPaths (Value value, size_t bitPos,
231233 SmallVectorImpl<DataflowPath> &results);
@@ -248,7 +250,7 @@ class LongestPathAnalysis {
248250 // typically register-to-register paths. A closed path is a path that starts
249251 // and ends at sequential elements (registers/flip-flops), forming a complete
250252 // timing path through combinational logic. The path may cross module
251- // boundaries but both endpoints are sequential elements, not ports.
253+ // boundaries but both end points are sequential elements, not ports.
252254 LogicalResult getClosedPaths (StringAttr moduleName,
253255 SmallVectorImpl<DataflowPath> &results,
254256 bool elaboratePaths = false ) const ;
@@ -344,8 +346,8 @@ class LongestPathCollection {
344346 // Sort the paths by delay in descending order.
345347 void sortInDescendingOrder ();
346348
347- // Sort and drop all paths except the longest path per fanout point.
348- void sortAndDropNonCriticalPathsPerFanOut ();
349+ // Sort and drop all paths except the longest path per end point.
350+ void sortAndDropNonCriticalPathsPerEndPoint ();
349351
350352 // Merge another collection into this one.
351353 void merge (const LongestPathCollection &other);
0 commit comments