Skip to content

Commit

Permalink
build/xilinx: fix error message when Xilinx toolchain directory exist…
Browse files Browse the repository at this point in the history
…s but does not contain a ISE version directory. Closes #39
sbourdeauducq committed Mar 2, 2016
1 parent 4ea8074 commit bc21743
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions migen/build/xilinx/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import sys
from distutils.version import StrictVersion

from migen.fhdl.structure import *
from migen.fhdl.specials import Instance
@@ -14,12 +13,12 @@


def settings(path, ver=None, sub=None):
vers = list(tools.versions(path))
if ver is None:
vers = list(tools.versions(path))
if not vers:
raise OSError("no version directory for Xilinx tools found in "
+ path)
ver = max(vers)
else:
ver = StrictVersion(ver)
assert ver in vers

full = os.path.join(path, str(ver))
if sub:
@@ -39,7 +38,7 @@ def settings(path, ver=None, sub=None):
if os.path.exists(settings):
return settings

raise OSError("no settings file found")
raise OSError("no Xilinx tools settings file found")


class XilinxNoRetimingImpl(Module):

0 comments on commit bc21743

Please sign in to comment.