Esempio n. 1
0
def test_cocotb_35():
    Run(verilog_sources=[
        os.path.join(tests_dir, 'designs', 'sample_module', 'sample_module.sv')
    ],
        python_search=[os.path.join(tests_dir, 'test_cases', 'test_cocotb')],
        toplevel='sample_module',
        module='test_cocotb_35')
Esempio n. 2
0
def test_verilog_access():
    Run(verilog_sources=[
        os.path.join(tests_dir, 'designs', 'uart2bus', 'verilog', file)
        for file in [
            'baud_gen.v', 'uart_parser.v', 'uart_rx.v', 'uart_tx.v',
            'uart_top.v', 'uart2bus_top.v'
        ]
    ] + [
        os.path.join(tests_dir, 'designs', 'uart2bus', 'top',
                     'verilog_toplevel.v')
    ],
        vhdl_sources=[
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'uart2BusTop_pkg.vhd'),
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'baudGen.vhd'),
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'uartParser.vhd'),
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'uartRx.vhd'),
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'uartTx.vhd'),
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'uartTop.vhd'),
            os.path.join(tests_dir, 'designs', 'uart2bus', 'vhdl',
                         'uart2BusTop.vhd'),
        ],
        python_search=[
            os.path.join(tests_dir, 'test_cases', 'test_verilog_access')
        ],
        toplevel='verilog_toplevel',
        module='test_verilog_access')
Esempio n. 3
0
def test_dff():
    Run(
        verilog_sources=['dff.v'],  # sources
        toplevel='dff',  # top level HDL
        python_search=['.'],  # search path for cocotb test module
        module='dff_cocotb'  # name of cocotb test module
    )
Esempio n. 4
0
def test_adder_verilog():
    Run(verilog_sources=[os.path.join(example_dir, 'adder', 'hdl', 'adder.v')],
        toplevel='adder',
        python_search=[
            os.path.join(example_dir, 'adder', 'tests'),
            os.path.join(example_dir, 'adder', 'model'),
        ],
        module='test_adder')
Esempio n. 5
0
def test_adder_vhdl():
    Run(vhdl_sources=[os.path.join(example_dir, 'adder', 'hdl', 'adder.vhdl')],
        toplevel='adder',
        python_search=[
            os.path.join(example_dir, 'adder', 'tests'),
            os.path.join(example_dir, 'adder', 'model'),
        ],
        module='test_adder',
        toplevel_lang='vhdl')
Esempio n. 6
0
def test_ping_tun_tap():
    if not (os.name == 'posix' and os.geteuid() == 0):
        pytest.skip("This test works only on a POSIX OS with admin rights")

    Run(verilog_sources=[
        os.path.join(example_dir, 'ping_tun_tap', 'hdl', 'icmp_reply.sv')
    ],
        toplevel='icmp_reply',
        python_search=[os.path.join(example_dir, 'ping_tun_tap', 'tests')],
        module='test_icmp_reply')
Esempio n. 7
0
def test_endian_swapper_vhdl():
    Run(vhdl_sources=[
        os.path.join(example_dir, 'endian_swapper', 'hdl',
                     'endian_swapper.vhdl'),
    ],
        toplevel='endian_swapper_vhdl',
        python_search=[
            os.path.join(example_dir, 'endian_swapper', 'tests'),
        ],
        module='test_endian_swapper',
        toplevel_lang='vhdl')
Esempio n. 8
0
def test_endian_swapper_verilog():
    Run(
        verilog_sources=[
            os.path.join(example_dir, 'endian_swapper', 'hdl',
                         'endian_swapper.sv'),
        ],
        toplevel='endian_swapper_sv',
        python_search=[
            os.path.join(example_dir, 'endian_swapper', 'tests'),
        ],
        module='test_endian_swapper',
    )
Esempio n. 9
0
def test_mean():
    Run(
        vhdl_sources=[
            os.path.join(example_dir, 'mean', 'hdl', 'mean_pkg.vhd'),
            os.path.join(example_dir, 'mean', 'hdl', 'mean.vhd'),
        ],
        verilog_sources=[
            os.path.join(example_dir, 'mean', 'hdl', 'mean_sv.sv')
        ],
        toplevel='mean_sv',
        python_search=[
            os.path.join(example_dir, 'mean', 'tests'),
        ],
        module='test_mean',
    )
Esempio n. 10
0
def test_mixed_top_vhdl():
    Run(vhdl_sources=[
        os.path.join(example_dir, 'endian_swapper', 'hdl',
                     'endian_swapper.vhdl'),
        os.path.join(example_dir, 'mixed_language', 'hdl', 'toplevel.vhdl')
    ],
        verilog_sources=[
            os.path.join(example_dir, 'endian_swapper', 'hdl',
                         'endian_swapper.sv'),
        ],
        toplevel='endian_swapper_mixed',
        python_search=[
            os.path.join(example_dir, 'mixed_language', 'tests'),
        ],
        module='test_mixed_language',
        toplevel_lang='vhdl')
Esempio n. 11
0
def test_axi_lite_slave():
    Run(
        verilog_sources=[
            os.path.join(example_dir, 'axi_lite_slave', 'hdl',
                         'axi_lite_slave.v'),
            os.path.join(example_dir, 'axi_lite_slave', 'hdl',
                         'axi_lite_demo.v'),
            os.path.join(example_dir, 'axi_lite_slave', 'hdl',
                         'tb_axi_lite_slave.v'),
        ],
        toplevel='tb_axi_lite_slave',
        include_dir=[
            os.path.join(example_dir, 'axi_lite_slave', 'hdl'),
        ],
        python_search=[
            os.path.join(example_dir, 'axi_lite_slave', 'tests'),
        ],
        module='test_axi_lite_slave',
    )
Esempio n. 12
0
def test_dff_vhdl():
    Run(vhdl_sources=[os.path.join(example_dir, 'dff', 'hdl', 'dff.vhdl')],
        toplevel='dff',
        python_search=[os.path.join(example_dir, 'dff', 'tests')],
        module='dff_cocotb',
        toplevel_lang='vhdl')
Esempio n. 13
0
def test_dff_verilog():
    Run(verilog_sources=[os.path.join(example_dir, 'dff', 'hdl', 'dff.v')],
        toplevel='dff',
        python_search=[os.path.join(example_dir, 'dff', 'tests')],
        module='dff_cocotb')