Ejemplo n.º 1
0
def test_incomplete_edam():
    from edalize import get_edatool

    with pytest.raises(RuntimeError) as excinfo:
        backend = get_edatool("icarus")(edam={"version": "0.1.2"})
    assert "Missing required parameter 'name'" in str(excinfo.value)

    backend = get_edatool("icarus")(edam={"version": "0.1.2", "name": "corename"})
Ejemplo n.º 2
0
def test_incomplete_eda_api():
    from edalize import get_edatool

    with pytest.raises(RuntimeError) as excinfo:
        backend = get_edatool('icarus')(eda_api={'version' : '0.1.2'})
    assert "Missing required parameter 'name'" in str(excinfo.value)

    backend = get_edatool('icarus')(eda_api={
        'version' : '0.1.2',
        'name' : 'corename'})
Ejemplo n.º 3
0
    def run(self, pnr, args):
        with Timed(self, 'total'):
            os.makedirs(self.out_dir, exist_ok=True)
            for f in self.srcs:
                self.files.append({
                    'name': os.path.realpath(f),
                    'file_type': 'verilogSource'
                })

            if self.pcf is not None:
                self.files.append({
                    'name': os.path.realpath(self.pcf),
                    'file_type': 'PCF'
                })

            self.edam = {
                'files': self.files,
                'name': self.project_name,
                'toplevel': self.top,
                'tool_options': {
                    'icestorm': {
                        'nextpnr_options': args.split(),
                        'arachne_pnr_options': args.split(),
                        'pnr': pnr,
                        'part': self.device
                    }
                }
            }

            self.backend = edalize.get_edatool('icestorm')(
                edam=self.edam, work_root=self.out_dir)
            self.backend.configure("")
            self.backend.build()
            self.backend.build_main('timing')
Ejemplo n.º 4
0
def _setup_backend(name, tool, paramtypes, files, tool_options, work_root,
                   use_vpi, toplevel):
    """Set up a backend.

    The backend is called *name*, is set up for *tool* with *tool_options*,
    *paramtypes*, and, if *use_vpi* is ``True``, definitions from :attr:`VPI`.
    If *files* is None, files are taken from :attr:`FILES`.
    """
    parameters = param_gen(paramtypes)

    _vpi = []
    if use_vpi:
        _vpi = VPI
        for v in VPI:
            for f in v["src_files"]:
                _f = os.path.join(work_root, f)
                if not os.path.exists(os.path.dirname(_f)):
                    os.makedirs(os.path.dirname(_f))
                with open(_f, "a"):
                    os.utime(_f, None)

    edam = {
        "name": name,
        "files": FILES if files is None else files,
        "parameters": parameters,
        "tool_options": {
            tool: tool_options
        },
        "toplevel": toplevel,
        "vpi": _vpi,
    }

    return get_edatool(tool)(edam=edam, work_root=work_root)
Ejemplo n.º 5
0
def test_vcs_minimal():
    import os
    import shutil
    import tempfile

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir = os.path.join(tests_dir, __name__, 'minimal')
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    tool = 'vcs'
    name = 'test_' + tool + '_minimal_0'
    work_root = tempfile.mkdtemp(prefix=tool + '_')

    edam = {'name': name, 'toplevel': 'top'}

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    compare_files(ref_dir, work_root, ['Makefile', name + '.scr'])

    backend.build()
    compare_files(ref_dir, work_root, ['vcs.cmd'])

    backend.run()

    compare_files(ref_dir, work_root, ['run.cmd'])
Ejemplo n.º 6
0
def test_vcs_minimal(tmpdir):
    import os

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir = os.path.join(tests_dir, __name__, "minimal")
    os.environ["PATH"] = (os.path.join(tests_dir, "mock_commands") + ":" +
                          os.environ["PATH"])
    tool = "vcs"
    name = "test_" + tool + "_minimal_0"
    work_root = str(tmpdir)

    edam = {"name": name, "toplevel": "top"}

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    compare_files(ref_dir, work_root, ["Makefile", name + ".scr"])

    backend.build()
    compare_files(ref_dir, work_root, ["vcs.cmd"])

    backend.run()

    compare_files(ref_dir, work_root, ["run.cmd"])
