CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
aig.LongestPathCollection Class Reference

Public Member Functions

 __init__ (self, collection)
 
int __len__ (self)
 
Union[DataflowPath, List[DataflowPath]] __getitem__ (self, Union[slice, int] index)
 
DataflowPath longest_path (self)
 
DataflowPath get_by_delay_ratio (self, float ratio)
 
None print_summary (self)
 
 merge (self, "LongestPathCollection" src)
 

Public Attributes

 collection
 
 length
 

Detailed Description

  A collection of timing paths sorted by delay (longest first).
  This class provides a Python wrapper around the C++ LongestPathCollection,
  offering convenient access to timing paths with caching for performance.
  The paths are pre-sorted by delay in descending order.
  Attributes:
      collection: The underlying C++ collection object
      length: Number of paths in the collection

Definition at line 233 of file aig.py.

Constructor & Destructor Documentation

◆ __init__()

aig.LongestPathCollection.__init__ (   self,
  collection 
)
    Initialize the collection wrapper.
    Args:
        collection: The underlying C++ LongestPathCollection object

Definition at line 244 of file aig.py.

Referenced by aig.LongestPathCollection.merge().

Member Function Documentation

◆ __getitem__()

Union[DataflowPath, List[DataflowPath]] aig.LongestPathCollection.__getitem__ (   self,
Union[slice, int]  index 
)
    Get a specific path from the collection by index.
    Supports both integer and slice indexing. Integer indices can be negative.

    Args:
        index: Integer index or slice object to access paths

    Returns:
        DataflowPath or list of DataflowPaths for slice access

    Raises:
        IndexError: If index is out of range

Definition at line 261 of file aig.py.

References circt::hw::InnerSymbolNamespaceCollection.collection, aig.LongestPathCollection.collection, aig.LongestPathCollection.length, circt::ExportVerilog::StringOrOpToEmit.length, HostMemReadReq.length, ValueSlice.length, DriveSlice.length, and SignalSlice.length.

Referenced by om.List.__iter__().

◆ __len__()

int aig.LongestPathCollection.__len__ (   self)

◆ get_by_delay_ratio()

DataflowPath aig.LongestPathCollection.get_by_delay_ratio (   self,
float  ratio 
)
    Get the path at the specified position in the delay-sorted collection.
    Since paths are sorted by delay in descending order, higher ratios
    correspond to paths with higher delays (closer to the critical path).
    Args:
        ratio: Position ratio between 0.0 and 1.0
              (e.g., 1.0 = longest delay path, 0.0 = shortest delay path,
               0.95 = path among the top 5% slowest paths)
    Returns:
        DataflowPath at the specified position ratio

Definition at line 297 of file aig.py.

◆ longest_path()

DataflowPath aig.LongestPathCollection.longest_path (   self)
Get the path with the maximum delay (first element since sorted).

Definition at line 293 of file aig.py.

◆ merge()

aig.LongestPathCollection.merge (   self,
"LongestPathCollection"  src 
)
    Merge another collection into this one.
    Args:
        src: The collection to merge into this one

Definition at line 324 of file aig.py.

References seq.CompRegOp.__init__(), seq.CompRegClockEnabledOp.__init__(), esiaccel.codegen.Generator.__init__(), sv.IfDefOp.__init__(), om.List.__init__(), om.Object.__init__(), esiaccel.types.Port.__init__(), esiaccel.types.ReadPort.__init__(), esiaccel.types.WritePort.__init__(), Python.support.NamedValueOpView.__init__(), aig.LongestPathCollection.__init__(), esiaccel.accelerator.Accelerator.__init__(), Python.support.BackedgeBuilder.Edge.__init__(), sv.WireOp.__init__(), sv.RegOp.__init__(), aig.Instance.__init__(), esiaccel.types.BundlePort.__init__(), esiaccel.types.FunctionPort.__init__(), esiaccel.types.CallbackPort.__init__(), esiaccel.types.TelemetryPort.__init__(), esiaccel.types.MMIORegion.__init__(), Python.support.OpOperand.__init__(), comb.ExtractOpBuilder.__init__(), om.Evaluator.__init__(), aig.LongestPathAnalysis.__init__(), hw.InstanceBuilder.__init__(), fsm.StateOp.__init__(), fsm.MachineOp.__init__(), hw.HWModuleOp.__init__(), hw.HWModuleExternOp.__init__(), Python.setup.CMakeExtension.__init__(), setup.CMakeExtension.__init__(), esiaccel.accelerator.HWModule.__init__(), esiaccel.accelerator.Instance.__init__(), comb.ICmpOpBuilder.__init__(), esi-cosim.Simulator.__init__(), esi-cosim.Verilator.__init__(), Python.support.BackedgeBuilder.__init__(), esiaccel.types.ESIType.__init__(), esiaccel.types.VoidType.__init__(), esiaccel.types.ArrayType.__init__(), esiaccel.types.BitsType.__init__(), esiaccel.types.IntType.__init__(), esiaccel.types.UIntType.__init__(), esiaccel.types.SIntType.__init__(), esiaccel.types.StructType.__init__(), Python.support.UnconnectedSignalError.__init__(), esiaccel.accelerator.AcceleratorConnection.__init__(), esi-cosim.SourceFiles.__init__(), esiaccel.types.MessageFuture.__init__(), circt::hw::InnerSymbolNamespaceCollection.collection, aig.LongestPathCollection.collection, and aig.LongestPathCollection.merge().

Referenced by aig.LongestPathCollection.merge().

◆ print_summary()

None aig.LongestPathCollection.print_summary (   self)
Print a statistical summary of path delays in the collection.

Definition at line 313 of file aig.py.

References print().

Member Data Documentation

◆ collection

aig.LongestPathCollection.collection

◆ length

aig.LongestPathCollection.length

The documentation for this class was generated from the following file: