Skip to content

Commit

Permalink
build/generic_toolchain/add_false_path: Only add keep attribute if fr…
Browse files Browse the repository at this point in the history
…om_/to are Signals.
  • Loading branch information
enjoy-digital committed Dec 2, 2024
1 parent 42cf2ca commit 4e775a7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions litex/build/generic_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os
import math

from migen.fhdl.structure import _Fragment
from migen.fhdl.structure import Signal, _Fragment

from litex.gen import LiteXContext

Expand Down Expand Up @@ -178,7 +178,9 @@ def add_period_constraint(self, platform, clk, period, keep=True, name=None):

def add_false_path_constraint(self, platform, from_, to, keep=True):
if keep:
from_.attr.add("keep")
to.attr.add("keep")
if isinstance(from_, Signal):
from_.attr.add("keep")
if isinstance(to, Signal):
to.attr.add("keep")
if (to, from_) not in self.false_paths:
self.false_paths.add((from_, to))

0 comments on commit 4e775a7

Please sign in to comment.