Merge pull request #1932 from trabucayre/fix_openxc7
build/xilinx/yosys_nextpnr.py: fix device name for xc7a35ticsg324-1L & xc7a200t-sbg484-1 (as done for f4pga)
This commit is contained in:
commit
e4dc68206d
|
@ -58,6 +58,13 @@ class XilinxYosysNextpnrToolchain(YosysNextPNRToolchain):
|
||||||
"z": "zynq7"
|
"z": "zynq7"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device(self):
|
||||||
|
return {
|
||||||
|
"xc7a35ticsg324-1L": "xc7a35tcsg324-1",
|
||||||
|
"xc7a200t-sbg484-1": "xc7a200tsbg484-1",
|
||||||
|
}.get(self.platform.device, self.platform.device)
|
||||||
|
|
||||||
def _check_properties(self):
|
def _check_properties(self):
|
||||||
pattern = re.compile("xc7([aksz])([0-9]+)(.*)-([0-9])")
|
pattern = re.compile("xc7([aksz])([0-9]+)(.*)-([0-9])")
|
||||||
g = pattern.search(self.platform.device)
|
g = pattern.search(self.platform.device)
|
||||||
|
@ -119,7 +126,7 @@ class XilinxYosysNextpnrToolchain(YosysNextPNRToolchain):
|
||||||
if nextpnr_xilinx_python_dir is None or nextpnr_xilinx_python_dir == "":
|
if nextpnr_xilinx_python_dir is None or nextpnr_xilinx_python_dir == "":
|
||||||
nextpnr_xilinx_python_dir = "/snap/openxc7/current/opt/nextpnr-xilinx/python"
|
nextpnr_xilinx_python_dir = "/snap/openxc7/current/opt/nextpnr-xilinx/python"
|
||||||
bba = self.dbpart + ".bba"
|
bba = self.dbpart + ".bba"
|
||||||
bbaexport = [pypy3, os.path.join(nextpnr_xilinx_python_dir, "bbaexport.py"), "--device", self.platform.device, "--bba", bba]
|
bbaexport = [pypy3, os.path.join(nextpnr_xilinx_python_dir, "bbaexport.py"), "--device", self.device, "--bba", bba]
|
||||||
print(str(bbaexport))
|
print(str(bbaexport))
|
||||||
subprocess.run(bbaexport)
|
subprocess.run(bbaexport)
|
||||||
subprocess.run(["bbasm", "-l", bba, chipdb])
|
subprocess.run(["bbasm", "-l", bba, chipdb])
|
||||||
|
@ -149,14 +156,14 @@ class XilinxYosysNextpnrToolchain(YosysNextPNRToolchain):
|
||||||
|
|
||||||
# pre packer options
|
# pre packer options
|
||||||
self._pre_packer_opts[self._pre_packer_cmd[0]] = "--part {part} --db-root {db_root} {top}.fasm > {top}.frames".format(
|
self._pre_packer_opts[self._pre_packer_cmd[0]] = "--part {part} --db-root {db_root} {top}.fasm > {top}.frames".format(
|
||||||
part = self.platform.device,
|
part = self.device,
|
||||||
db_root = os.path.join(prjxray_db_dir, self._xc7family),
|
db_root = os.path.join(prjxray_db_dir, self._xc7family),
|
||||||
top = self._build_name
|
top = self._build_name
|
||||||
)
|
)
|
||||||
# packer options
|
# packer options
|
||||||
self._packer_opts += "--part_file {db_dir}/{part}/part.yaml --part_name {part} --frm_file {top}.frames --output_file {top}.bit".format(
|
self._packer_opts += "--part_file {db_dir}/{part}/part.yaml --part_name {part} --frm_file {top}.frames --output_file {top}.bit".format(
|
||||||
db_dir = os.path.join(prjxray_db_dir, self._xc7family),
|
db_dir = os.path.join(prjxray_db_dir, self._xc7family),
|
||||||
part = self.platform.device,
|
part = self.device,
|
||||||
top = self._build_name
|
top = self._build_name
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue