コード例 #1
0
ファイル: runtests.py プロジェクト: larry-xmos/lib_logging
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_logging", "simple_tests", "Simple functionality tests", """
	There is currently just one test for this library. It is a simple test that
	uses the various format specifiers and checks the output.
	""")

    resources = xmostest.request_resource("xsim")

    tester = xmostest.ComparisonTester(open('test.expect'), 'lib_logging',
                                       'simple_tests',
                                       'basic_functionality_test', {})

    xmostest.run_on_simulator(resources['xsim'],
                              'debug_printf_test/bin/debug_printf_test.xe',
                              tester=tester)

    xmostest.finish()
コード例 #2
0
                           help='Minimum packet data bytes',
                           default='46')
    argparser.add_argument('--data-len-max',
                           type=int,
                           help='Maximum packet data bytes',
                           default='500')
    argparser.add_argument('--weight-tagged',
                           type=int,
                           help='Weight of VLAN tagged traffic',
                           default='50')
    argparser.add_argument('--weight-untagged',
                           type=int,
                           help='Weight of non-VLAN tagged traffic',
                           default='50')
    argparser.add_argument('--max-hp-mbps',
                           type=int,
                           help='The maximum megabits per second',
                           default='1000')

    helpers.args = xmostest.init(argparser)

    xmostest.register_group(
        "lib_ethernet", "basic_tests", "Ethernet basic tests", """
Tests are performed by running the ethernet library connected to a
simulator model (written as a python plugin to xsim). Basic functioanlity is tested such as basic sending and receiving of packets, rejection of bad packets, interframe gap testing.
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #3
0
#!/usr/bin/env python
# Copyright (c) 2015-2019, XMOS Ltd, All rights reserved
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_gpio", "gpio_sim_tests", "GPIO simulator tests", """
Tests are performed by running the GPIO library connected to a simulator model
(written as a python plugin to xsim). The simulator model checks that the pins
are driven and read by the ports as expected. Tests are run to test the
following features:

    * Inputting on a multibit port with multiple clients using the default pin map
    * Inputting on a multibit port with multiple clients using a specified pin map
    * Inputting on a 1bit port
    * Inputting with timestamps
    * Eventing on a multibit input port
    * Eventing on a 1bit input port
    * Outputting on a multibit port with multiple clients using the default pin map
    * Outputting on a multibit port with multiple clients using a specified pin map
    * Outputting with timestamps
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #4
0
# Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
#!/usr/bin/env python2.7
import xmostest
from i2s_master_checker import I2SMasterChecker

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_i2s", "i2s_master_sim_tests", "I2S master simulator tests", """
Tests are performed by running the I2S library connected to a
simulator model (written as a python plugin to xsim). The simulator
model checks that the signals comply to the I2S specification.
Tests are run to test the following features:

    * Transmission of packets
    * Reception of packets
    * Interface protocol

The tests are run with transactions of varying number of bytes,
varying number of input and output channels. The tests are
run at different sampling rates of 192 KHz to 22.1 KHz.
""")

    xmostest.register_group(
        "lib_i2s", "i2s_frame_master_sim_tests",
        "I2S frame-based master simulator tests", """
Tests are performed by running the I2S library connected to a
simulator model (written as a python plugin to xsim). The simulator
model checks that the signals comply to the I2S specification.
Tests are run to test the following features:
コード例 #5
0
#!/usr/bin/env python
import xmostest, sys, subprocess

if __name__ == "__main__":
    xmostest.init()
    xmostest.register_group(
        "lib_src", "asrc_test", "Test ASRC conversion across sample rates",
        "This test iterates through all input and output sample rates using input 1KHz sine at 0db and 10/11KHz intermodulation tones. It checks the output against golden results generated by the original ASRC deliverable from Digimath."
    )
    xmostest.register_group(
        "lib_src", "ssrc_test", "Test SSRC conversion across sample rates",
        "This test iterates through all input and output sample rates using input 1KHz sine at 0db and 10/11KHz intermodulation tones. It checks the output against golden results generated by the original SSRC deliverable from Digimath."
    )
    xmostest.register_group("lib_src", "fixed_factor_of_3_tests",
                            "Test fixed factor of 3 conversion functions.",
                            "These tests check the DS3 and OS3 functions.")

    xmostest.runtests()
    xmostest.finish()
