mirror of https://github.com/YosysHQ/yosys.git
Fix pmgen for out-of-tree build
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
069801e441
commit
64d91219b4
|
@ -4,5 +4,5 @@ passes/pmgen/ice40_dsp.o: passes/pmgen/ice40_dsp_pm.h
|
||||||
EXTRA_OBJS += passes/pmgen/ice40_dsp_pm.h
|
EXTRA_OBJS += passes/pmgen/ice40_dsp_pm.h
|
||||||
.SECONDARY: passes/pmgen/ice40_dsp_pm.h
|
.SECONDARY: passes/pmgen/ice40_dsp_pm.h
|
||||||
|
|
||||||
passes/pmgen/ice40_dsp_pm.h: passes/pmgen/ice40_dsp.pmg passes/pmgen/pmgen.py
|
passes/pmgen/ice40_dsp_pm.h: passes/pmgen/pmgen.py passes/pmgen/ice40_dsp.pmg
|
||||||
$(P) cd passes/pmgen && python3 pmgen.py ice40_dsp
|
$(P) mkdir -p passes/pmgen && cd passes/pmgen && python3 $^
|
||||||
|
|
|
@ -6,7 +6,9 @@ import pprint
|
||||||
|
|
||||||
pp = pprint.PrettyPrinter(indent=4)
|
pp = pprint.PrettyPrinter(indent=4)
|
||||||
|
|
||||||
prefix = sys.argv[1]
|
pmgfile = sys.argv[1]
|
||||||
|
prefix = pmgfile.split("/")[-1]
|
||||||
|
prefix = prefix.split(".")[0]
|
||||||
|
|
||||||
state_types = dict()
|
state_types = dict()
|
||||||
udata_types = dict()
|
udata_types = dict()
|
||||||
|
@ -73,7 +75,7 @@ def rewrite_cpp(s):
|
||||||
|
|
||||||
return "".join(t)
|
return "".join(t)
|
||||||
|
|
||||||
with open("%s.pmg" % prefix, "r") as f:
|
with open(pmgfile, "r") as f:
|
||||||
while True:
|
while True:
|
||||||
line = f.readline()
|
line = f.readline()
|
||||||
if line == "": break
|
if line == "": break
|
||||||
|
|
Loading…
Reference in New Issue