Ejemplo n.º 7
0
def test_icarus_minimal(tmpdir):
    import os

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir = os.path.join(tests_dir, __name__, 'minimal')
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    tool = 'icarus'
    name = 'test_' + tool + '_minimal_0'
    work_root = str(tmpdir)

    edam = {'name': name, 'toplevel': 'top'}

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    compare_files(ref_dir, work_root, [
        'Makefile',
        name + '.scr',
    ])

    backend.build()
    compare_files(ref_dir, work_root, ['iverilog.cmd'])

    backend.run()

    compare_files(ref_dir, work_root, ['vvp.cmd'])
Ejemplo n.º 8
0
def _setup_backend(name, tool, paramtypes, files, tool_options, work_root,
                   use_vpi):
    """Set up a backend.

    The backend is called *name*, is set up for *tool* with *tool_options*,
    *paramtypes*, and, if *use_vpi* is ``True``, definitions from :attr:`VPI`.
    If *files* is None, files are taken from :attr:`FILES`.
    """
    parameters = param_gen(paramtypes)

    _vpi = []
    if use_vpi:
        _vpi = VPI
        for v in VPI:
            for f in v['src_files']:
                _f = os.path.join(work_root, f)
                if not os.path.exists(os.path.dirname(_f)):
                    os.makedirs(os.path.dirname(_f))
                with open(_f, 'a'):
                    os.utime(_f, None)

    edam = {
        'name': name,
        'files': FILES if files is None else files,
        'parameters': parameters,
        'tool_options': {
            tool: tool_options
        },
        'toplevel': 'top_module',
        'vpi': _vpi
    }

    return get_edatool(tool)(edam=edam, work_root=work_root)
Ejemplo n.º 9
0
def test_vivado_minimal():
    import os
    import shutil
    import tempfile

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir      = os.path.join(tests_dir, __name__, 'minimal')
    os.environ['PATH'] = os.path.join(tests_dir, 'mock_commands')+':'+os.environ['PATH']
    tool = 'vivado'
    name = 'test_vivado_minimal_0'
    work_root = tempfile.mkdtemp(prefix=tool+'_')

    edam = {'name'         : name}

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure([])

    compare_files(ref_dir, work_root, [
        'Makefile',
        name+'.tcl',
        name+'_run.tcl',
    ])

    backend.build()
    compare_files(ref_dir, work_root, [
        'vivado.cmd',
    ])
Ejemplo n.º 10
0
def setup_backend(paramtypes, name, tool, tool_options, use_vpi=False):
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    (parameters, args) = param_gen(paramtypes)

    work_root = tempfile.mkdtemp(prefix=tool + '_')

    _vpi = []
    if use_vpi:
        _vpi = vpi
        for v in vpi:
            for f in v['src_files']:
                _f = os.path.join(work_root, f)
                if not os.path.exists(os.path.dirname(_f)):
                    os.makedirs(os.path.dirname(_f))
                with open(_f, 'a'):
                    os.utime(_f, None)

    eda_api_file = os.path.join(work_root, name + '.eda.yml')
    with open(eda_api_file, 'w') as f:
        f.write(
            yaml.dump({
                'name': name,
                'files': files,
                'parameters': parameters,
                'tool_options': {
                    tool: tool_options
                },
                'toplevel': 'top_module',
                'vpi': _vpi
            }))

    return (get_edatool(tool)(eda_api_file=eda_api_file), args, work_root)