コード例 #6
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_mic_array",
                            "lib_mic_array_frontend_tests",
                            "lib_mic_array frontend tests",
    """
Tests the lib_mic_array frontend, tests for:
 * channel cross talk
 * check for correct FIR coefficients on each channel
""")

    xmostest.register_group("lib_mic_array",
                            "lib_mic_array_backend_tests",
                            "lib_mic_array backend tests",
    """
Tests the lib_mic_array backend, tests for:
 * 4, 8, 12, and 16 channels
 * FIR compensation
 * microphone gain compensation values
 * microphone gain compensation enabled/disabled
 * deciamtion factors: 2, 4, 6, 8 and 12
 * overlapping and non-overlapping frames
 * windowing function application
 * frame size log2 of 0, 1, 2, 3 and 4
 * index bit reversal enabled/disbaled
 * XTA elimination on unlinked code
""")
コード例 #7
0
ファイル: runtests.py プロジェクト: larry-xmos/lib_xassert
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_xassert", "simple_tests", "Simple functionality tests",
        "The tests for this library currently contain basic tests for the major functionality of the library."
    )

    xmostest.runtests()
    xmostest.finish()
コード例 #8
0
ファイル: runtests.py プロジェクト: pthedinger/lib_dsp
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_dsp", "simple_tests", "Simple functionality tests",
        "The tests for this library currently contain basic tests for the major functionality of the library."
    )

    xmostest.register_group(
        "lib_dsp", "fft_tests", "Test FFT correctness and functionality",
        "Test FFT correctness and functionality for all supported FFT lengths."
    )

    xmostest.runtests()
    xmostest.finish()
コード例 #9
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_lcd",
                            "lcd_sim_tests",
                            "LCD Simulator Tests",
    """
Tests are performed by running the LCD library connected to a simulator model 
(written as a python plugin to xsim). The simulator model checks the HSYNC and 
VSYNC timings, and the data sent by the testbench.

""")

    xmostest.runtests()

    xmostest.finish()


コード例 #10
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_display_controller",
                            "initialization_test",
                            "Display Controller Initialization Test",
    """
Test is performed by running the display controller library connected to a testbench and dummy severs for SDRAM and LCD 
(written in xC). The dummies check the initialization of display controller.

""")

    xmostest.register_group("lib_display_controller",
                            "functionality_tests",
                            "Display Controller Functionality Tests",
    """
Tests are performed by running the display controller library connected to a testbench and dummy severs for SDRAM and LCD 
(written in xC). The dummies check the basic functionality of display controller such
as SDRAM read and write, and frame commit.

""")

    xmostest.runtests()

    xmostest.finish()


コード例 #11
0
ファイル: runtests.py プロジェクト: choughtosh/lib_xcore_c
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_xcore_c",
                            "xcore_c_tests",
                            "Tests of the xCORE C library",
    """ Tests of the xCORE C library.
    """)

    xmostest.runtests()

    xmostest.finish()
コード例 #12
0
#!/usr/bin/env python
# Copyright (c) 2016-2018, XMOS Ltd, All rights reserved
import xmostest

if __name__ == '__main__':
    xmostest.init()
    xmostest.register_group('lib_device_control',
                            'lib_device_control_tests',
                            'Control library tests',
    '''
Control library tests
''')
    xmostest.runtests()
    xmostest.finish()
コード例 #13
0
ファイル: runtests.py プロジェクト: xmos/lib_logging
#!/usr/bin/env python
# Copyright (c) 2015-2019, XMOS Ltd, All rights reserved
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_logging",
                            "simple_tests",
                            "Simple functionality tests",
    """
    There is currently just one test for this library. It is a simple test that
    uses the various format specifiers and checks the output.
    """)

    xmostest.runtests()

    xmostest.finish()
