Coverage for pyEDAA/OutputFilter/Xilinx/PhysicalOptimizeDesign.py: 100%
32 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-05 22:59 +0000
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-05 22:59 +0000
1# ==================================================================================================================== #
2# _____ ____ _ _ ___ _ _ _____ _ _ _ #
3# _ __ _ _| ____| _ \ / \ / \ / _ \ _ _| |_ _ __ _ _| |_| ___(_) | |_ ___ _ __ #
4# | '_ \| | | | _| | | | |/ _ \ / _ \ | | | | | | | __| '_ \| | | | __| |_ | | | __/ _ \ '__| #
5# | |_) | |_| | |___| |_| / ___ \ / ___ \ | |_| | |_| | |_| |_) | |_| | |_| _| | | | || __/ | #
6# | .__/ \__, |_____|____/_/ \_\/_/ \_(_)___/ \__,_|\__| .__/ \__,_|\__|_| |_|_|\__\___|_| #
7# |_| |___/ |_| #
8# ==================================================================================================================== #
9# Authors: #
10# Patrick Lehmann #
11# #
12# License: #
13# ==================================================================================================================== #
14# Copyright 2025-2026 Electronic Design Automation Abstraction (EDA²) #
15# #
16# Licensed under the Apache License, Version 2.0 (the "License"); #
17# you may not use this file except in compliance with the License. #
18# You may obtain a copy of the License at #
19# #
20# http://www.apache.org/licenses/LICENSE-2.0 #
21# #
22# Unless required by applicable law or agreed to in writing, software #
23# distributed under the License is distributed on an "AS IS" BASIS, #
24# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
25# See the License for the specific language governing permissions and #
26# limitations under the License. #
27# #
28# SPDX-License-Identifier: Apache-2.0 #
29# ==================================================================================================================== #
30#
31"""A filtering anc classification processor for AMD/Xilinx Vivado Synthesis outputs."""
32from re import compile, Pattern
33from typing import ClassVar, Type, Tuple
35from pyTooling.Decorators import export
37from pyEDAA.OutputFilter.Xilinx.Common2 import Task, TaskWithPhases, Phase
38from pyEDAA.OutputFilter.Xilinx.Common2 import MAJOR, MAJOR_MINOR, MAJOR_MINOR_MICRO, MAJOR_MINOR_MICRO_NANO
41@export
42class InitialUpdateTimingTask(Task):
43 _NAME: ClassVar[str] = "Initial Update Timing Task"
44 _START: ClassVar[str] = "Starting Initial Update Timing Task"
45 _FINISH: ClassVar[str] = None
48@export
49class Phase_PlacerInitialization(Phase):
50 """
51 *Physical Synthesis Initialization* phase.
53 Used by task :class:`PhysicalSynthesisTask`.
54 """
55 _START: ClassVar[Pattern] = compile(f"^Phase {MAJOR} Physical Synthesis Initialization")
56 _FINISH: ClassVar[str] = "Phase {phaseIndex} Physical Synthesis Initialization | Checksum:"
59@export
60class Phase_DSPRegisterOptimization(Phase):
61 """
62 *DSP Register Optimization* phase.
64 Used by task :class:`PhysicalSynthesisTask`.
65 """
66 _START: ClassVar[Pattern] = compile(f"^Phase {MAJOR} DSP Register Optimization")
67 _FINISH: ClassVar[str] = "Phase {phaseIndex} DSP Register Optimization | Checksum:"
70@export
71class Phase_CriticalPathOptimization_1(Phase):
72 """
73 *Critical Path Optimization* phase.
75 Used by task :class:`PhysicalSynthesisTask`.
76 """
77 _START: ClassVar[Pattern] = compile(f"^Phase {MAJOR} Critical Path Optimization")
78 _FINISH: ClassVar[str] = "Phase {phaseIndex} Critical Path Optimization | Checksum:"
81@export
82class Phase_CriticalPathOptimization_2(Phase):
83 """
84 *Critical Path Optimization* phase.
86 Used by task :class:`PhysicalSynthesisTask`.
87 """
88 _START: ClassVar[Pattern] = compile(f"^Phase {MAJOR} Critical Path Optimization")
89 _FINISH: ClassVar[str] = "Phase {phaseIndex} Critical Path Optimization | Checksum:"
92@export
93class PhysicalSynthesisTask(TaskWithPhases):
94 """
95 Parses *Physical Synthesis* task's outputs.
97 Used by Vivado command :class:`~pyEDAA.OutputFilter.Xilinx.Commands.PhysicalOptimizeDesign`.
98 """
99 _NAME: ClassVar[str] = "Physical Synthesis Task"
100 _START: ClassVar[str] = "Starting Physical Synthesis Task"
101 _FINISH: ClassVar[str] = "Ending Physical Synthesis Task"
103 _PARSERS: ClassVar[Tuple[Type[Phase], ...]] = (
104 Phase_PlacerInitialization,
105 Phase_DSPRegisterOptimization,
106 Phase_CriticalPathOptimization_1,
107 Phase_CriticalPathOptimization_2
108 )