edalize package

Submodules

edalize.edatool module

class edalize.edatool.Edatool(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: object

build()[source]
build_main(target=None)[source]
build_post()[source]
build_pre()[source]
configure(args=[])[source]
configure_main()[source]
configure_post()[source]
configure_pre()[source]
classmethod get_doc(api_ver)[source]
parse_args(args, paramtypes)[source]
render_template(template_file, target_file, template_vars={})[source]

Render a Jinja2 template for the backend

The template file is expected in the directory templates/BACKEND_NAME.

run(args={})[source]
run_main()[source]
run_post()[source]
run_pre(args=None)[source]
class edalize.edatool.FileAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

edalize.edatool.jinja_filter_param_value_str(value, str_quote_style='', bool_is_str=False)[source]

Convert a parameter value to string suitable to be passed to an EDA tool

Rules:

  • Booleans are represented as 0/1 or “true”/”false” depending on the bool_is_str argument

  • Strings are either passed through or enclosed in the characters specified in str_quote_style (e.g. ‘”’ or ‘"’)

  • Everything else (including int, float, etc.) are converted using the str() function.

edalize.edatool.subprocess_run_3_9(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs)[source]

edalize.ghdl module

class edalize.ghdl.Ghdl(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogparam', 'generic']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.icarus module

class edalize.icarus.Icarus(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['plusarg', 'vlogdefine', 'vlogparam']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.icestorm module

class edalize.icestorm.Icestorm(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogdefine', 'vlogparam']
configure_main()[source]
classmethod get_doc(api_ver)[source]

edalize.ise module

class edalize.ise.Ise(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

MAKEFILE_TEMPLATE = '#Auto generated by Edalize\ninclude config.mk\n\nall: $(TOPLEVEL).bit\n\n$(TOPLEVEL).bit: $(NAME)_run.tcl $(NAME).xise\n\txtclsh $^\n\n$(NAME).xise: $(NAME).tcl\n\txtclsh $<\n'
PGM_FILE_TEMPLATE = '\n# Batch script for programming the device using a JTAG interface.\n# Used with:\n# $ impact -batch {pgm_file}\n\nsetMode -bscan\nsetCable -port auto\naddDevice -p 1 -file {bit_file}\nprogram -p 1\nsaveCDF -file {cdf_file}\nquit\n'
TCL_FILE_TEMPLATE = '#Auto generated by Edalize\nproc project_new_exist_ok name {{\n if {{ [catch {{ project new $name }}] }} {{\n project open $name\n }}\n}}\n\nproc xfile_add_exist_ok name {{\n if {{ [catch {{ xfile get [file tail $name] name }}] }} {{\n xfile add $name\n }}\n}}\n\nproject_new_exist_ok {design}\nproject set family {family}\nproject set device {device}\nproject set package {package}\nproject set speed {speed}\nproject set "Generate Detailed MAP Report" true\n'
TCL_RUN_FILE_TEMPLATE = '#Auto generated by Edalize\nproject open $::argv\nprocess run "Generate Programming File"\n'
argtypes = ['vlogdefine', 'vlogparam', 'generic']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.isim module

class edalize.isim.Isim(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

CONFIG_MK_TEMPLATE = '#Auto generated by Edalize\nTARGET = {target}\nTOPLEVEL = {toplevel}\n\nVLOG_DEFINES = {vlog_defines}\nVLOG_INCLUDES = {vlog_includes}\nVLOG_PARAMS = {vlog_params}\n\nFUSE_OPTIONS =\t{fuse_options}\nISIM_OPTIONS =\t{isim_options}\n\nEXTRA_OPTIONS ?= {extra_options}\n'
MAKEFILE_TEMPLATE = '#Auto generated by Edalize\ninclude config.mk\n\nall: $(TARGET)\n\n$(TARGET):\n\tfuse $(TOPLEVEL) -prj $(TARGET).prj -o $(TARGET) $(VLOG_DEFINES) $(VLOG_INCLUDES) $(VLOG_PARAMS) $(FUSE_OPTIONS)\n\nrun: $(TARGET)\n\t./$(TARGET) -tclbatch run_$(TARGET).tcl $(ISIM_OPTIONS) $(EXTRA_OPTIONS)\n\nrun-gui: $(TARGET)\n\t./$(TARGET) -gui $(ISIM_OPTIONS) $(EXTRA_OPTIONS)\n'
RUN_TCL_TEMPLATE = '#Auto generated by Edalize\nwave log -r /\nrun all\nquit\n'
argtypes = ['plusarg', 'vlogdefine', 'vlogparam']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.modelsim module

class edalize.modelsim.Modelsim(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['plusarg', 'vlogdefine', 'vlogparam', 'generic']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.quartus module

class edalize.quartus.Quartus(edam=None, work_root=None, eda_api=None)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogdefine', 'vlogparam', 'generic']
build_main()[source]
configure_main()[source]
file_type(f)[source]
classmethod get_doc(api_ver)[source]
isPro = False
makefile_template = {False: 'quartus-std-makefile.j2', True: 'quartus-pro-makefile.j2'}
qsys_file_filter(f)[source]
run_main()[source]
src_file_filter(f)[source]

edalize.rivierapro module

class edalize.rivierapro.Rivierapro(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['plusarg', 'vlogdefine', 'vlogparam']
build_main()[source]
build_pre()[source]
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.symbiyosys module

class edalize.symbiyosys.Symbiyosys(edam=None, work_root=None, eda_api=None)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogdefine', 'vlogparam']
build_main()[source]
configure_main()[source]
static get_doc(api_ver)[source]
run_main()[source]
tool_options = {'lists': {'tasknames': 'String'}}

edalize.spyglass module

class edalize.spyglass.Spyglass(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogdefine', 'vlogparam']
configure_main()[source]
src_file_filter(f)[source]
tool_options = {'lists': {'goals': 'String', 'rule_parameters': 'String', 'spyglass_options': 'String'}, 'members': {'methodology': 'String'}}
tool_options_defaults = {'goals': ['lint/lint_rtl'], 'methodology': 'GuideWare/latest/block/rtl_handoff', 'rule_parameters': [], 'spyglass_options': []}

edalize.trellis module

class edalize.trellis.Trellis(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogdefine', 'vlogparam']
configure_main()[source]
classmethod get_doc(api_ver)[source]

edalize.vcs module

class edalize.vcs.Vcs(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['plusarg', 'vlogdefine', 'vlogparam']
configure_main()[source]
run_main()[source]
tool_options = {'lists': {'run_options': 'String', 'vcs_options': 'String'}}

edalize.verilator module

class edalize.verilator.Verilator(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['cmdlinearg', 'plusarg', 'vlogdefine', 'vlogparam']
build_main()[source]
check_managed_parser()[source]
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.vivado module

class edalize.vivado.Vivado(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['vlogdefine', 'vlogparam', 'generic']
build_main()[source]
configure_main()[source]
classmethod get_doc(api_ver)[source]
get_version()[source]
run_main()[source]
src_file_filter(f)[source]
edalize.vivado.logger = <Logger edalize.vivado (WARNING)>

Vivado Backend

A core (usually the system core) can add the following files:

  • Standard design sources

  • Constraints: Supply xdc files with file_type=xdc or unmanaged constraints with file_type SDC

  • IP: Supply the IP core xci file with file_type=xci and other files (like .prj)

    as file_type=user

edalize.vunit module

class edalize.vunit.Vunit(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['cmdlinearg']
build_main()[source]
configure_main()[source]
classmethod get_doc(api_ver)[source]
get_vunit_runner_path(src_files)[source]
run_main()[source]
src_file_filter(f)[source]
src_file_vhdl_standard_filter(f)[source]
testrunner = 'run.py'
testrunner_template = 'run.py.j2'

edalize.vunit_hooks module

This module exports VUnitHooks which can be used to implement advanced VUnit test cases.

class edalize.vunit_hooks.VUnitHooks[source]

Bases: object

Derive the VUnitRunner instance from this class and override its member functions if necessary.

create()[source]

Override this function to specify custom instantiation of VUnit.

Return type

VUnit

handle_library(logical_name, vu_lib)[source]

Override this to customize each library, e.g. with additional simulator options.

main(vu)[source]

Override this for final parametrization of the VUnit instance, or for custom invocation of VUnit.

class edalize.vunit_hooks.VUnitRunner[source]

Bases: edalize.vunit_hooks.VUnitHooks

The default runner which will be used if no vunit_runner.py is specified.

edalize.xcelium module

class edalize.xcelium.Xcelium(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

argtypes = ['plusarg', 'vlogdefine', 'vlogparam', 'generic']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

edalize.xsim module

class edalize.xsim.Xsim(edam=None, work_root=None, eda_api=None, verbose=True)[source]

Bases: edalize.edatool.Edatool

CONFIG_MK_TEMPLATE = '#Auto generated by Edalize\nTARGET = {target}\nTOPLEVEL = {toplevel}\n\nVLOG_DEFINES = {vlog_defines}\nVLOG_INCLUDES = {vlog_includes}\nGEN_PARAMS = {gen_params}\n\nXELAB_OPTIONS =\t{xelab_options}\nXSIM_OPTIONS = {xsim_options}\n'
MAKEFILE_TEMPLATE = '#Auto generated by Edalize\ninclude config.mk\n\nall: xsim.dir/$(TARGET)/xsimk\n\nxsim.dir/$(TARGET)/xsimk:\n\txelab $(TOPLEVEL) -prj $(TARGET).prj -snapshot $(TARGET) $(VLOG_DEFINES) $(VLOG_INCLUDES) $(GEN_PARAMS) $(XELAB_OPTIONS)\n\nrun: xsim.dir/$(TARGET)/xsimk\n\txsim -R $(XSIM_OPTIONS) $(TARGET) $(EXTRA_OPTIONS)\n\nrun-gui: xsim.dir/$(TARGET)/xsimk\n\txsim --gui $(XSIM_OPTIONS) $(TARGET) $(EXTRA_OPTIONS)\n'
argtypes = ['plusarg', 'vlogdefine', 'vlogparam', 'generic']
configure_main()[source]
classmethod get_doc(api_ver)[source]
run_main()[source]

Module contents

edalize.get_edatool(name)[source]
edalize.get_edatools()[source]
edalize.walk_tool_packages()[source]