コード例 #14
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_display_controller", "initialization_test",
        "Display Controller Initialization Test", """
Test is performed by running the display controller library connected to a testbench and dummy severs for SDRAM and LCD 
(written in xC). The dummies check the initialization of display controller.

""")

    xmostest.register_group(
        "lib_display_controller", "functionality_tests",
        "Display Controller Functionality Tests", """
Tests are performed by running the display controller library connected to a testbench and dummy severs for SDRAM and LCD 
(written in xC). The dummies check the basic functionality of display controller such
as SDRAM read and write, and frame commit.

""")

    xmostest.runtests()

    xmostest.finish()
コード例 #15
0
ファイル: runtests_manual.py プロジェクト: xmos/lib_lcd
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_lcd",
                            "single_lcd_testbench",
                            "Single LCD Testbench",
    """
Visual test is performed by running the LCD library on a
A16 sliceKIT with LCD slice attached to the circle slot. 
On the LCD display, one can 
see three colour bars (Red, Green and Blue) fading from left 
to right surrounded by a white border. Perfect display ensures 
testing of HSYNC and VSYNC pulses, and reproduction of basic colors.
""")

    xmostest.register_group("lib_i2c",
                            "dual_lcd_testbench",
                            "Dual LCD Testbench",
    """
Visual test is performed by running two LCD servers of the LCD library on a
A16 sliceKIT with LCD slices attached to the circle and square slots.
On each LCD, one can 
see three colour bars (Red, Green and Blue) fading from left 
to right surrounded by a white border. Perfect display ensures 
testing of HSYNC and VSYNC pulses, and reproduction of basic colors.
""")

    xmostest.runtests()
コード例 #16
0
ファイル: runtests.py プロジェクト: pthedinger/lib_led_array
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_neopixel", "neopixel_unit_tests", "Unit test",
                            """ Unit tests for the neopixel array
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #17
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_mic_array", "lib_mic_array_frontend_tests",
        "lib_mic_array frontend tests", """
Tests the lib_mic_array frontend, tests for:
 * channel cross talk
 * check for correct FIR coefficients on each channel
""")

    xmostest.register_group(
        "lib_mic_array", "lib_mic_array_backend_tests",
        "lib_mic_array backend tests", """
Tests the lib_mic_array backend, tests for:
 * 4, 8, 12, and 16 channels
 * FIR compensation
 * microphone gain compensation values
 * microphone gain compensation enabled/disabled
 * deciamtion factors: 2, 4, 6, 8 and 12
 * overlapping and non-overlapping frames
 * windowing function application
 * frame size log2 of 0, 1, 2, 3 and 4
 * index bit reversal enabled/disbaled
 * XTA elimination on unlinked code
""")

    xmostest.register_group(
コード例 #18
0
ファイル: runtests.py プロジェクト: xmos/lib_xcore_c
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_xcore_c", "xcore_c_tests",
                            "Tests of the xCORE C library",
                            """ Tests of the xCORE C library.
    """)

    xmostest.runtests()

    xmostest.finish()
コード例 #19
0
#!/usr/bin/env python2.7
import xmostest

if __name__ == '__main__':
    xmostest.init()
    xmostest.register_group('lib_device_control',
                            'lib_device_control_tests',
                            'Control library tests',
    '''
Control library tests
''')
    xmostest.runtests()
    xmostest.finish()
コード例 #20
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_uart",
                            "sim_regression",
                            "Uart Simulator Regression",
    """
    Several tests are performed in simulation with a loopback between the UART Tx
    and Rx ports. This tests the features of the individual components,
    verifying them against each other. The various options and use cases of the
    components are tested.
    """)

    xmostest.register_group("lib_uart", "sim_regression", "Uart Transmission Test",
    """
    """)


    xmostest.runtests()


    xmostest.finish()
コード例 #21
0
ファイル: runtests.py プロジェクト: xmos/lib_xassert
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
   xmostest.init()
    
   xmostest.register_group("lib_xassert",
                           "simple_tests",
                           "Simple functionality tests",
                           "The tests for this library currently contain basic tests for the major functionality of the library.")
    
   xmostest.runtests()
   xmostest.finish()
コード例 #22
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_trycatch",
                            "trycatch_tests",
                            "Tests of the xCORE trycatch library",
    """ Tests of the xCORE trycatch library.
    """)

    xmostest.runtests()

    xmostest.finish()
コード例 #23
0
ファイル: runtests.py プロジェクト: samchesney/lib_i2c
#!/usr/bin/env python
import xmostest
from i2c_master_checker import I2CMasterChecker

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_i2c",
                            "i2c_master_sim_tests",
                            "I2C master simulator tests",
    """