Ejemplo n.º 11
0
def test_edam_files():
    from edalize import get_edatool
    files = [{
        'name': 'plain_file'
    }, {
        'name': 'subdir/plain_include_file',
        'is_include_file': True
    }, {
        'name': 'file_with_args',
        'file_type': 'verilogSource',
        'logical_name': 'libx'
    }, {
        'name': 'include_file_with_args',
        'is_include_file': True,
        'file_type': 'verilogSource',
        'logical_name': 'libx'
    }]
    edam = {'files': files, 'name': 'test_edam_files'}

    backend = get_edatool('icarus')(edam=edam)
    (parsed_files, incdirs) = backend._get_fileset_files()

    assert len(parsed_files) == 2
    assert parsed_files[0].name == 'plain_file'
    assert parsed_files[0].file_type == ''
    assert parsed_files[0].logical_name == ''
    assert parsed_files[1].name == 'file_with_args'
    assert parsed_files[1].file_type == 'verilogSource'
    assert parsed_files[1].logical_name == 'libx'

    assert incdirs == ['subdir', '.']
Ejemplo n.º 12
0
def test_edam_files():
    from edalize import get_edatool

    files = [
        {"name": "plain_file"},
        {"name": "subdir/plain_include_file", "is_include_file": True},
        {
            "name": "file_with_args",
            "file_type": "verilogSource",
            "logical_name": "libx",
        },
        {
            "name": "include_file_with_args",
            "is_include_file": True,
            "file_type": "verilogSource",
            "logical_name": "libx",
        },
    ]
    edam = {"files": files, "name": "test_edam_files"}

    backend = get_edatool("icarus")(edam=edam)
    (parsed_files, incdirs) = backend._get_fileset_files()

    assert len(parsed_files) == 2
    assert parsed_files[0].name == "plain_file"
    assert parsed_files[0].file_type == ""
    assert parsed_files[0].logical_name == ""
    assert parsed_files[1].name == "file_with_args"
    assert parsed_files[1].file_type == "verilogSource"
    assert parsed_files[1].logical_name == "libx"

    assert incdirs == ["subdir", "."]
Ejemplo n.º 13
0
def test_edam_multiple_hooks(tmpdir):
    """Test if more than one hook gets successfully executed."""

    import os.path
    from edalize import get_edatool

    hooks = {
        "pre_build": [
            {
                "cmd": ["/usr/bin/touch", "hook_1_executed.txt"],
                "name": "hook_1",
            },
            {
                "cmd": ["/usr/bin/touch", "hook_2_executed.txt"],
                "name": "hook_2",
            },
        ]
    }

    work_root = str(tmpdir)
    edam = {"hooks": hooks, "name": "test_edam_multiple_hooks"}

    assert not os.path.exists(os.path.join(work_root, "hook_1_executed.txt"))
    assert not os.path.exists(os.path.join(work_root, "hook_2_executed.txt"))

    backend = get_edatool("icarus")(edam=edam, work_root=work_root)
    backend.build_pre()

    assert os.path.exists(os.path.join(work_root, "hook_1_executed.txt"))
    assert os.path.exists(os.path.join(work_root, "hook_2_executed.txt"))
Ejemplo n.º 14
0
def test_radiant_minimal(tmpdir):
    import os

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir = os.path.join(tests_dir, __name__, 'minimal')
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    tool = 'radiant'
    tool_options = {
        'part': 'LIFCL-40-9BG400C',
    }
    name = 'test_{}_minimal_0'.format(tool)
    work_root = str(tmpdir)

    edam = {'name': name, 'tool_options': {tool: tool_options}}

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    compare_files(ref_dir, work_root, [
        name + '.tcl',
        name + '_run.tcl',
    ])

    backend.build()
    compare_files(ref_dir, work_root, [
        'radiantc.cmd',
    ])
Ejemplo n.º 15
0
def test_vivado_minimal():
    import os
    import shutil
    import tempfile
    import yaml

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir = os.path.join(tests_dir, __name__, 'minimal')
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    tool = 'vivado'
    name = 'test_vivado_minimal_0'
    work_root = tempfile.mkdtemp(prefix=tool + '_')

    eda_api_file = os.path.join(work_root, name + '.eda.yml')
    with open(eda_api_file, 'w') as f:
        f.write(yaml.dump({'name': name}))

    backend = get_edatool(tool)(eda_api_file=eda_api_file)
    backend.configure([])

    compare_files(ref_dir, work_root, [
        'Makefile',
        name + '.tcl',
        name + '_run.tcl',
    ])

    backend.build()
    compare_files(ref_dir, work_root, [
        'vivado.cmd',
    ])
