cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
piyushmanavar
Observer
Observer
903 Views
Registered: ‎01-30-2019

XDMA driver: Xilinx Example failing to transfer and receiving bigger then ~1 MB.

Hi All,

I was testing the XDMA driver with my new ALVEO U280 card with following configuration:

Vivado version: 2019.2
Hardware: ALVEO U280
IP: DMA/Bridge Subsystem for PCI Express v4.1
Function Mode: DMA
Mode: Basic
LAN width: 16
Max speed: 8 GT/S
AXI Data width: 512
AXI clock: 250 MHz
Ref clock: 100 MHz
DMA Interface mode: AXI stream

I have generated example code with above configuration and run XDMA driver with the script run_test.sh file. It seem working at first run. But when I changed few parameters like file size (transfer size variable in file) to some higher bytes ~1MB and also pointer to different binary file with sufficient size (instead of  default file datafile0_4K.bin to my_file_32MB.bin), it seems for smaller size it is working but at higher size it fails to receive the data. 

 

Can someone help me to resolve the problem..

 

Thanks in Advance..

-Piyush Manavar

0 Kudos
5 Replies
piyushmanavar
Observer
Observer
850 Views
Registered: ‎01-30-2019

Let me know if you need more information in this regards...

0 Kudos
piyushmanavar
Observer
Observer
797 Views
Registered: ‎01-30-2019

The problem is still unsolved...

0 Kudos
emeryw
Xilinx Employee
Xilinx Employee
730 Views
Registered: ‎12-06-2019

Hi @piyushmanavar ,

Is this generated with the Vitis flow, or are you doing a Vivado custom flow?

Can you provide the source code and data files? What does the run_test.sh contain?

What specific change was made in the code when it stopped working? What was the end goal of changing the parameters?

Have you by chance checked out the examples in this article? https://developer.xilinx.com/en/articles/acceleration-basics.html

Best,

-Emery

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

-Emery
----------------------------------------------------------------------------------
* Please don't forget to reply, kudo and accept as a solution! *
0 Kudos
piyushmanavar
Observer
Observer
698 Views
Registered: ‎01-30-2019

Hi @emeryw 

Here is answers of your queries..

Is this generated with the Vitis flow, or are you doing a Vivado custom flow?

No. We are using Vivado design flow.

 

Can you provide the source code and data files?

I have not changed source code (verilog files in example code). I am using the same datafiles (.bin binary files)that provided in xdma driver (by xilinx) for sending.

/XDMA_source2/XilinxAR65444-master/Linux/Xilinx_Answer_65444_Linux_Files/tests/data/

 

What does the run_test.sh contain?

-----------------------------------------------------------------------------------------------------------------------

#!/bin/bash

#---------------------------------------------------------------------
# Script variables
#---------------------------------------------------------------------

# Size of PCIe DMA transfers that will be used for this test.
# Make sure valid addresses exist in the FPGA when modifying this
# variable. Addresses in the range of 0 - (4 * transferSize) will
# be used for this test when the PCIe DMA core is setup for memory
# mapped transaction.
#transferSize=1024
transferSize=2000000


# Set the number of times each data transfer will be repeated.
# Increasing this number will allow transfers to accross multiple
# channels to over lap for a longer period of time.
transferCount=1

# Determine which Channels are enabled
# Determine if the core is Memory Mapped or Streaming
isStreaming=0
h2cChannels=0
for ((i=0; i<=3; i++))
do
statusRegVal=`./reg_rw /dev/xdma0_control 0x0${i}00 w | grep "Read.*:" | sed 's/Read.*: 0x\([a-z0-9]*\)/\1/'`
channelId=${statusRegVal:0:3}
streamEnable=${statusRegVal:4:1}
if [ $channelId == "1fc" ]; then
h2cChannels=$((h2cChannels + 1))
if [ $streamEnable == "8" ]; then
isStreaming=1
fi
fi
done
echo "Info: Number of enabled h2c channels = $h2cChannels"
# Find enabled c2hChannels
c2hChannels=0
for ((i=0; i<=3; i++))
do
./reg_rw /dev/xdma0_control 0x1${i}00 w | grep "Read.*: 0x1fc" > /dev/null
returnVal=$?
if [ $returnVal -eq 0 ]; then
c2hChannels=$((c2hChannels + 1))
if [ $streamEnable == "8" ]; then
isStreaming=1
fi
fi
done
echo "Info: Number of enabled c2h channels = $c2hChannels"
# Report if the PCIe DMA core is memory mapped or streaming
if [ $isStreaming -eq 0 ]; then
echo "Info: The PCIe DMA core is memory mapped."
else
echo "Info: The PCIe DMA core is streaming."
fi

# Check to make sure atleast one channel was identified
if [ $h2cChannels -eq 0 -a $c2hChannels -eq 0 ]; then
echo "Error: No PCIe DMA channels were identified."
exit 1
fi

# Perform testing on the PCIe DMA core.
testError=0
if [ $isStreaming -eq 0 ]; then

# Run the PCIe DMA memory mapped write read test
./scripts/dma_memory_mapped_test.sh $transferSize $transferCount $h2cChannels $c2hChannels
returnVal=$?
if [ $returnVal -eq 1 ]; then
testError=1
fi

else

# Run the PCIe DMA streaming test
channelPairs=$(($h2cChannels < $c2hChannels ? $h2cChannels : $c2hChannels))
if [ $channelPairs -gt 0 ]; then
./scripts/dma_streaming_test.sh $transferSize $transferCount $channelPairs
returnVal=$?
if [ $returnVal -eq 1 ]; then
testError=1
fi
else
echo "Info: No PCIe DMA stream channels were tested because no h2c/c2h pairs were found."
fi

fi

# Exit with an error code if an error was found during testing
if [ $testError -eq 1 ]; then
#echo "Error: Test completed with Errors."
exit 1
fi

# Report all tests passed and exit
echo "Info: All tests in run_tests.sh passed."
exit 0

---------------------------------------------------------------------------------------------------------------

 

 

What specific change was made in the code when it stopped working?

When I changed transfer size from 1024 to 2000000 and replace the 4K binary file (.bin file in data) to 32MB file. name (datafile0_4K.bin) was not changed. 

 

What was the end goal of changing the parameters?

End goal is I want to use AXI striming mode in loopback test (same as example code). But want to exchange larger file. say 100 MB or more. But not working after 1MB.

 

Have you by chance checked out the examples in this article?

No. 

 

Please reply with your view and suggestions.. 

Thanks 

-Piyush

0 Kudos
piyushmanavar
Observer
Observer
574 Views
Registered: ‎01-30-2019

Please reply 
@emeryw 

0 Kudos