build/generic_toolchain/add_false_path: Only add keep attribute if from_/to are Signals.
This commit is contained in:
parent
42cf2ca5d0
commit
4e775a7bd6
|
@ -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
|
||||
|
||||
|
@ -178,7 +178,9 @@ class GenericToolchain:
|
|||
|
||||
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))
|
||||
|
|
Loading…
Reference in New Issue