soc_core: Fix l2_size argument handling.
This commit is contained in:
parent
f0bd7019cd
commit
153f9f3660
|
@ -1489,10 +1489,10 @@ class LiteXSoC(SoC):
|
||||||
l2_cache = FullMemoryWE()(l2_cache)
|
l2_cache = FullMemoryWE()(l2_cache)
|
||||||
self.submodules.l2_cache = l2_cache
|
self.submodules.l2_cache = l2_cache
|
||||||
litedram_wb = self.l2_cache.slave
|
litedram_wb = self.l2_cache.slave
|
||||||
|
self.add_config("L2_SIZE", l2_cache_size)
|
||||||
else:
|
else:
|
||||||
litedram_wb = wishbone.Interface(port.data_width)
|
litedram_wb = wishbone.Interface(port.data_width)
|
||||||
self.submodules += wishbone.Converter(wb_sdram, litedram_wb)
|
self.submodules += wishbone.Converter(wb_sdram, litedram_wb)
|
||||||
self.add_config("L2_SIZE", l2_cache_size)
|
|
||||||
|
|
||||||
# Wishbone Slave <--> LiteDRAM bridge.
|
# Wishbone Slave <--> LiteDRAM bridge.
|
||||||
self.submodules.wishbone_bridge = LiteDRAMWishbone2Native(
|
self.submodules.wishbone_bridge = LiteDRAMWishbone2Native(
|
||||||
|
|
|
@ -342,12 +342,14 @@ def soc_core_args(parser):
|
||||||
soc_group.add_argument("--timer-uptime", action="store_true", help="Add an uptime capability to Timer.")
|
soc_group.add_argument("--timer-uptime", action="store_true", help="Add an uptime capability to Timer.")
|
||||||
|
|
||||||
# L2 Cache
|
# L2 Cache
|
||||||
soc_group.add_argument("--l2-size", default=8192, type=auto_int, help="L2 cache size.")
|
soc_group.add_argument("--l2-size", default=8192, type=auto_int, help="L2 cache size.")
|
||||||
|
|
||||||
def soc_core_argdict(args):
|
def soc_core_argdict(args):
|
||||||
r = dict()
|
r = dict()
|
||||||
# Iterate on all SoCCore arguments.
|
# Iterate on all arguments.
|
||||||
for a in inspect.getfullargspec(SoCCore.__init__).args:
|
soc_args = inspect.getfullargspec(SoCCore.__init__).args
|
||||||
|
full_args = soc_args + ["l2_size"]
|
||||||
|
for a in full_args:
|
||||||
# Exclude specific arguments.
|
# Exclude specific arguments.
|
||||||
if a in ["self", "platform"]:
|
if a in ["self", "platform"]:
|
||||||
continue
|
continue
|
||||||
|
@ -359,7 +361,7 @@ def soc_core_argdict(args):
|
||||||
arg = not getattr(args, "no_ident_version")
|
arg = not getattr(args, "no_ident_version")
|
||||||
# Regular cases.
|
# Regular cases.
|
||||||
else:
|
else:
|
||||||
arg = getattr(args, a, None)
|
arg = getattr(args, a, None)
|
||||||
# Fill Dict.
|
# Fill Dict.
|
||||||
if arg is not None:
|
if arg is not None:
|
||||||
r[a] = arg
|
r[a] = arg
|
||||||
|
|
Loading…
Reference in New Issue