build/osfpga: Fix and switch to Raptor toolchain/Gemini device.

This commit is contained in:
Florent Kermarrec 2022-07-04 18:52:47 +02:00
parent 19d20786e3
commit 4b320a6a45
3 changed files with 7 additions and 6 deletions

View File

@ -22,6 +22,7 @@ class OSFPGAToolchain(GenericToolchain):
attr_translate = {}
def __init__(self, toolchain):
super().__init__()
self.toolchain = toolchain
self.clocks = dict()
@ -36,7 +37,7 @@ class OSFPGAToolchain(GenericToolchain):
sdc = []
for clk, period in sorted(self.clocks.items(), key=lambda x: x[0].duid):
sdc.append(f"create_clock -name {vns.get_name(clk)} -period {str(period)} [get_ports {{{vns.get_name(clk)}}}]")
with open(f"{build_name}.sdc", "w") as f:
with open(f"{self._build_name}.sdc", "w") as f:
f.write("\n".join(sdc))
return (self._build_name + ".sdc", "SDC")
@ -53,7 +54,7 @@ class OSFPGAToolchain(GenericToolchain):
# Add Include Path.
tcl.append("add_include_path ./")
for include_path in platform.verilog_include_paths:
for include_path in self.platform.verilog_include_paths:
tcl.append(f"add_include_path {include_path}")
# Add Sources.

View File

@ -22,7 +22,7 @@ _io = [
class Platform(OSFPGAPlatform):
def __init__(self):
OSFPGAPlatform.__init__(self, device="test", toolchain="raptor", io=_io)
OSFPGAPlatform.__init__(self, device="gemini", toolchain="raptor", io=_io)
# Minimal Design -----------------------------------------------------------------------------------

View File

@ -29,7 +29,7 @@ _io = [
]
class Platform(OSFPGAPlatform):
def __init__(self, toolchain="foedag", device="mpw1"):
def __init__(self, toolchain="raptor", device="gemini"):
OSFPGAPlatform.__init__(self, device=device, toolchain=toolchain, io=_io)
# BaseSoC ------------------------------------------------------------------------------------------
@ -49,8 +49,8 @@ def main():
parser = LiteXSoCArgumentParser(description="LiteX Test SoC on OS-FPGA")
target_group = parser.add_argument_group(title="Target options")
target_group.add_argument("--build", action="store_true", help="Build design.")
target_group.add_argument("--toolchain", default="foedag", help="FPGA toolchain.")
target_group.add_argument("--device", default="mpw1", help="FPGA device.")
target_group.add_argument("--toolchain", default="raptor", help="FPGA toolchain.")
target_group.add_argument("--device", default="gemini", help="FPGA device.")
builder_args(parser)
soc_core_args(parser)
args = parser.parse_args()