mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc_core/soc_core_argdict: use inspect to get all parameters and simplify
This commit is contained in:
parent
96c369f3e4
commit
5a0358754d
1 changed files with 2 additions and 7 deletions
|
@ -527,13 +527,8 @@ def soc_core_args(parser):
|
||||||
|
|
||||||
def soc_core_argdict(args):
|
def soc_core_argdict(args):
|
||||||
r = dict()
|
r = dict()
|
||||||
for a in [
|
for a in inspect.getargspec(SoCCore.__init__).args:
|
||||||
"cpu_type",
|
arg = getattr(args, a, None)
|
||||||
"cpu_variant",
|
|
||||||
"integrated_rom_size",
|
|
||||||
"integrated_main_ram_size",
|
|
||||||
"uart_stub"]:
|
|
||||||
arg = getattr(args, a)
|
|
||||||
if arg is not None:
|
if arg is not None:
|
||||||
r[a] = arg
|
r[a] = arg
|
||||||
return r
|
return r
|
||||||
|
|
Loading…
Reference in a new issue