Version 1/2
-
Next » -
Current version
Dmitry Smekhov, 06/12/2013 12:50 am
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_s128.cfg - inputs from DIO_IN
- out_dio_s128.cfg - output to the DIO_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 .svn/
dsmv@dsmv-linux:~/pcie_ds_dma/trunk/soft/linux/application/adm_test/bin$ ./adm_test test_main.cfg
Map BAR0: 0xfe800000 -> 0x7f6594a1a000
Map BAR1: 0xfe600000 -> 0x7f659481a000
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: 0x8d900000 -> 0x7f6596550000
1: 0x8da00000 -> 0x7f659471a000
2: 0x8db00000 -> 0x7f659461a000
3: 0x94400000 -> 0x7f659451a000
4: 0x94500000 -> 0x7f659441a000
5: 0x94600000 -> 0x7f659431a000
6: 0x94700000 -> 0x7f659421a000
7: 0x94800000 -> 0x7f659411a000
Stub: 0xa556d000 -> 0x7f659666d000
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
TRD : 0 0 295899 295899 0 799.8 799.0 0x006F 0 0
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
799.0 - PCI Express v1.1 x4 - project AMBPEX5_v20_SX50T_CORE