Ejemplo n.º 16
0
def test_diamond_minimal():
    import os
    import shutil
    import tempfile

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir      = os.path.join(tests_dir, __name__, 'minimal')
    os.environ['PATH'] = os.path.join(tests_dir, 'mock_commands')+':'+os.environ['PATH']
    tool = 'diamond'
    tool_options = {
        'part' : 'LFE5U-85F-6BG381C',
    }
    name = 'test_{}_minimal_0'.format(tool)
    work_root = tempfile.mkdtemp(prefix=tool+'_')

    edam = {'name'         : name,
            'tool_options' : {tool : tool_options}
    }

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    compare_files(ref_dir, work_root, [
        name+'.tcl',
        name+'_run.tcl',
    ])

    backend.build()
    compare_files(ref_dir, work_root, [
        'diamondc.cmd',
    ])
Ejemplo n.º 17
0
def test_eda_api_files():
    import tempfile
    import yaml

    from edalize import get_edatool
    files = [{'name' : 'plain_file'},
             {'name' : 'subdir/plain_include_file',
              'is_include_file' : True},
             {'name' : 'file_with_args',
              'file_type' : 'verilogSource',
              'logical_name' : 'libx'},
             {'name' : 'include_file_with_args',
              'is_include_file' : True,
              'file_type' : 'verilogSource',
              'logical_name' : 'libx'}]
    (h, eda_api_file) = tempfile.mkstemp(prefix='eda_api_files_')
    with open(eda_api_file,'w') as f:
        f.write(yaml.dump({'files' : files,
                           'name' : 'test_eda_api_files'}))

    backend = get_edatool('icarus')(eda_api_file=eda_api_file)
    (parsed_files, incdirs) = backend._get_fileset_files()

    assert len(parsed_files) == 2
    assert parsed_files[0].name         == 'plain_file'
    assert parsed_files[0].file_type    == ''
    assert parsed_files[0].logical_name == ''
    assert parsed_files[1].name         == 'file_with_args'
    assert parsed_files[1].file_type    == 'verilogSource'
    assert parsed_files[1].logical_name == 'libx'

    assert incdirs == ['subdir', '.']
Ejemplo n.º 18
0
def setup_backend(paramtypes, name, tool, tool_options, use_vpi=False):
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    parameters = param_gen(paramtypes)

    work_root = tempfile.mkdtemp(prefix=tool + '_')

    _vpi = []
    if use_vpi:
        _vpi = vpi
        for v in vpi:
            for f in v['src_files']:
                _f = os.path.join(work_root, f)
                if not os.path.exists(os.path.dirname(_f)):
                    os.makedirs(os.path.dirname(_f))
                with open(_f, 'a'):
                    os.utime(_f, None)

    edam = {
        'name': name,
        'files': files,
        'parameters': parameters,
        'tool_options': {
            tool: tool_options
        },
        'toplevel': 'top_module',
        'vpi': _vpi
    }

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    return (backend, work_root)
Ejemplo n.º 19
0
def test_empty_edam():
    import tempfile
    from edalize import get_edatool

    (h, edam_file) = tempfile.mkstemp()

    with pytest.raises(TypeError):
        backend = get_edatool("icarus")(edam=None)
Ejemplo n.º 20
0
def test_empty_eda_api():
    import tempfile
    from edalize import get_edatool

    (h, eda_api_file) = tempfile.mkstemp()

    with pytest.raises(RuntimeError):
        backend = get_edatool('icarus')(eda_api_file=eda_api_file)
