From: Neel Date: Mon, 16 Jul 2018 12:49:25 +0000 (+0530) Subject: stop myhdl being necessary X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=579d0ac23c2df6de1cbc8be4b6deda0ccc437ba0;p=pinmux.git stop myhdl being necessary --- diff --git a/src/myhdlgen/mux.py b/src/myhdlgen/mux.py index 1495026..c2b9e8b 100644 --- a/src/myhdlgen/mux.py +++ b/src/myhdlgen/mux.py @@ -1,7 +1,11 @@ # mux.py from math import log -from myhdl import * +try: + from myhdl import * +except ImportError: + def block(*args): + pass period = 20 # clk frequency = 50 MHz diff --git a/src/myhdlgen/pins.py b/src/myhdlgen/pins.py index 28fcc2e..feb0f73 100644 --- a/src/myhdlgen/pins.py +++ b/src/myhdlgen/pins.py @@ -1,7 +1,10 @@ # mux.py - -from myhdl import * -from myhdl._block import _Block +try: + from myhdl import * + from myhdl._block import _Block +except ImportError: + def block(*args): + pass from mux import mux4 from functools import wraps, partial import inspect