boards/ulx3s: add device selection parameter
ULX3S can be populated with LFE5U-45F (default) or LFE5U-85F
This commit is contained in:
parent
e6f97e08d2
commit
935f3a5337
|
@ -69,5 +69,5 @@ class Platform(LatticePlatform):
|
||||||
default_clk_name = "clk100"
|
default_clk_name = "clk100"
|
||||||
default_clk_period = 10
|
default_clk_period = 10
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, device="LFE5U-45F", **kwargs):
|
||||||
LatticePlatform.__init__(self, "LFE5U-45F-6BG381C", _io, **kwargs)
|
LatticePlatform.__init__(self, device + "-6BG381C", _io, **kwargs)
|
||||||
|
|
|
@ -46,8 +46,7 @@ class _CRG(Module):
|
||||||
# BaseSoC ------------------------------------------------------------------------------------------
|
# BaseSoC ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class BaseSoC(SoCSDRAM):
|
class BaseSoC(SoCSDRAM):
|
||||||
def __init__(self, toolchain="diamond", **kwargs):
|
def __init__(self, platform, **kwargs):
|
||||||
platform = ulx3s.Platform(toolchain=toolchain)
|
|
||||||
sys_clk_freq = int(50e6)
|
sys_clk_freq = int(50e6)
|
||||||
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
|
SoCSDRAM.__init__(self, platform, clk_freq=sys_clk_freq,
|
||||||
integrated_rom_size=0x8000,
|
integrated_rom_size=0x8000,
|
||||||
|
@ -68,11 +67,14 @@ def main():
|
||||||
parser = argparse.ArgumentParser(description="LiteX SoC on ULX3S")
|
parser = argparse.ArgumentParser(description="LiteX SoC on ULX3S")
|
||||||
parser.add_argument("--gateware-toolchain", dest="toolchain", default="diamond",
|
parser.add_argument("--gateware-toolchain", dest="toolchain", default="diamond",
|
||||||
help='gateware toolchain to use, diamond (default) or trellis')
|
help='gateware toolchain to use, diamond (default) or trellis')
|
||||||
|
parser.add_argument("--device", dest="device", default="LFE5U-45F",
|
||||||
|
help='FPGA device, ULX3S can be populated with LFE5U-45F (default) or LFE5U-85F')
|
||||||
builder_args(parser)
|
builder_args(parser)
|
||||||
soc_sdram_args(parser)
|
soc_sdram_args(parser)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
soc = BaseSoC(toolchain=args.toolchain, **soc_sdram_argdict(args))
|
platform = ulx3s.Platform(device=args.device, toolchain=args.toolchain)
|
||||||
|
soc = BaseSoC(platform, **soc_sdram_argdict(args))
|
||||||
builder = Builder(soc, **builder_argdict(args))
|
builder = Builder(soc, **builder_argdict(args))
|
||||||
builder.build()
|
builder.build()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue