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 os
|
||||||
import math
|
import math
|
||||||
|
|
||||||
from migen.fhdl.structure import _Fragment
|
from migen.fhdl.structure import Signal, _Fragment
|
||||||
|
|
||||||
from litex.gen import LiteXContext
|
from litex.gen import LiteXContext
|
||||||
|
|
||||||
|
@ -178,7 +178,9 @@ class GenericToolchain:
|
||||||
|
|
||||||
def add_false_path_constraint(self, platform, from_, to, keep=True):
|
def add_false_path_constraint(self, platform, from_, to, keep=True):
|
||||||
if keep:
|
if keep:
|
||||||
|
if isinstance(from_, Signal):
|
||||||
from_.attr.add("keep")
|
from_.attr.add("keep")
|
||||||
|
if isinstance(to, Signal):
|
||||||
to.attr.add("keep")
|
to.attr.add("keep")
|
||||||
if (to, from_) not in self.false_paths:
|
if (to, from_) not in self.false_paths:
|
||||||
self.false_paths.add((from_, to))
|
self.false_paths.add((from_, to))
|
||||||
|
|
Loading…
Reference in New Issue