ADM TEST¶
The program is designed to test the operation of the module with the FPGA project ADM.
Features¶
- Display information BAR0 - list of control units
- Display information BAR1 - list of control units TEST_CHECK, TEST_GENERATE
- Checking of the data input from TRD_MAIN
- Checking of the data input from DIO_IN
- Checking of the data output to the DIO_OUT
- Synchronous data input from the DIO_IN and data output to the DIO_OUT
- The calculation of the current exchange rate - in the interval 4 seconds
- Calculating the average exchange rate - with the launch of
- Error logging
Source code¶
The source code of the program is in the repository: trunk/soft/linux/application/adm_test
Catalogs:- bin - executable and configuration files
- src - source code
- Makefile - for build
- work - source code
- pex - contains class files: pex_board
- utils - contains useful files
Starting the program¶
Before starting the program you want to load driver pexdrv.
To load the driver script is used insert from the directory soft/linux/driver
Loading the driver: sudo ./Insert.
Unloading Driver: sudo rmmod pexdrv
To view a list of available devices can run the command ls /dev/AMB *
The device name is formed as follows: /dev/<device name> <sequencenumber of the device>
For example: /dev/AMBPEX50
Launch:
./adm_test <device name> <configuration file> [<configuration file>]
- <device name> - logical device name, for example /dev/pexdrv0 (not currently implemented, is always used pexdrv0)
- <configuration file> - cfg file with parameters
- test_main.cfg - inputs from the TRD_MAIN
- test_dio.cfg - inputs from DIO64_IN
- out_dio.cfg - output to the DIO64_OUT
If given two file that runs two of the testing process, if only one file is only one testing process.
Example:¶
Command: ./adm_test test_main.cfg
Output:
dsmv@dsmv-linux:~/pcie_ds_dma/trunk/soft/linux/application/adm_test/bin$ ./adm_test test_main.cfg
Map BAR0: 0xfe800000 -> 0x7fd662af8000
Map BAR1: 0xfe600000 -> 0x7fd6628f8000
core_init()
core_init(): BlockID = 0x1013, BlockVER = 0x101.
core_init(): DeviceID = 0x5504, DeviceRev = 0x210.
core_init(): PldVER = 0x104.
core_init(): Block count = 8.
core_init(): Channel(ID) = 0(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2.
core_init(): Channel(ID) = 1(0x18), FIFO size = 4096 Bytes, DMA Dir = 3, Max DMA size = 1024 MBytes, resource = 0x2.
core_init(): Prepare ADM PLD.
Firmware PLD ADM
SIG = 0x4953 - Ok
ADM interface version: 2.0
Base module: 0x5507 v2.0
Submodule: 0x0000 v0.0
Firmware modificaton: 0
Firmware version: 1.1
Firmware build number: 0x0100
Information about the tetrads:
0 0x0001 TRD_MAIN MOD: 8 VER: 1.4 FIFO IN 256x64
1 0x004F TEST_CTRL MOD: 1 VER: 1.3
2 0x0000 -
3 0x0000 -
4 0x0000 -
5 0x0000 -
6 0x0013 DIO64_IN MOD: 6 VER: 1.2 FIFO IN 1024x64
7 0x0012 DIO64_OUT MOD: 1 VER: 1.3 FIFO OUT 1024x64
Module /dev/pexdrv0 successfuly opened
Read parameters from file: test_main.cfg
Parameters:
CntBuffer 8
CntBlockInBuffer 1
SizeBlockOfWords 262144
isCycle 1
isSystem 1
isAgreeMode 0
isRestart 0
trdNo 0
strmNo 1
isTest 1
isMainTest 1
AdmReg (null)
isAdmReg 0
AdmReg2 (null)
isAdmReg2 0
ISVI_FILE (null)
ISVI_HEADER 0
FifoRdy 1
Cnt1 0
Cnt2 0
DataType 6
DataFix 1
isTestCtrl 0
TestSeq 0
Total stream buffer size: 8 MB
Preparing tetrade
Tetrade 0 ID: 0x01 MOD: 8 VER: 1.4
In tetrade MAIN set of pseudo-random mode sequence
Allocation memory:
Type of block: system memory
Block size: 8 MB
0: 0x7f200000 -> 0x7fd66462e000
1: 0x7f300000 -> 0x7fd6627f8000
2: 0x7f400000 -> 0x7fd6626f8000
3: 0x7f500000 -> 0x7fd6625f8000
4: 0x7f600000 -> 0x7fd6624f8000
5: 0x7f700000 -> 0x7fd6623f8000
6: 0x7f800000 -> 0x7fd6622f8000
7: 0x7f900000 -> 0x7fd6621f8000
Stub: 0xa57cf000 -> 0x7fd66474b000
Allocate stream memory - Ok
core_set_local_addr(): DmaChan=1 addr=0x00000000
Stream working in regular mode
core_start_dma(): DmaChan=1 IsCycling=1
core_start_dma(): IOCTL_AMB_START_MEMIO core_start_dma - OK
BLOCK_WR BLOCK_RD BLOCK_OK BLOCK_ERR SPD_CURR SPD_AVR STATUS TIME
TRD : 0 0 125557 125557 0 800.0 799.8 0x006F 2:36
There is parameters in the last line.
- number of trd - without name in the title
- BLOCK_WR - number of the transmitten blocks
- BLOCK_RD - number of the received blocks
- BLOCK_OK - number of the blocks with correct data
- BLOCK_ERR - number of the blocks with errors
- SPD_CURR - speed of data transfer during of last 4 second [Mbytes per second]
- SPD_AVR - speed of data transfer with program start [Mbytes per second]
- STATUS - content of STATUS register in the TRD
- TIME - current time of test
Press Ctrl-C for exit;
Result of test:
Cancel TRD : 0 0 125804 125804 0 800.0 799.8 0x006F 2:37 Result of receiving data from trd 0 Recieved blocks : 125804 Correct blocks : 125804 Incorrect blocks: 0 Total errors : 0 Speed : 799.8 [Mbytes/s] Time of test : 2 min 37 sec All data is correct. No error Exit program
799.8 - PCI Express v1.1 x4 - project AMBPEX5_v20_SX50T_CORE
Other outputs¶
- test_dio.cfg - inputs from DIO64_IN
- out_dio.cfg - inputs from DIO64_IN