Edalize

raw JSON →
0.6.8 verified Mon Apr 27 auth: no python

Python library for interfacing EDA tools (simulators, linters, synthesis) with a common interface. Current version 0.6.8, supports Python 3.9+. Active development with moderate release cadence.

pip install edalize
error ModuleNotFoundError: No module named 'edalize'
cause Edalize not installed.
fix
pip install edalize
error ValueError: Unknown tool 'icarus'
cause Tool name misspelled or not registered.
fix
Use correct tool name: 'icarus', 'verilator', 'vivado', etc. See edalize.get_available_tools()
error TypeError: string indices must be integers
cause Files passed as a plain list of strings instead of list of dicts.
fix
Use [{'name': 'file.v', 'file_type': 'verilogSource'}].
gotcha Do not pass files as strings; always use a list of dicts with 'name' and 'file_type'.
fix Use [{'name': 'file.v', 'file_type': 'verilogSource'}] instead of 'file.v'.
gotcha Legacy backends (e.g., 'icarus' as a backend) are deprecated in 0.6.x. Use the flow API (e.g., icarus from get_edatool).
fix Use get_edatool('icarus', ...) instead of creating backend objects directly.
deprecated The 'symbiflow' backend was renamed to 'apicula' in 0.6.4.
fix Use tool='apicula' instead of 'symbiflow'.
breaking Edalize 0.5.0 introduced a new Flow API. Old-style backend classes (e.g., Edatool) may not work with flows.
fix Migrate to using get_edatool() and the Flow API.

Basic simulation with Icarus Verilog.

from edalize import get_edatool

# Create tool configuration (EDAM)
edam = {
    'name': 'my_design',
    'files': [{'name': 'top.v', 'file_type': 'verilogSource'}],
    'toplevel': 'top',
    'tool_options': {
        'icarus': {
            'iverilog_options': ['-g2012']
        }
    }
}

# Get tool instance
tool = get_edatool('icarus', edam=edam)
tool.configure()
tool.build()
tool.run()