flinklib
flinklib: flink C library for Linux
doc/flink_test_base_devices.md
Go to the documentation of this file.
1 # Test Program for Basic Devices
2 
3 ## Hardware Setup
4 To run this test you need a [MPC5200I-O Board](http://phytec.com/products/system-on-modules/phycore/mpc5200b-io/) or any other Processor which connects a Cyclone II over a local plus bus.
5 
6 ## VHDL Desing
7 The first step to run this test is to compile and download the test design which can be found [here](https://github.com/flink-project/flinkvhdl/tree/master/axiComponents/testing/testdesigns/lpb/baseDevTesting)
8 
9 The design contains the following devices:
10 
11  ________________
12  | |
13  | Info Device |
14  |________________|
15 
16  ________________
17  | |
18  | GPIO Device | <------|
19  |________________| |
20  |
21  ________________ |
22  | | |
23  | GPIO Device | -------|
24  |________________|
25 
26  ________________
27  | | <----------|
28  | FQD Device | |
29  |________________| <------| |
30  | |
31  ________________ | |
32  | | | |
33  | OUT IO Device | -------| |
34  |________________| |
35  ________________ |
36  | | |
37  | OUT IO Device | -----------|
38  |________________|
39 
40  ________________
41  | |
42  | PWM Device | -------|
43  |________________| |
44  |
45  ________________ |
46  | | |
47  | IN IO Device | <------|
48  |________________|
49 
50 ## Testcases
51 The following testcases are implemented in the test program:
52 - Test if the number of devices is right
53 - For every subdevice it reads the unique id and tests if it matchs to the coresponding function
54 - For every subdevice if there is a subfunction this will also be tested
55 - For every subdevice it tests the number of channels
56 - The info device descriptor register is rode
57 - Reset the fqd device and test if the counter register resets to zero
58 - Bitbang the out_io devices to simulate an encoder. Than read the counter register and check if it has the right value.
59 - Configure the two gpio devices to one only inputs and one only outputs. Than set the outputs and reade the inputs of the other device and check if the values match. The setting and reading is done in various orders.
60 - Set the period and the hightime of the pwm device to a random value and use the in_io device to measure the times.
61 - reset the pwm device and test if the period and hightime register change to default values
62 
63 ## Run the Test
64 The program can be run with the -d parameter to specify which flink device should be tested. For example: ./flink_test_base_devices -d /dev/flink0
65 
66