build/xilinx/symbiflow: remap part name
authorMariusz Glebocki <mglebocki@antmicro.com>
Tue, 2 Jun 2020 12:53:15 +0000 (14:53 +0200)
committerMariusz Glebocki <mglebocki@antmicro.com>
Tue, 2 Jun 2020 14:23:08 +0000 (16:23 +0200)
litex/build/xilinx/symbiflow.py

index 84d4bd38439557d38fa2f7bcd7153497abe26314..e86a4fcf298464fc1215f8ee44864a725315739c 100644 (file)
@@ -112,6 +112,7 @@ class SymbiflowToolchain:
         self.false_paths = set()
         self.symbiflow_device = None
         self.bitstream_device = None
+        self._partname = None
 
     def _check_properties(self, platform):
         if not self.symbiflow_device:
@@ -129,6 +130,10 @@ class SymbiflowToolchain:
                 }[platform.device[:4]]
             except KeyError:
                 raise ValueError(f"Unsupported device: {platform.device}")
+        # FIXME: prjxray-db doesn't have xc7a35ticsg324-1L - use closest replacement
+        self._partname = {
+            "xc7a35ticsg324-1L" : "xc7a35tcsg324-1",
+        }.get(platform.device, platform.device)
 
     def _generate_makefile(self, platform, build_name):
         Var = _MakefileGenerator.Var
@@ -137,7 +142,7 @@ class SymbiflowToolchain:
         makefile = _MakefileGenerator([
             "# Autogenerated by LiteX / git: " + tools.get_litex_git_revision() + "\n",
             Var("TOP", build_name),
-            Var("PARTNAME", platform.device),
+            Var("PARTNAME", self._partname),
             Var("DEVICE", self.symbiflow_device),
             Var("BITSTREAM_DEVICE", self.bitstream_device),
             "",