Ejemplo n.º 21
0
    def run(self):
        with Timed(self, 'total'):
            with Timed(self, 'prepare'):
                os.makedirs(self.out_dir, exist_ok=True)
                for f in self.srcs:
                    if f.endswith(".vhd") or f.endswith(".vhdl"):
                        self.files.append({
                            'name': os.path.realpath(f),
                            'file_type': 'vhdlSource'
                        })
                    elif f.endswith(".v"):
                        self.files.append({
                            'name': os.path.realpath(f),
                            'file_type': 'verilogSource'
                        })

                self.files.append({
                    'name': os.path.realpath(self.xdc),
                    'file_type': 'xdc'
                })

                chip = self.family + self.device + self.package

                vivado_settings = os.getenv('VIVADO_SETTINGS')

                vivado_options = {
                    'part': chip,
                    'synth': self.synthtool,
                    'vivado-settings': vivado_settings,
                    'yosys_synth_options': self.synthoptions,
                }
                if hasattr(self, 'library_files'):
                    vivado_options['library_files'] = self.library_files

                self.edam = {
                    'files': self.files,
                    'name': self.project_name,
                    'toplevel': self.top,
                    'parameters': {
                        'VIVADO': {
                            'paramtype': 'vlogdefine',
                            'datatype': 'int',
                            'default': 1,
                        },
                    },
                    'tool_options': {
                        'vivado': vivado_options
                    }
                }
                self.backend = edalize.get_edatool('vivado')(
                    edam=self.edam, work_root=self.out_dir)
                self.backend.configure("")

            self.backend.build()

        self.add_runtimes()
        self.add_maximum_memory_use()
Ejemplo n.º 22
0
def setup_backend_minimal(name, tool, files):
    os.environ['PATH'] = os.path.join(tests_dir, 'mock_commands')+':'+os.environ['PATH']

    work_root = tempfile.mkdtemp(prefix=tool+'_')

    eda_api = {'name'         : name,
               'files'        : files,
               'toplevel'     : 'top_module',
    }
    return (get_edatool(tool)(eda_api=eda_api,
                              work_root=work_root), work_root)
Ejemplo n.º 23
0
def test_incomplete_eda_api():
    import tempfile
    import yaml
    from edalize import get_edatool

    (h, eda_api_file) = tempfile.mkstemp()
    contents = []
    
    with open(eda_api_file,'w') as f:
        f.write(yaml.dump({'version' : '0.1.2'}))

    with pytest.raises(RuntimeError) as excinfo:
        backend = get_edatool('icarus')(eda_api_file=eda_api_file)
    assert "Missing required parameter 'name'" in str(excinfo.value)

    with open(eda_api_file,'w') as f:
        f.write(yaml.dump({'version' : '0.1.2',
                           'name' : 'corename'}))

    backend = get_edatool('icarus')(eda_api_file=eda_api_file)
Ejemplo n.º 24
0
def setup_backend_minimal(name, tool, files):
    os.environ['PATH'] = os.path.join(tests_dir, 'mock_commands')+':'+os.environ['PATH']

    work_root = tempfile.mkdtemp(prefix=tool+'_')

    eda_api_file = os.path.join(work_root, name+'.eda.yml')
    with open(eda_api_file,'w') as f:
        f.write(yaml.dump({'name'         : name,
                           'files'        : files,
                           'toplevel'     : 'top_module',
                           }))
    return (get_edatool(tool)(eda_api_file=eda_api_file), work_root)
Ejemplo n.º 25
0
    def run(self):
        with Timed(self, 'total'):
            with Timed(self, 'prepare'):
                os.environ[
                    "EDALIZE_LAUNCHER"] = f"source {os.path.abspath('env.sh') + ' quicklogic'} &&"
                os.makedirs(self.out_dir, exist_ok=True)

                edam, _ = self.prepare_edam(self.device)
                self.backend = edalize.get_edatool('symbiflow')(
                    edam=edam, work_root=self.out_dir)
                self.backend.configure("")

            self.run_steps()
Ejemplo n.º 26
0
    def run(self):
        with Timed(self, 'total'):
            with Timed(self, 'prepare'):
                os.makedirs(self.out_dir, exist_ok=True)

                edam = self.prepare_edam()
                self.backend = edalize.get_edatool('vivado')(
                    edam=edam, work_root=self.out_dir)
                self.backend.configure("")

            self.backend.build()

        self.add_runtimes()
        self.add_maximum_memory_use()
