CIRCT 22.0.0git
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
synth.LongestPathAnalysis Class Reference

Classes

struct  Impl
 Internal implementation for LongestPathAnalysis. More...
 

Public Member Functions

 __init__ (self, module, bool collect_debug_info=True, bool keep_only_max_delay_paths=False, bool lazy_computation=False, str top_module_name="")
 
LongestPathCollection get_paths (self, value, int bit_pos, bool elaborate_paths=True)
 
LongestPathCollection get_internal_paths (self, str module_name, bool elaborate_paths=True)
 
LongestPathCollection get_paths_from_input_ports_to_internal (self, str module_name)
 
LongestPathCollection get_paths_from_internal_to_output_ports (self, str module_name)
 
LongestPathCollection get_all_paths (self, str module_name, bool elaborate_paths=True)
 

Public Attributes

 analysis
 

Detailed Description

  Main interface for performing longest path analysis on Synth dialect.
  This class provides a Python wrapper around the C++ LongestPathAnalysis,
  enabling timing analysis of Synth dialect. It can identify critical timing
  paths and provide detailed path information.
  Attributes:
      analysis: The underlying C++ analysis object

Definition at line 352 of file synth.py.

Constructor & Destructor Documentation

◆ __init__()

synth.LongestPathAnalysis.__init__ (   self,
  module,
bool   collect_debug_info = True,
bool   keep_only_max_delay_paths = False,
bool   lazy_computation = False,
str   top_module_name = "" 
)
    Initialize the longest path analysis for a given module.
    Args:
        module: The MLIR module to analyze
        collect_debug_info: Whether to include debug points in the analysis.
                            Debug points provide additional information about the path,
                            but increase analysis time and memory usage.
        keep_only_max_delay_paths: Keep only maximum-delay paths in collections.
        lazy_computation: Enable lazy (on-demand) computation.

Definition at line 362 of file synth.py.

Referenced by synth.LongestPathCollection.drop_non_critical_paths(), and synth.LongestPathCollection.merge().

Member Function Documentation

◆ get_all_paths()

LongestPathCollection synth.LongestPathAnalysis.get_all_paths (   self,
str  module_name,
bool   elaborate_paths = True 
)
    Get all paths in the module (internal and external paths combined).

    Args:
        module_name: Name of the module to analyze
        elaborate_paths: Whether to include full hierarchical instance information
                       (only applies to internal paths)

    Returns:
        LongestPathCollection containing all paths sorted by delay

Definition at line 455 of file synth.py.

References synth.LongestPathAnalysis.get_internal_paths(), synth.LongestPathAnalysis.get_paths_from_input_ports_to_internal(), and synth.LongestPathAnalysis.get_paths_from_internal_to_output_ports().

◆ get_internal_paths()

LongestPathCollection synth.LongestPathAnalysis.get_internal_paths (   self,
str  module_name,
bool   elaborate_paths = True 
)
    Get internal paths within the module.

    Internal paths are paths that start and end at sequential elements
    (registers/flip-flops), forming complete paths through combinational
    logic. These paths may cross module boundaries but both endpoints are
    sequential elements, not ports.

    Args:
        module_name: Name of the module to analyze
        elaborate_paths: Whether to include full hierarchical instance information

    Returns:
        LongestPathCollection containing all internal paths sorted by delay

Definition at line 400 of file synth.py.

References synth.LongestPathAnalysis.analysis, LongestPathAnalysisWrapper.analysis, DatapathCompressOpConversion.analysis, ArcInliner.analysis, and synth.LongestPathAnalysis.get_internal_paths().

Referenced by synth.LongestPathAnalysis.get_all_paths(), and synth.LongestPathAnalysis.get_internal_paths().

◆ get_paths()

LongestPathCollection synth.LongestPathAnalysis.get_paths (   self,
  value,
int  bit_pos,
bool   elaborate_paths = True 
)
    Perform longest path analysis and return all timing paths to the
    specified value and bit position.
    Args:
        value: The value to analyze
        bit_pos: The bit position to analyze
        elaborate_paths: Whether to elaborate the paths with detailed information
    Returns:
        LongestPathCollection containing all paths sorted by delay

Definition at line 383 of file synth.py.

References synth.LongestPathAnalysis.analysis, LongestPathAnalysisWrapper.analysis, DatapathCompressOpConversion.analysis, ArcInliner.analysis, and synth.LongestPathAnalysis.get_paths().

Referenced by synth.LongestPathAnalysis.get_paths().

◆ get_paths_from_input_ports_to_internal()

LongestPathCollection synth.LongestPathAnalysis.get_paths_from_input_ports_to_internal (   self,
str  module_name 
)
    Get external paths from module input ports to internal sequential elements.

    These are input-to-register paths that start at module input ports and end
    at internal sequential elements (registers/flip-flops).

    Args:
        module_name: Name of the module to analyze

    Returns:
        LongestPathCollection containing input-to-internal paths sorted by delay

Definition at line 421 of file synth.py.

References synth.LongestPathAnalysis.analysis, LongestPathAnalysisWrapper.analysis, DatapathCompressOpConversion.analysis, ArcInliner.analysis, and synth.LongestPathAnalysis.get_paths_from_input_ports_to_internal().

Referenced by synth.LongestPathAnalysis.get_all_paths(), and synth.LongestPathAnalysis.get_paths_from_input_ports_to_internal().

◆ get_paths_from_internal_to_output_ports()

LongestPathCollection synth.LongestPathAnalysis.get_paths_from_internal_to_output_ports (   self,
str  module_name 
)
    Get external paths from internal sequential elements to module output ports.

    These are register-to-output paths that start at internal sequential elements
    (registers/flip-flops) and end at module output ports.

    Args:
        module_name: Name of the module to analyze

    Returns:
        LongestPathCollection containing internal-to-output paths sorted by delay

Definition at line 438 of file synth.py.

References synth.LongestPathAnalysis.analysis, LongestPathAnalysisWrapper.analysis, DatapathCompressOpConversion.analysis, ArcInliner.analysis, and synth.LongestPathAnalysis.get_paths_from_internal_to_output_ports().

Referenced by synth.LongestPathAnalysis.get_all_paths(), and synth.LongestPathAnalysis.get_paths_from_internal_to_output_ports().

Member Data Documentation

◆ analysis

synth.LongestPathAnalysis.analysis

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