Tests are performed by running the I2C library connected to a
simulator model (written as a python plugin to xsim). The simulator
model checks that the signals comply to the I2C specification and checks the
protocol speed of the transactions. Tests are run to test the following
features:
     
    * Transmission of packets
    * Reception of packets
     
The tests are run with transactions of varying number of bytes and with rx and
tx transactions interleaved. The tests are run at speeds of 10, 100 and 400
Kbps.
""")

    xmostest.register_group("lib_i2c",
                            "i2c_slave_sim_tests",
                            "I2C slave simulator tests",
    """
Tests are performed by running the I2C library connected to a
simulator model (written as a python plugin to xsim). The simulator
コード例 #24
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_locks", "locks_sim_tests", "Locks library simulator tests", """
Test some of the basic functionality of the locks library.
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #25
0
ファイル: runtests.py プロジェクト: ed-xmos/lib_i2s
#!/usr/bin/env python2.7
import xmostest
from i2s_master_checker import I2SMasterChecker

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_i2s",
                            "i2s_master_sim_tests",
                            "I2S master simulator tests",
    """
Tests are performed by running the I2S library connected to a
simulator model (written as a python plugin to xsim). The simulator
model checks that the signals comply to the I2S specification.
Tests are run to test the following features:

    * Transmission of packets
    * Reception of packets
    * Interface protocol

The tests are run with transactions of varying number of bytes,
varying number of input and output channels. The tests are
run at different sampling rates of 192 KHz to 22.1 KHz.
""")

    xmostest.register_group("lib_i2s",
                            "i2s_frame_master_sim_tests",
                            "I2S frame-based master simulator tests",
    """
Tests are performed by running the I2S library connected to a
simulator model (written as a python plugin to xsim). The simulator
コード例 #26
0
ファイル: runtests.py プロジェクト: choughtosh/lib_ethernet
    argparser.add_argument('--phy', choices=['mii', 'rgmii'], type=str, help='Run tests only on specified PHY')
    argparser.add_argument('--arch', choices=['xs1', 'xs2'], type=str, help='Run tests only on specified xcore architecture')
    argparser.add_argument('--clk', choices=['25Mhz', '125Mhz'], type=str, help='Run tests only at specified clock speed')
    argparser.add_argument('--mac', choices=['rt', 'rt_hp', 'standard'], type=str, help='Run tests only on specified MAC')
    argparser.add_argument('--seed', type=int, help='The seed', default=None)
    argparser.add_argument('--verbose', action='store_true', help='Enable verbose tracing in the phys')

    argparser.add_argument('--num-packets', type=int, help='Number of packets in the test', default='100')
    argparser.add_argument('--weight-hp', type=int, help='Weight of high priority traffic', default='50')
    argparser.add_argument('--weight-lp', type=int, help='Weight of low priority traffic', default='25')
    argparser.add_argument('--weight-other', type=int, help='Weight of other (dropped) traffic', default='25')
    argparser.add_argument('--data-len-min', type=int, help='Minimum packet data bytes', default='46')
    argparser.add_argument('--data-len-max', type=int, help='Maximum packet data bytes', default='500')
    argparser.add_argument('--weight-tagged', type=int, help='Weight of VLAN tagged traffic', default='50')
    argparser.add_argument('--weight-untagged', type=int, help='Weight of non-VLAN tagged traffic', default='50')
    argparser.add_argument('--max-hp-mbps', type=int, help='The maximum megabits per second', default='1000')

    helpers.args = xmostest.init(argparser)

    xmostest.register_group("lib_ethernet",
                            "basic_tests",
                            "Ethernet basic tests",
    """
Tests are performed by running the ethernet library connected to a
simulator model (written as a python plugin to xsim). Basic functioanlity is tested such as basic sending and receiving of packets, rejection of bad packets, interframe gap testing.
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #27
0
ファイル: runtests.py プロジェクト: xmos/lib_locks
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_locks",
                            "locks_sim_tests",
                            "Locks library simulator tests",
    """
Test some of the basic functionality of the locks library.
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #28
0
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_xtcp",
                            "slicekit_configuration_tests",
                            "Slickit configuration tests",
    """
Test different configurations of a sliceKIT-200 communicating with a PC using
a simple ping-pong test.
    """
    )

    xmostest.register_group("lib_xtcp",
                            "micarray_configuration_tests",
                            "Micarray configuration tests",
    """
Test different configurations of an Array Microphone communicating with a PC using
a simple ping-pong test.
    """
    )

    xmostest.register_group("lib_xtcp",
                            "explorer_configuration_tests",
                            "Explorer kit configuration tests",
    """
Test different configurations of a explorerKIT-200 communicating with a PC using
a simple ping-pong test.
    """
コード例 #29
0
ファイル: runtests.py プロジェクト: xmos/lib_gpio
#!/usr/bin/env python
# Copyright (c) 2015-2019, XMOS Ltd, All rights reserved
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group("lib_gpio",
                            "gpio_sim_tests",
                            "GPIO simulator tests",
    """
Tests are performed by running the GPIO library connected to a simulator model
(written as a python plugin to xsim). The simulator model checks that the pins
are driven and read by the ports as expected. Tests are run to test the
following features:

    * Inputting on a multibit port with multiple clients using the default pin map
    * Inputting on a multibit port with multiple clients using a specified pin map
    * Inputting on a 1bit port
    * Inputting with timestamps
    * Eventing on a multibit input port
    * Eventing on a 1bit input port
    * Outputting on a multibit port with multiple clients using the default pin map
    * Outputting on a multibit port with multiple clients using a specified pin map
    * Outputting with timestamps
""")

    xmostest.runtests()

    xmostest.finish()
コード例 #30
0
ファイル: runtests.py プロジェクト: larry-xmos/lib_i2c
#!/usr/bin/env python
import xmostest
from i2c_master_checker import I2CMasterChecker

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_i2c", "i2c_master_sim_tests", "I2C master simulator tests", """
Tests are performed by running the I2C library connected to a
simulator model (written as a python plugin to xsim). The simulator
model checks that the signals comply to the I2C specification and checks the
protocol speed of the transactions. Tests are run to test the following
features:
     
    * Transmission of packets
    * Reception of packets
     
The tests are run with transactions of varying number of bytes and with rx and
tx transactions interleaved. The tests are run at speeds of 10, 100 and 400
Kbps.
""")

    xmostest.register_group(
        "lib_i2c", "i2c_slave_sim_tests", "I2C slave simulator tests", """
Tests are performed by running the I2C library connected to a
simulator model (written as a python plugin to xsim). The simulator
model checks that the signals comply to the I2C specification and checks the
protocol speed of the transactions. Tests are run to test the following
features:
     
コード例 #31
0
#!/usr/bin/env python
import xmostest

if __name__ == '__main__':
    xmostest.init()
    xmostest.register_group('lib_tsn', 'lib_tsn_tests', 'TSN library tests',
                            '''
TSN library tests
''')
    xmostest.runtests()
    xmostest.finish()
コード例 #32
0
ファイル: runtests_manual.py プロジェクト: xmos/lib_lcd
#!/usr/bin/env python
import xmostest

if __name__ == "__main__":
    xmostest.init()

    xmostest.register_group(
        "lib_lcd", "single_lcd_testbench", "Single LCD Testbench", """
Visual test is performed by running the LCD library on a
A16 sliceKIT with LCD slice attached to the circle slot. 
On the LCD display, one can 
see three colour bars (Red, Green and Blue) fading from left 
to right surrounded by a white border. Perfect display ensures 
testing of HSYNC and VSYNC pulses, and reproduction of basic colors.
""")

    xmostest.register_group(
        "lib_i2c", "dual_lcd_testbench", "Dual LCD Testbench", """
Visual test is performed by running two LCD servers of the LCD library on a
A16 sliceKIT with LCD slices attached to the circle and square slots.
On each LCD, one can 
see three colour bars (Red, Green and Blue) fading from left 
to right surrounded by a white border. Perfect display ensures 
testing of HSYNC and VSYNC pulses, and reproduction of basic colors.
""")

    xmostest.runtests()