Ejemplo 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')
Ejemplo 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')
Ejemplo 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
    )
Ejemplo 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')
Ejemplo 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')
Ejemplo 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')
Ejemplo 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')
Ejemplo 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',
    )
Ejemplo 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',
    )
Ejemplo 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')
Ejemplo 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',
    )
Ejemplo 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')
Ejemplo 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')