Skip to content

Commit

Permalink
Wrong assignment of Floorplan mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kareefardi committed Jan 24, 2024
1 parent e95ef63 commit ad6dd18
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ class OpenROADStep(TclStep):
Optional[Path],
"Specifies the SDC file used during all implementation (PnR) steps",
),
Variable(
"FP_DEF_TEMPLATE",
Optional[Path],
"Points to the DEF file to be used as a template.",
),
]

@abstractmethod
Expand Down Expand Up @@ -653,11 +658,6 @@ class Floorplan(OpenROADStep):
inputs = [DesignFormat.NETLIST]

config_vars = OpenROADStep.config_vars + [
Variable(
"FP_DEF_TEMPLATE",
Optional[Path],
"Points to the DEF file to be used as a template.",
),
Variable(
"FP_ASPECT_RATIO",
Decimal,
Expand Down Expand Up @@ -734,11 +734,12 @@ def get_mode(Self, config: Config) -> Mode:
if config.get("FP_DEF_TEMPLATE") and config.get("DIE_AREA"):
warn("Specifing DIE_AREA with FP_DEF_TEMPLATE is redundant")
if config.get("FP_DEF_TEMPLATE"):
mode = Self.Mode.RELATIVE
mode = Self.Mode.TEMPLATE
elif config.get("DIE_AREA"):
mode = Self.Mode.ABSOULTE
else:
mode = Self.Mode.RELATIVE
debug(f"Floorplan mode: {mode}")
return mode

def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
Expand Down Expand Up @@ -801,7 +802,7 @@ def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
return {}, {}
if Floorplan.get_mode(self.config) == Floorplan.Mode.TEMPLATE:
info(
f"Flooplan was loaded from {self.config['FP_DEF_TEMPLATE']}. Skipping {self.id}"
f"Flooplan was loaded from {self.config['FP_DEF_TEMPLATE']} Skipping {self.id}"
)
return {}, {}

Expand Down

0 comments on commit ad6dd18

Please sign in to comment.