Ejemplo n.º 27
0
    def run(self, pnr, args):
        with Timed(self, 'total'):
            os.makedirs(self.out_dir, exist_ok=True)

            self.env_script = os.path.abspath('env.sh') + ' nextpnr'
            os.environ["EDALIZE_LAUNCHER"] = f"source {self.env_script} &&"

            edam = self.prepare_edam(pnr, args)
            self.backend = edalize.get_edatool('icestorm')(
                edam=edam, work_root=self.out_dir)
            self.backend.configure("")
            self.backend.build()
            self.backend.build_main('timing')
        del os.environ["EDALIZE_LAUNCHER"]
Ejemplo n.º 28
0
def test_verilog_include_file_with_partial_include_path():
    from edalize import get_edatool
    files = [{
        'name': '../some_dir/some_subdir/some_file',
        'file_type': 'verilogSource',
        'is_include_file': True,
        'include_path': '../some_dir'
    }]
    edam = {'files': files, 'name': 'test_edam_files'}

    backend = get_edatool('icarus')(edam=edam)
    (parsed_files, incdirs) = backend._get_fileset_files()

    assert len(parsed_files) == 0
    assert incdirs == ['../some_dir']
Ejemplo n.º 29
0
def test_symbiflow(pnr_tool):
    import os
    import shutil
    import tempfile

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    ref_dir = os.path.join(tests_dir, __name__, pnr_tool)
    os.environ["PATH"] = (os.path.join(tests_dir, "mock_commands") + ":" +
                          os.environ["PATH"])
    tool = "symbiflow"
    tool_options = {
        "part": "xc7a35tcsg324-1",
        "package": "csg324-1",
        "vendor": "xilinx",
        "pnr": pnr_tool,
        "vpr_options": "--fake_option 1000"
    }
    name = "test_vivado_{}_0".format(pnr_tool)
    work_root = tempfile.mkdtemp(prefix=tool + "_")

    files = [{"name": "top.xdc", "file_type": "xdc"}]
    if pnr_tool == "nextpnr":
        files.append({"name": "chipdb.bin", "file_type": "bba"})

    edam = {
        "files": files,
        "name": name,
        "tool_options": {
            "symbiflow": tool_options
        },
    }

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    config_file_list = [
        "Makefile",
    ]

    if pnr_tool == "nextpnr":
        config_file_list.append(name + ".mk")
        config_file_list.append(name + ".tcl")
        config_file_list.append(name + "-nextpnr.mk")

    compare_files(ref_dir, work_root, config_file_list)
Ejemplo n.º 30
0
def test_vivado_minimal(params, tmpdir):
    import os

    from edalize import get_edatool

    from edalize_common import compare_files, tests_dir

    test_name, synth_tool = params

    ref_dir = os.path.join(tests_dir, __name__, test_name)
    os.environ['PATH'] = os.path.join(
        tests_dir, 'mock_commands') + ':' + os.environ['PATH']
    tool = 'vivado'
    tool_options = {
        'part': 'xc7a35tcsg324-1',
        'synth': synth_tool,
    }
    name = 'test_vivado_{}_0'.format(test_name)
    work_root = str(tmpdir)

    edam = {'name': name, 'tool_options': {'vivado': tool_options}}

    backend = get_edatool(tool)(edam=edam, work_root=work_root)
    backend.configure()

    config_file_list = [
        'Makefile',
        name + '.tcl',
        name + '_run.tcl',
        name + '_pgm.tcl',
    ]

    if synth_tool == "yosys":
        config_file_list.append(name + '.mk')
        config_file_list.append('edalize_yosys_procs.tcl')
        config_file_list.append('edalize_yosys_template.tcl')
    else:
        config_file_list.append(name + '_synth.tcl')

    compare_files(ref_dir, work_root, config_file_list)

    build_file_list = ['vivado.cmd']

    if synth_tool == "yosys":
        build_file_list.append('yosys.cmd')

    backend.build()
    compare_files(ref_dir, work_root, build_file_list)