Skip to content

Commit

Permalink
Warn about deprecated Tool API implementations
Browse files Browse the repository at this point in the history
Tool API backends that have already been ported to the Flow API
are marked as deprecated and will be removed in an upcoming Edalize
version.
  • Loading branch information
olofk committed Nov 14, 2024
1 parent 5e2770c commit 5388db5
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions edalize/ghdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def get_doc(cls, api_ver):
}

def configure_main(self):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
(src_files, incdirs) = self._get_fileset_files()
analyze_options = self.tool_options.get("analyze_options", "")

Expand Down
3 changes: 3 additions & 0 deletions edalize/icarus.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def get_doc(cls, api_ver):
}

def configure_main(self):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
f = open(os.path.join(self.work_root, self.name + ".scr"), "w")

(src_files, incdirs) = self._get_fileset_files()
Expand Down
7 changes: 7 additions & 0 deletions edalize/icestorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause

import logging

logger = logging.getLogger(__name__)

import os.path

from edalize.edatool import Edatool
Expand Down Expand Up @@ -48,6 +52,9 @@ def get_doc(cls, api_ver):
}

def __init__(self, edam=None, work_root=None, eda_api=None, verbose=True):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
super().__init__(edam, work_root, eda_api, verbose)
_tool_opts = edam["tool_options"]["icestorm"]

Expand Down
7 changes: 7 additions & 0 deletions edalize/nextpnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause

import logging

logger = logging.getLogger(__name__)

import os.path

from edalize.edatool import Edatool
Expand All @@ -25,6 +29,9 @@ def get_doc(cls, api_ver):
}

def configure_main(self):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
cst_file = ""
lpf_file = ""
pcf_file = ""
Expand Down
3 changes: 3 additions & 0 deletions edalize/sandpipersaas.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def get_doc(cls, api_ver):
}

def configure_main(self):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)

if len(self.files) > 1:
raise RuntimeError("Only 1 TL-V file is allowed")
Expand Down
3 changes: 3 additions & 0 deletions edalize/verilator.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def check_managed_parser(self):
)

def configure_main(self):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
self.check_managed_parser()
if not self.toplevel:
raise RuntimeError(
Expand Down
3 changes: 3 additions & 0 deletions edalize/vivado.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ def get_doc(cls, api_ver):
}

def __init__(self, edam=None, work_root=None, eda_api=None, verbose=True):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
super().__init__(edam, work_root, eda_api, verbose)
edam["flow_options"] = edam["tool_options"]["vivado"]
self.vivado = Vivado_underlying(edam, work_root, verbose)
Expand Down
3 changes: 3 additions & 0 deletions edalize/yosys.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def get_doc(cls, api_ver):
}

def configure_main(self):
logger.warning(
"This backend is deprecated and will eventually be removed. Please migrate to the flow API instead. See https://edalize.readthedocs.io/en/latest/ref/migrations.html#migrating-from-the-tool-api-to-the-flow-api for more details."
)
# write Yosys tcl script file

yosys_template = self.tool_options.get("yosys_template")
Expand Down

0 comments on commit 5388db5

Please sign in to comment.