File List Standard
fileliststandard.py
import ucdp as u
class HdlFileList(u.ModFileList):
"""HDL File Lists."""
name: str = "hdl"
filepaths: u.ToPaths = (
# Path is relative to Module Python File
# Environment variables are supported too
# Wildcards are supported. Also in combination with environment variables!
"$PRJROOT/{mod.libname}/{mod.topmodname}/{view}/{mod.modname}.sv",
)
template_filepaths: u.ToPaths = ("main.mako",)
@staticmethod
def get_mod_placeholder(mod) -> u.Placeholder:
"""Get Module Placeholder."""
view = "tb" if mod.is_tb else "rtl"
return {
"mod": mod,
"view": view,
}