Skip to content

Commit 860f273

Browse files
author
Sebastien Bourdeauducq
committedDec 12, 2013
make: add decorator option
1 parent 9aa474c commit 860f273

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎make.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from mibuild.tools import write_to_file
66
from migen.util.misc import autotype
7+
from migen.fhdl import simplify
78

89
from misoclib.gensoc import cpuif
910
from misoclib.s6ddrphy import initsequence
@@ -18,7 +19,8 @@ def _get_args():
1819
parser.add_argument("-Ot", "--target-option", default=[], nargs=2, action="append", help="set target-specific option")
1920
parser.add_argument("-Xp", "--external-platform", default="", help="use external platform file in the specified path")
2021
parser.add_argument("-Xt", "--external-target", default="", help="use external target file in the specified path")
21-
22+
23+
parser.add_argument("-d", "--decorate", default=[], action="append", help="apply simplification decorator to top-level")
2224
parser.add_argument("-Ob", "--build-option", default=[], nargs=2, action="append", help="set build option")
2325
parser.add_argument("-B", "--no-bitstream", default=False, action="store_true", help="do not build bitstream file")
2426
parser.add_argument("-H", "--no-header", default=False, action="store_true", help="do not build C header files with CSR/IRQ/SDRAM_PHY definitions")
@@ -91,6 +93,9 @@ def main():
9193
bios_file.close()
9294
soc.init_bios_memory(bios_data)
9395

96+
for decorator in args.decorate:
97+
soc = getattr(simplify, decorator)(soc)
98+
9499
if not args.no_bitstream:
95100
build_kwargs = dict((k, autotype(v)) for k, v in args.build_option)
96101
platform.build(soc, build_name=build_name, **build_kwargs)

0 commit comments

Comments
 (0)
Please sign in to comment.