How to use the fusesoc.vlnv.Vlnv function in fusesoc

To help you get started, we’ve selected a few fusesoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github olofk / fusesoc / tests / test_capi2.py View on Github external
core = Core(os.path.join(tests_dir,
                             "capi2_cores",
                             "misc",
                             "depends.core"))
    flags = {}
    result = core.get_depends(flags)

    expected = [
        Vlnv('unversioned'),
        Vlnv('versioned-1.0'),
        Vlnv('gt-1.0'),
        Vlnv('>=gte-1.0'),
        Vlnv('::n'),
        Vlnv('::nv:1.0'),
        Vlnv(':l:nv:1.0'),
        Vlnv('v:l:nv:1.0'),
        Vlnv('<::vlnvlt:1.0'),
        Vlnv('<=::vlnvlte:1.0'),
        Vlnv('=::vlnveq:1.0'),
        Vlnv('>::vlnvgt:1.0'),
        Vlnv('>=::vlnvgte:1.0'),
    ]
    assert len(result) == len(expected)
    for i in range(len(result)):
        assert result[i] == expected[i]
github olofk / fusesoc / tests / test_capi2.py View on Github external
Vlnv('unversioned'),
        Vlnv('versioned-1.0'),
        Vlnv('gt-1.0'),
        Vlnv('>=gte-1.0'),
        Vlnv('::n'),
        Vlnv('::nv:1.0'),
        Vlnv(':l:nv:1.0'),
        Vlnv('v:l:nv:1.0'),
        Vlnv('<::vlnvlt:1.0'),
        Vlnv('<=::vlnvlte:1.0'),
        Vlnv('=::vlnveq:1.0'),
        Vlnv('>::vlnvgt:1.0'),
        Vlnv('>=::vlnvgte:1.0'),
    ]
    assert len(result) == len(expected)
    for i in range(len(result)):
        assert result[i] == expected[i]
github olofk / fusesoc / tests / test_vlnv.py View on Github external
def test_name_only_vlnv():
    assert vlnv_tuple(Vlnv("::uart16550")) == \
    ('', '', 'uart16550', '0', 0)
    assert vlnv_tuple(Vlnv("::uart16550:")) == \
    ('', '', 'uart16550', '0', 0)
github olofk / fusesoc / tests / test_vlnv.py View on Github external
def test_name_only_legacy():
    assert vlnv_tuple(Vlnv("uart16550")) == \
    ('', '', 'uart16550', '0', 0)
github olofk / fusesoc / tests / test_capi2.py View on Github external
def test_capi2_get_depends():
    from fusesoc.core import Core
    from fusesoc.vlnv import Vlnv

    core = Core(os.path.join(tests_dir,
                             "capi2_cores",
                             "misc",
                             "depends.core"))
    flags = {}
    result = core.get_depends(flags)

    expected = [
        Vlnv('unversioned'),
        Vlnv('versioned-1.0'),
        Vlnv('gt-1.0'),
        Vlnv('>=gte-1.0'),
        Vlnv('::n'),
        Vlnv('::nv:1.0'),
        Vlnv(':l:nv:1.0'),
        Vlnv('v:l:nv:1.0'),
        Vlnv('<::vlnvlt:1.0'),
        Vlnv('<=::vlnvlte:1.0'),
        Vlnv('=::vlnveq:1.0'),
        Vlnv('>::vlnvgt:1.0'),
        Vlnv('>=::vlnvgte:1.0'),
    ]
    assert len(result) == len(expected)
    for i in range(len(result)):
github olofk / fusesoc / tests / test_vlnv.py View on Github external
def test_name_version_legacy():
    assert vlnv_tuple(Vlnv("uart16550-1.5")) == \
    ('', '', 'uart16550', '1.5', 0)
github olofk / fusesoc / tests / test_vlnv.py View on Github external
def test_name_with_dash_only_legacy():
    assert vlnv_tuple(Vlnv("wb-axi")) == \
    ('', '', 'wb-axi', '0', 0)
github olofk / fusesoc / fusesoc / main.py View on Github external
def _get_core(cm, name):
    core = None
    try:
        core = cm.get_core(Vlnv(name))
    except RuntimeError as e:
        logger.error(str(e))
        exit(1)
    except DependencyError as e:
        logger.error("'" + name + "' or any of its dependencies requires '" + e.value + "', but this core was not found")
        exit(1)
    return core