def __init__(self, device, *args, toolchain="foedag", devicename=None, **kwargs): GenericPlatform.__init__(self, device, *args, **kwargs) self.devicename = devicename if toolchain in ["foedag", "raptor"]: self.toolchain = osfpga.OSFPGAToolchain(toolchain=toolchain) else: raise ValueError(f"Unknown toolchain {toolchain}")
def __init__(self, *args, toolchain="quartus", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) self.ips = set() if toolchain == "quartus": self.toolchain = quartus.AlteraQuartusToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="verilator", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) self.sim_requested = [] if toolchain == "verilator": self.toolchain = verilator.SimVerilatorToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="ise", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "ise": self.toolchain = ise.XilinxISEToolchain() elif toolchain == "vivado": self.toolchain = vivado.XilinxVivadoToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="diamond", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "diamond": self.toolchain = diamond.LatticeDiamondToolchain() elif toolchain == "icestorm": self.bitstream_ext = ".bin" self.toolchain = icestorm.LatticeIceStormToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="diamond", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "diamond": self.toolchain = diamond.LatticeDiamondToolchain() elif toolchain == "trellis": self.toolchain = trellis.LatticeTrellisToolchain() elif toolchain == "icestorm": self.bitstream_ext = ".bin" self.toolchain = icestorm.LatticeIceStormToolchain() else: raise ValueError("Unknown toolchain")
def add_platform_command(self, command, **signals): skip = False from litex.build.xilinx import yosys_nextpnr if isinstance(self.toolchain, yosys_nextpnr.YosysNextpnrToolchain): # FIXME: Add support for INTERNAL_VREF to yosys+nextpnr flow. if "set_property INTERNAL_VREF" in command: print( "WARNING: INTERNAL_VREF constraint removed since not yet supported by yosys-nextpnr flow." ) skip = True if not skip: GenericPlatform.add_platform_command(self, command, **signals)
def __init__(self, *args, toolchain="ise", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) self.edifs = set() self.ips = {} if toolchain == "ise": self.toolchain = ise.XilinxISEToolchain() elif toolchain == "vivado": self.toolchain = vivado.XilinxVivadoToolchain() elif toolchain == "symbiflow": self.toolchain = symbiflow.SymbiflowToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, device, *args, toolchain="gowin", devicename=None, **kwargs): GenericPlatform.__init__(self, device, *args, **kwargs) if not devicename: idx = device.find('-') likely_name = f"{device[:idx]}-{device[idx+3]}" raise ValueError(f"devicename not provided, maybe {likely_name}?") self.devicename = devicename if toolchain == "gowin": self.toolchain = gowin.GowinToolchain() elif toolchain == "apicula": raise ValueError("Apicula toolchain needs more work") else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="diamond", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "diamond": self.toolchain = diamond.LatticeDiamondToolchain() elif toolchain == "trellis": self.toolchain = trellis.LatticeTrellisToolchain() elif toolchain == "icestorm": self.bitstream_ext = ".bin" self.toolchain = icestorm.LatticeIceStormToolchain() elif toolchain == "radiant": self.toolchain = radiant.LatticeRadiantToolchain() elif toolchain == "oxide": self.toolchain = oxide.LatticeOxideToolchain() else: raise ValueError("Unknown toolchain")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict() # No common overrides between ECP and ice40. so.update(self.toolchain.special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, attr_translate=self.toolchain.attr_translate, **kwargs)
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict() # No common overrides between ECP5 and iCE40. so.update(self.toolchain.special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, attr_translate=self.toolchain.attr_translate, **kwargs)
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict(common.xilinx_special_overrides) if self.device[:3] == "xc7": so.update(common.xilinx_s7_special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, attr_translate=self.toolchain.attr_translate, **kwargs)
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict() so.update(self.toolchain.special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, attr_translate=self.toolchain.attr_translate, **kwargs)
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict(common.lattice_special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, **kwargs)
def __init__(self, device, io, name="sim", toolchain="verilator", **kwargs): if "sim_trace" not in (iface[0] for iface in io): io.append(("sim_trace", 0, Pins(1))) GenericPlatform.__init__(self, device, io, name=name, **kwargs) self.sim_requested = [] if toolchain == "verilator": self.toolchain = verilator.SimVerilatorToolchain() else: raise ValueError(f"Unknown toolchain {toolchain}") # we must always request the sim_trace signal self.trace = self.request("sim_trace")
def __init__(self, *args, toolchain="ise", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) self.edifs = set() self.ips = {} if toolchain == "ise": from litex.build.xilinx import ise self.toolchain = ise.XilinxISEToolchain() elif toolchain == "vivado": from litex.build.xilinx import vivado self.toolchain = vivado.XilinxVivadoToolchain() elif toolchain == "symbiflow": from litex.build.xilinx import symbiflow self.toolchain = symbiflow.SymbiflowToolchain() elif toolchain == "yosys+nextpnr": from litex.build.xilinx import yosys_nextpnr self.toolchain = yosys_nextpnr.YosysNextpnrToolchain() else: raise ValueError(f"Unknown toolchain {toolchain}")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict(common.xilinx_special_overrides) if self.device[:3] == "xc7": so.update(common.xilinx_s7_special_overrides) if self.toolchain == "ise": so.update(common.xilinx_vivado_special_overrides) else: so.update(common.xilinx_ise_special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, **kwargs)
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict(common.xilinx_special_overrides) if self.device[:3] == "xc6": so.update(common.xilinx_s6_special_overrides) if self.device[:3] == "xc7": so.update(common.xilinx_s7_special_overrides) if self.device[:4] == "xcku": so.update(common.xilinx_ku_special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, attr_translate=self.toolchain.attr_translate, **kwargs)
def request(self, name, number=None): index = "" if number is not None: index = str(number) obj = GenericPlatform.request(self, name, number=number) siglist = [] if isinstance(obj, Signal): siglist.append((name, obj.nbits, name)) elif isinstance(obj, Record): for subsignal, dummy in obj.iter_flat(): subfname = subsignal.backtrace[-1][0] prefix = "{}{}_".format(name, index) subname = subfname.split(prefix)[1] siglist.append((subname, subsignal.nbits, subfname)) self.sim_requested.append((name, index, siglist)) return obj
def __init__(self, *args, toolchain="quartus", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "quartus": self.toolchain = quartus.AlteraQuartusToolchain() else: raise ValueError("Unknown toolchain")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): so = dict(common.sim_special_overrides) so.update(special_overrides) return GenericPlatform.get_verilog(self, *args, special_overrides=so, **kwargs)
def __init__(self, device, *args, toolchain="td", **kwargs): GenericPlatform.__init__(self, device, *args, **kwargs) if toolchain == "td": self.toolchain = anlogic.TangDinastyToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, device, *args, **kwargs): GenericPlatform.__init__(self, device, *args, **kwargs) self.toolchain = openfpga.OpenFPGAToolchain()
def __init__(self, *args, toolchain="libero_soc_polarfire", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "libero_soc_polarfire": self.toolchain = libero_soc.MicrosemiLiberoSoCPolarfireToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="diamond", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "diamond": self.toolchain = diamond.LatticeDiamondToolchain() else: raise ValueError("Unknown toolchain")
def get_edif(self, fragment, **kwargs): return GenericPlatform.get_edif(self, fragment, "UNISIMS", "Xilinx", self.device, **kwargs)
def __init__(self, device, *args, toolchain="symbiflow", **kwargs): GenericPlatform.__init__(self, device, *args, **kwargs) if toolchain == "symbiflow": self.toolchain = symbiflow.SymbiflowToolchain() else: raise ValueError("Unknown toolchain")
def __init__(self, *args, toolchain="f4pga", **kwargs): GenericPlatform.__init__(self, *args, **kwargs) if toolchain == "symbiflow" or toolchain == "f4pga": self.toolchain = f4pga.F4PGAToolchain() else: raise ValueError(f"Unknown toolchain {toolchain}")