WB TEST en

Version 2 (Dmitry Smekhov, 07/01/2013 02:01 am)

1 1
h1. WB TEST 
2 1
3 1
The program is designed to test the operation of the module with the FPGA project WISHBONE.
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 the TEST_GENERATE
10 1
* Checking of the data output to the TEST_CHECK
11 1
* Synchronous data input from the TEST_GENERATE and data output to the TEST_CHECK
12 1
* The calculation of the current exchange rate - in the interval 4 seconds
13 1
* Calculating the average exchange rate - with the launch of
14 1
* Error logging
15 1
16 1
h2. Source code
17 1
18 1
The source code of the program is in the repository: *trunk/soft/linux/application/wb_test*
19 1
20 1
Catalogs:
21 1
* *bin* - executable and configuration files
22 1
* *src* - source code
23 1
24 1
Catalog *src*
25 1
* *Makefile* - for build 
26 1
* *work* - source code
27 1
28 1
The program uses the files in the directory *trunk/soft/linux/common/*
29 1
*  *pex* -  contains class files: *pex_board*
30 1
*  *utils* - contains useful files
31 1
32 1
33 1
h2. Starting the program
34 1
35 1
Before starting the program you want to load driver *pexdrv*.
36 1
To load the driver script is used *insert* from the directory *soft/linux/driver*
37 1
Loading the driver: *sudo ./Insert*.
38 1
Unloading Driver: *sudo rmmod pexdrv*
39 1
40 1
41 1
To view a list of available devices can run the command *ls /dev/AMB* *
42 1
The device name is formed as follows: /dev/<device name> <sequencenumber of the device>
43 1
For example: /dev/AMBPEX50
44 1
45 1
Launch:
46 1
 *./wb_test  <device name> <configuration file> [<configuration file>]*
47 1
48 1
* <device name> - logical device name, for example */dev/pexdrv0* (not currently implemented, is always used *pexdrv0*)
49 1
* <configuration file> - cfg file with parameters
50 1
51 1
List of configuration files:
52 1
* *test_gen.cfg* - inputs from the TEST_GENERATE
53 1
* *out_check.cfg* - output to the TEST_CHECK
54 1
55 1
If given two file that runs two of the testing process, if only one file is only one testing process.
56 2 Dmitry Smekhov
57 2 Dmitry Smekhov
h2. Example: 
58 2 Dmitry Smekhov
59 2 Dmitry Smekhov
Command: *./wb_test test_gen.cfg*
60 2 Dmitry Smekhov
Output:
61 2 Dmitry Smekhov
<pre>
62 2 Dmitry Smekhov
63 2 Dmitry Smekhov
dsmv@dsmv-linux:~/pcie_ds_dma/trunk/soft/linux/application/wb_test/bin$ ./wb_test test_gen.cfg
64 2 Dmitry Smekhov
Map BAR0: 0xfe800000 -> 0x7f4b4ff03000
65 2 Dmitry Smekhov
Map BAR1: 0xfe600000 -> 0x7f4b4fd03000
66 2 Dmitry Smekhov
core_init()
67 2 Dmitry Smekhov
core_init(): BlockID = 0x1013, BlockVER = 0x101.
68 2 Dmitry Smekhov
core_init(): DeviceID = 0x5504, DeviceRev = 0x210.
69 2 Dmitry Smekhov
core_init(): PldVER = 0x104.
70 2 Dmitry Smekhov
core_init(): Block count = 8.
71 2 Dmitry Smekhov
core_init(): Channel(ID) = 0(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2.
72 2 Dmitry Smekhov
core_init(): Channel(ID) = 1(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2.
73 2 Dmitry Smekhov
core_init(): Prepare ADM PLD.
74 2 Dmitry Smekhov
Board PEXDRV open succesfully
75 2 Dmitry Smekhov
FPGA WB
76 2 Dmitry Smekhov
77 2 Dmitry Smekhov
WB block info:
78 2 Dmitry Smekhov
79 2 Dmitry Smekhov
 0  0x001A TEST_CHECK      MOD: 0  VER: 1.0 
80 2 Dmitry Smekhov
 1  0x001B TEST_GENERATE   MOD: 0  VER: 1.0 
81 2 Dmitry Smekhov
82 2 Dmitry Smekhov
83 2 Dmitry Smekhov
Read parameters from file: test_gen.cfg
84 2 Dmitry Smekhov
85 2 Dmitry Smekhov
86 2 Dmitry Smekhov
87 2 Dmitry Smekhov
88 2 Dmitry Smekhov
89 2 Dmitry Smekhov
Parameters:
90 2 Dmitry Smekhov
91 2 Dmitry Smekhov
CntBuffer  8
92 2 Dmitry Smekhov
CntBlockInBuffer  1
93 2 Dmitry Smekhov
SizeBlockOfWords  262144
94 2 Dmitry Smekhov
isCycle  1
95 2 Dmitry Smekhov
isSystem  1
96 2 Dmitry Smekhov
isAgreeMode  1
97 2 Dmitry Smekhov
strmNo  1
98 2 Dmitry Smekhov
isTest  2
99 2 Dmitry Smekhov
FifoRdy  1
100 2 Dmitry Smekhov
Cnt1  0
101 2 Dmitry Smekhov
Cnt2  0
102 2 Dmitry Smekhov
DataType  6
103 2 Dmitry Smekhov
DataFix  1
104 2 Dmitry Smekhov
105 2 Dmitry Smekhov
106 2 Dmitry Smekhov
107 2 Dmitry Smekhov
Allocation memory: 
108 2 Dmitry Smekhov
 Type of buffer:    system memory
109 2 Dmitry Smekhov
 Buffer size: 8 MB  (8x1 MB)
110 2 Dmitry Smekhov
111 2 Dmitry Smekhov
0: 0x8f400000 -> 0x7f4b513ef000
112 2 Dmitry Smekhov
1: 0x8f500000 -> 0x7f4b4fc03000
113 2 Dmitry Smekhov
2: 0x8f600000 -> 0x7f4b4fb03000
114 2 Dmitry Smekhov
3: 0x8f700000 -> 0x7f4b4fa03000
115 2 Dmitry Smekhov
4: 0x89800000 -> 0x7f4b4f903000
116 2 Dmitry Smekhov
5: 0x89900000 -> 0x7f4b4f803000
117 2 Dmitry Smekhov
6: 0x89a00000 -> 0x7f4b4f703000
118 2 Dmitry Smekhov
7: 0x89b00000 -> 0x7f4b4f603000
119 2 Dmitry Smekhov
Stub: 0xb5bcd000 -> 0x7f4b5150a000
120 2 Dmitry Smekhov
Allocate stream memory - Ok
121 2 Dmitry Smekhov
core_set_local_addr(): DmaChan=1 addr=0x00003000 
122 2 Dmitry Smekhov
Stream working in adjust mode
123 2 Dmitry Smekhov
core_start_dma(): DmaChan=1 IsCycling=1 
124 2 Dmitry Smekhov
core_start_dma(): IOCTL_AMB_START_MEMIO   core_start_dma - OK 
125 2 Dmitry Smekhov
ID=0x001B 
126 2 Dmitry Smekhov
VER=0x0100 
127 2 Dmitry Smekhov
GEN_CTRL=0x0001 
128 2 Dmitry Smekhov
GEN_CTRL=0x06A0 
129 2 Dmitry Smekhov
             BLOCK_WR   BLOCK_RD   BLOCK_OK  BLOCK_ERR   SPD_CURR    SPD_AVR     STATUS  SIG         TIME  
130 2 Dmitry Smekhov
131 2 Dmitry Smekhov
 TRD :   0     245366     245366     245366          0      799.8      799.8     0x0309  0xAAAAAAAA  5:06 
132 2 Dmitry Smekhov
133 2 Dmitry Smekhov
</pre>
134 2 Dmitry Smekhov
135 2 Dmitry Smekhov
There is parameters in the last line.
136 2 Dmitry Smekhov
137 2 Dmitry Smekhov
138 2 Dmitry Smekhov
* *BLOCK_WR* - number of the transmitten blocks
139 2 Dmitry Smekhov
* *BLOCK_RD* - number of the received blocks
140 2 Dmitry Smekhov
* *BLOCK_OK* - number of the blocks with correct data
141 2 Dmitry Smekhov
* *BLOCK_ERR* - number of the blocks with errors
142 2 Dmitry Smekhov
* *SPD_CURR* - speed of data transfer during of last 4 second  [Mbytes per second]
143 2 Dmitry Smekhov
* *SPD_AVR*  - speed of data transfer with program start [Mbytes per second]
144 2 Dmitry Smekhov
* *STATUS*   - content of STATUS register
145 2 Dmitry Smekhov
* *SIG*      - value of SIG register
146 2 Dmitry Smekhov
* *TIME*     - current time of test
147 2 Dmitry Smekhov
148 2 Dmitry Smekhov
Press Ctrl-C for exit;
149 2 Dmitry Smekhov
150 2 Dmitry Smekhov
Result of test:
151 2 Dmitry Smekhov
152 2 Dmitry Smekhov
<pre>
153 2 Dmitry Smekhov
Cancel
154 2 Dmitry Smekhov
 TRD :   0     245490     245489     245489          0      799.8      799.8     0x0309  0xAAAAAAAA  5:06 
155 2 Dmitry Smekhov
156 2 Dmitry Smekhov
Result of receiving data 
157 2 Dmitry Smekhov
158 2 Dmitry Smekhov
 Recieved blocks :   245490 
159 2 Dmitry Smekhov
 Correct blocks  :   245489 
160 2 Dmitry Smekhov
 Incorrect blocks:   0 
161 2 Dmitry Smekhov
 Total errors    :   0 
162 2 Dmitry Smekhov
163 2 Dmitry Smekhov
 Speed           :   799.8 [Mbytes/s] 
164 2 Dmitry Smekhov
 Time of test    :   5 min 07 sec
165 2 Dmitry Smekhov
166 2 Dmitry Smekhov
All data is correct. No error
167 2 Dmitry Smekhov
168 2 Dmitry Smekhov
</pre>
169 2 Dmitry Smekhov
170 2 Dmitry Smekhov
799.8 - PCI Express v1.1 x4 - project AMBPEX5_v20_SX50T_WISHBONE