ADM TEST en

Version 2 (Dmitry Smekhov, 06/12/2013 03:00 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 2 Dmitry Smekhov
* *test_dio.cfg* - inputs from DIO64_IN
55 2 Dmitry Smekhov
* *out_dio.cfg* - output to the DIO64_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 2 Dmitry Smekhov
Command: *./adm_test test_main.cfg*
62 1
Output:
63 1
<pre>
64 2 Dmitry Smekhov
dsmv@dsmv-linux:~/pcie_ds_dma/trunk/soft/linux/application/adm_test/bin$ ./adm_test test_main.cfg
65 2 Dmitry Smekhov
Map BAR0: 0xfe800000 -> 0x7fd662af8000
66 2 Dmitry Smekhov
Map BAR1: 0xfe600000 -> 0x7fd6628f8000
67 1
core_init()
68 1
core_init(): BlockID = 0x1013, BlockVER = 0x101.
69 1
core_init(): DeviceID = 0x5504, DeviceRev = 0x210.
70 1
core_init(): PldVER = 0x104.
71 1
core_init(): Block count = 8.
72 1
core_init(): Channel(ID) = 0(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2.
73 1
core_init(): Channel(ID) = 1(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2.
74 1
core_init(): Prepare ADM PLD.
75 1
 Firmware PLD ADM
76 1
 SIG = 0x4953 - Ok
77 1
 ADM interface version:  2.0
78 1
 Base module: 0x5507  v2.0
79 1
 Submodule: 0x0000  v0.0
80 1
 Firmware modificaton:  0 
81 1
 Firmware version:       1.1
82 1
 Firmware build number: 0x0100
83 1
84 1
 Information about the tetrads:
85 1
86 1
 0  0x0001 TRD_MAIN           MOD: 8  VER: 1.4 FIFO IN   256x64
87 1
 1  0x004F TEST_CTRL       MOD: 1  VER: 1.3 
88 1
 2  0x0000  -             
89 1
 3  0x0000  -             
90 1
 4  0x0000  -             
91 1
 5  0x0000  -             
92 1
 6  0x0013 DIO64_IN        MOD: 6  VER: 1.2 FIFO IN   1024x64
93 1
 7  0x0012 DIO64_OUT       MOD: 1  VER: 1.3 FIFO OUT  1024x64
94 1
Module /dev/pexdrv0 successfuly opened
95 1
96 1
Read parameters from file: test_main.cfg
97 1
98 1
99 1
100 1
101 1
102 1
Parameters:
103 1
104 1
CntBuffer  8
105 1
CntBlockInBuffer  1
106 1
SizeBlockOfWords  262144
107 1
isCycle  1
108 1
isSystem  1
109 1
isAgreeMode  0
110 1
isRestart  0
111 1
trdNo  0
112 1
strmNo  1
113 1
isTest  1
114 1
isMainTest  1
115 1
AdmReg  (null)
116 1
isAdmReg  0
117 1
AdmReg2  (null)
118 1
isAdmReg2  0
119 1
ISVI_FILE  (null)
120 1
ISVI_HEADER  0
121 1
FifoRdy  1
122 1
Cnt1  0
123 1
Cnt2  0
124 1
DataType  6
125 1
DataFix  1
126 1
isTestCtrl  0
127 1
TestSeq  0
128 1
129 1
130 1
131 1
Total stream buffer size: 8 MB
132 1
133 1
134 1
Preparing tetrade
135 1
136 1
Tetrade 0  ID: 0x01 MOD: 8  VER: 1.4 
137 1
138 1
In tetrade MAIN set of pseudo-random mode sequence
139 1
Allocation memory: 
140 1
 Type of block:    system memory
141 1
 Block size: 8 MB
142 2 Dmitry Smekhov
0: 0x7f200000 -> 0x7fd66462e000
143 2 Dmitry Smekhov
1: 0x7f300000 -> 0x7fd6627f8000
144 2 Dmitry Smekhov
2: 0x7f400000 -> 0x7fd6626f8000
145 2 Dmitry Smekhov
3: 0x7f500000 -> 0x7fd6625f8000
146 2 Dmitry Smekhov
4: 0x7f600000 -> 0x7fd6624f8000
147 2 Dmitry Smekhov
5: 0x7f700000 -> 0x7fd6623f8000
148 2 Dmitry Smekhov
6: 0x7f800000 -> 0x7fd6622f8000
149 2 Dmitry Smekhov
7: 0x7f900000 -> 0x7fd6621f8000
150 2 Dmitry Smekhov
Stub: 0xa57cf000 -> 0x7fd66474b000
151 1
Allocate stream memory - Ok
152 1
core_set_local_addr(): DmaChan=1 addr=0x00000000 
153 1
Stream working in regular mode
154 1
core_start_dma(): DmaChan=1 IsCycling=1 
155 1
core_start_dma(): IOCTL_AMB_START_MEMIO   core_start_dma - OK 
156 1
157 2 Dmitry Smekhov
             BLOCK_WR   BLOCK_RD   BLOCK_OK  BLOCK_ERR   SPD_CURR    SPD_AVR     STATUS       TIME
158 1
159 2 Dmitry Smekhov
 TRD :   0          0     125557     125557          0      800.0      799.8     0x006F       2:36 
160 1
161 2 Dmitry Smekhov
162 1
</pre>
163 1
164 1
There is parameters in the last line.
165 1
166 1
*  number of trd  - without name in the title
167 1
* *BLOCK_WR* - number of the transmitten blocks
168 1
* *BLOCK_RD* - number of the received blocks
169 1
* *BLOCK_OK* - number of the blocks with correct data
170 1
* *BLOCK_ERR* - number of the blocks with errors
171 1
* *SPD_CURR* - speed of data transfer during of last 4 second  [Mbytes per second]
172 1
* *SPD_AVR*  - speed of data transfer with program start [Mbytes per second]
173 1
* *STATUS*   - content of STATUS register in the TRD
174 2 Dmitry Smekhov
* *TIME*     - current time of test
175 1
176 2 Dmitry Smekhov
Press Ctrl-C for exit;
177 2 Dmitry Smekhov
178 2 Dmitry Smekhov
Result of test:
179 2 Dmitry Smekhov
180 2 Dmitry Smekhov
<pre>
181 2 Dmitry Smekhov
Cancel
182 2 Dmitry Smekhov
 TRD :   0          0     125804     125804          0      800.0      799.8     0x006F       2:37 
183 2 Dmitry Smekhov
184 2 Dmitry Smekhov
Result of receiving data from trd 0 
185 2 Dmitry Smekhov
186 2 Dmitry Smekhov
 Recieved blocks :   125804 
187 2 Dmitry Smekhov
 Correct blocks  :   125804 
188 2 Dmitry Smekhov
 Incorrect blocks:   0 
189 2 Dmitry Smekhov
 Total errors    :   0 
190 2 Dmitry Smekhov
191 2 Dmitry Smekhov
 Speed           :   799.8 [Mbytes/s] 
192 2 Dmitry Smekhov
 Time of test    :   2 min 37 sec
193 2 Dmitry Smekhov
194 2 Dmitry Smekhov
All data is correct. No error
195 2 Dmitry Smekhov
196 2 Dmitry Smekhov
197 2 Dmitry Smekhov
Exit program
198 2 Dmitry Smekhov
199 2 Dmitry Smekhov
</pre>
200 2 Dmitry Smekhov
201 2 Dmitry Smekhov
799.8 - PCI Express v1.1 x4 - project AMBPEX5_v20_SX50T_CORE
202 2 Dmitry Smekhov
203 2 Dmitry Smekhov
h2. Other outputs
204 2 Dmitry Smekhov
205 2 Dmitry Smekhov
* *[[adm_test_test_dio_output|test_dio.cfg]]* - inputs from DIO64_IN
206 2 Dmitry Smekhov
* *[[adm_test_out_dio_output|out_dio.cfg]]* - inputs from DIO64_IN