ADM TEST en
Version 1 (Dmitry Smekhov, 06/12/2013 12:50 am)
1 | 1 | h1. ADM TEST |
|
---|---|---|---|
2 | 1 | ||
3 | 1 | The program is designed to test the operation of the module with the FPGA project ADM. |
|
4 | 1 | ||
5 | 1 | h2. Features |
|
6 | 1 | ||
7 | 1 | * Display information BAR0 - list of control units |
|
8 | 1 | * Display information BAR1 - list of control units TEST_CHECK, TEST_GENERATE |
|
9 | 1 | * Checking of the data input from TRD_MAIN |
|
10 | 1 | * Checking of the data input from DIO_IN |
|
11 | 1 | * Checking of the data output to the DIO_OUT |
|
12 | 1 | * Synchronous data input from the DIO_IN and data output to the DIO_OUT |
|
13 | 1 | * The calculation of the current exchange rate - in the interval 4 seconds |
|
14 | 1 | * Calculating the average exchange rate - with the launch of |
|
15 | 1 | * Error logging |
|
16 | 1 | ||
17 | 1 | h2. Source code |
|
18 | 1 | ||
19 | 1 | The source code of the program is in the repository: *trunk/soft/linux/application/adm_test* |
|
20 | 1 | ||
21 | 1 | Catalogs: |
|
22 | 1 | * *bin* - executable and configuration files |
|
23 | 1 | * *src* - source code |
|
24 | 1 | ||
25 | 1 | Catalog *src* |
|
26 | 1 | * *Makefile* - for build |
|
27 | 1 | * *work* - source code |
|
28 | 1 | ||
29 | 1 | The program uses the files in the directory *trunk/soft/linux/common/* |
|
30 | 1 | * *pex* - contains class files: *pex_board* |
|
31 | 1 | * *utils* - contains useful files |
|
32 | 1 | ||
33 | 1 | ||
34 | 1 | h2. Starting the program |
|
35 | 1 | ||
36 | 1 | Before starting the program you want to load driver *pexdrv*. |
|
37 | 1 | To load the driver script is used *insert* from the directory *soft/linux/driver* |
|
38 | 1 | Loading the driver: *sudo ./Insert*. |
|
39 | 1 | Unloading Driver: *sudo rmmod pexdrv* |
|
40 | 1 | ||
41 | 1 | ||
42 | 1 | To view a list of available devices can run the command *ls /dev/AMB* * |
|
43 | 1 | The device name is formed as follows: /dev/<device name> <sequencenumber of the device> |
|
44 | 1 | For example: /dev/AMBPEX50 |
|
45 | 1 | ||
46 | 1 | Launch: |
|
47 | 1 | *./adm_test <device name> <configuration file> [<configuration file>]* |
|
48 | 1 | ||
49 | 1 | * <device name> - logical device name, for example */dev/pexdrv0* (not currently implemented, is always used *pexdrv0*) |
|
50 | 1 | * <configuration file> - cfg file with parameters |
|
51 | 1 | ||
52 | 1 | List of configuration files: |
|
53 | 1 | * *test_main.cfg* - inputs from the TRD_MAIN |
|
54 | 1 | * *test_dio_s128.cfg* - inputs from DIO_IN |
|
55 | 1 | * *out_dio_s128.cfg* - output to the DIO_OUT |
|
56 | 1 | ||
57 | 1 | If given two file that runs two of the testing process, if only one file is only one testing process. |
|
58 | 1 | ||
59 | 1 | h2. Example: |
|
60 | 1 | ||
61 | 1 | Command: ./adm_test test_main.cfg |
|
62 | 1 | Output: |
|
63 | 1 | <pre> |
|
64 | 1 | dsmv@dsmv-linux:~/pcie_ds_dma/trunk/soft/linux/application/adm_test/bin$ ./ |
|
65 | 1 | adm_test .svn/ |
|
66 | 1 | dsmv@dsmv-linux:~/pcie_ds_dma/trunk/soft/linux/application/adm_test/bin$ ./adm_test test_main.cfg |
|
67 | 1 | Map BAR0: 0xfe800000 -> 0x7f6594a1a000 |
|
68 | 1 | Map BAR1: 0xfe600000 -> 0x7f659481a000 |
|
69 | 1 | core_init() |
|
70 | 1 | core_init(): BlockID = 0x1013, BlockVER = 0x101. |
|
71 | 1 | core_init(): DeviceID = 0x5504, DeviceRev = 0x210. |
|
72 | 1 | core_init(): PldVER = 0x104. |
|
73 | 1 | core_init(): Block count = 8. |
|
74 | 1 | core_init(): Channel(ID) = 0(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2. |
|
75 | 1 | core_init(): Channel(ID) = 1(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2. |
|
76 | 1 | core_init(): Prepare ADM PLD. |
|
77 | 1 | Firmware PLD ADM |
|
78 | 1 | SIG = 0x4953 - Ok |
|
79 | 1 | ADM interface version: 2.0 |
|
80 | 1 | Base module: 0x5507 v2.0 |
|
81 | 1 | Submodule: 0x0000 v0.0 |
|
82 | 1 | Firmware modificaton: 0 |
|
83 | 1 | Firmware version: 1.1 |
|
84 | 1 | Firmware build number: 0x0100 |
|
85 | 1 | ||
86 | 1 | Information about the tetrads: |
|
87 | 1 | ||
88 | 1 | 0 0x0001 TRD_MAIN MOD: 8 VER: 1.4 FIFO IN 256x64 |
|
89 | 1 | 1 0x004F TEST_CTRL MOD: 1 VER: 1.3 |
|
90 | 1 | 2 0x0000 - |
|
91 | 1 | 3 0x0000 - |
|
92 | 1 | 4 0x0000 - |
|
93 | 1 | 5 0x0000 - |
|
94 | 1 | 6 0x0013 DIO64_IN MOD: 6 VER: 1.2 FIFO IN 1024x64 |
|
95 | 1 | 7 0x0012 DIO64_OUT MOD: 1 VER: 1.3 FIFO OUT 1024x64 |
|
96 | 1 | Module /dev/pexdrv0 successfuly opened |
|
97 | 1 | ||
98 | 1 | Read parameters from file: test_main.cfg |
|
99 | 1 | ||
100 | 1 | ||
101 | 1 | ||
102 | 1 | ||
103 | 1 | ||
104 | 1 | Parameters: |
|
105 | 1 | ||
106 | 1 | CntBuffer 8 |
|
107 | 1 | CntBlockInBuffer 1 |
|
108 | 1 | SizeBlockOfWords 262144 |
|
109 | 1 | isCycle 1 |
|
110 | 1 | isSystem 1 |
|
111 | 1 | isAgreeMode 0 |
|
112 | 1 | isRestart 0 |
|
113 | 1 | trdNo 0 |
|
114 | 1 | strmNo 1 |
|
115 | 1 | isTest 1 |
|
116 | 1 | isMainTest 1 |
|
117 | 1 | AdmReg (null) |
|
118 | 1 | isAdmReg 0 |
|
119 | 1 | AdmReg2 (null) |
|
120 | 1 | isAdmReg2 0 |
|
121 | 1 | ISVI_FILE (null) |
|
122 | 1 | ISVI_HEADER 0 |
|
123 | 1 | FifoRdy 1 |
|
124 | 1 | Cnt1 0 |
|
125 | 1 | Cnt2 0 |
|
126 | 1 | DataType 6 |
|
127 | 1 | DataFix 1 |
|
128 | 1 | isTestCtrl 0 |
|
129 | 1 | TestSeq 0 |
|
130 | 1 | ||
131 | 1 | ||
132 | 1 | ||
133 | 1 | Total stream buffer size: 8 MB |
|
134 | 1 | ||
135 | 1 | ||
136 | 1 | Preparing tetrade |
|
137 | 1 | ||
138 | 1 | Tetrade 0 ID: 0x01 MOD: 8 VER: 1.4 |
|
139 | 1 | ||
140 | 1 | In tetrade MAIN set of pseudo-random mode sequence |
|
141 | 1 | Allocation memory: |
|
142 | 1 | Type of block: system memory |
|
143 | 1 | Block size: 8 MB |
|
144 | 1 | 0: 0x8d900000 -> 0x7f6596550000 |
|
145 | 1 | 1: 0x8da00000 -> 0x7f659471a000 |
|
146 | 1 | 2: 0x8db00000 -> 0x7f659461a000 |
|
147 | 1 | 3: 0x94400000 -> 0x7f659451a000 |
|
148 | 1 | 4: 0x94500000 -> 0x7f659441a000 |
|
149 | 1 | 5: 0x94600000 -> 0x7f659431a000 |
|
150 | 1 | 6: 0x94700000 -> 0x7f659421a000 |
|
151 | 1 | 7: 0x94800000 -> 0x7f659411a000 |
|
152 | 1 | Stub: 0xa556d000 -> 0x7f659666d000 |
|
153 | 1 | Allocate stream memory - Ok |
|
154 | 1 | core_set_local_addr(): DmaChan=1 addr=0x00000000 |
|
155 | 1 | Stream working in regular mode |
|
156 | 1 | core_start_dma(): DmaChan=1 IsCycling=1 |
|
157 | 1 | core_start_dma(): IOCTL_AMB_START_MEMIO core_start_dma - OK |
|
158 | 1 | BLOCK_WR BLOCK_RD BLOCK_OK BLOCK_ERR SPD_CURR SPD_AVR STATUS |
|
159 | 1 | ||
160 | 1 | TRD : 0 0 295899 295899 0 799.8 799.0 0x006F 0 0 |
|
161 | 1 | ||
162 | 1 | ||
163 | 1 | </pre> |
|
164 | 1 | ||
165 | 1 | There is parameters in the last line. |
|
166 | 1 | ||
167 | 1 | * number of trd - without name in the title |
|
168 | 1 | * *BLOCK_WR* - number of the transmitten blocks |
|
169 | 1 | * *BLOCK_RD* - number of the received blocks |
|
170 | 1 | * *BLOCK_OK* - number of the blocks with correct data |
|
171 | 1 | * *BLOCK_ERR* - number of the blocks with errors |
|
172 | 1 | * *SPD_CURR* - speed of data transfer during of last 4 second [Mbytes per second] |
|
173 | 1 | * *SPD_AVR* - speed of data transfer with program start [Mbytes per second] |
|
174 | 1 | * *STATUS* - content of STATUS register in the TRD |
|
175 | 1 | ||
176 | 1 | 799.0 - PCI Express v1.1 x4 - project AMBPEX5_v20_SX50T_CORE |