Quantcast
Channel: Xilinx Wiki : Xilinx Wiki - all changes
Viewing all 11776 articles
Browse latest View live

Zynq-7000 AP SoC Performance – Gigabit Ethernet achieving the best performance

$
0
0
...
Tuning the task priorities using the ‘nice’ system call form the user space
Run the command ps –all to get the list of tasks and their PID, identify the network tasks and change the priorities using the nice sys call. The example format is shown below
root@linux>niceroot@linux: nice–n -3
CPU affinity for the interrupt handlers/task: This will make sure the minimal cache operations as complete application/task is attached to a single core.
root@linux>echoroot@linux: echo 01 >
To share the load between the two Cortex A9s Taskset2 utility can be used while launching the Ethernet based applications
Window Size is also a configurable options for better performance. In a connection between a client and a server, the client tells the server the number of bytes it is willing to receive at one time from the server; this is the client's receive window, which becomes the server's send window. Likewise, the server tells the client how many bytes of data it is willing to take from the client at one time; this is the server's receive window and the client's send window. There are chances that window size will drop down to zero dynamically if the receiver is not able to process the data as fast as sender is sending the data. Larger the size then more chances to get the better performance. In Linux environment the Window size settings can be tuned by following the steps explained in the following links:

Linux AXI Ethernet driver

$
0
0
...
};
Features supported
Support---> Support for ethtool queries
NAPI

---> NAPI
support.
Known Issues and LimitationsKnown Issues and Limitations
---> The current driver assumes that Axi Ethernet IP is connected to the DMA at the hardware level.
---> The current driver contains the Axi DMA related code.
Probe Fail:

Pre request:

---> In the Kernel Menu config if the AXI DMA driver got selected then Ethernet driver probe will fail with the below
or similar error
...
xilinx_axienet 40c00000.ethernet: can't request region for resource [mem 0x41e00000-0x41e0ffff]
xilinx_axienet: probe of 40c00000.ethernet failed with error -16
Known Issues and LimitationsKnown Issues and Limitations
---> The current driver assumes that Axi Ethernet IP is connected to the DMA at the hardware level.
---> The current driver contains the Axi DMA related code.

Testing Tools
Testing Tools-Diagnostic and Protocol TestsDiagnostic and Protocol Tests
...
---> Add AXI FIFO Support.
Related Links
http://www.wiki.xilinx.com/Linux+Drivers
---> http://www.wiki.xilinx.com/Linux+Drivers

Linux AXI Ethernet driver

$
0
0

Zynq-7000 AP SoC Performance – Gigabit Ethernet achieving the best performance

$
0
0
...
Following are some of the techniques which can be applied to get the better performance from user space
These commands can be applied once the Linux kernel/XAPP1082 image is booted on Zynq-7000 AP SoC
Tuning1.Tuning the task
Run the command ps –all to get the list of tasks and their PID, identify the network tasks and change the priorities using the nice sys call. The example format is shown below
root@linux: niceroot@linux#nice–n -3
...
level PID
CPU

2.CPU
affinity for
...
single core.
root@linux: echo

root@linux#echo
01 > /proc/irq/19/smp_affinity
To

3.To
share the
...
based applications
Window

4.Window
Size is
http://www.cyberciti.biz/faq/linux-tcp-tuning/
(linux-kernel/Documentation/networking/ip-sysctl.txt) http://www.cyberciti.biz/files/linux-kernel/Documentation/networking/ip-sysctl.txt

Zynq-7000 AP SoC Performance – Gigabit Ethernet achieving the best performance

$
0
0
...
Minimal data copying
To achieve better performance the implementation should minimize the amount of copying to move a packet of data from the application, down through the stack to the transmission media. Linux provides scatter gather DMA support where the socket buffers are set up to allow for the direct transmission of lists of TCP segments. At the user level, when data is transferred through a socket, copying can be avoided and data can be mapped directly into the user space from the kernel space.
EndianessEndianness
TCP/IP or UDP/IP packet format follows the big endian notation and if the CPU core is in little endian then the endian conversion should happen at the software layers in both TX and Rx paths to interpret the data.
Design example on how to use PL AXI Ethernet implementations/ jumbo frames support in Zynq-7000 AP SoC
...
The complete design details and design files can be obtained from XAPP1026 XAPP1026 (http://www.xilinx.com/support/documentation/application_notes/xapp1026.pdf)
As explained in the above appnote the lwIP TCP/IP stack is available for the designers as library as part of the SDK. To achieve the better performance designers can choose the following options of the lwIP library in SDK settings. lwIP TCP/IP performance settings for better performance:
...
TCP/IP performance settings
If
settingsIf xilkernel RTOS
{lwIPPerfSettings2.png} Figure 6 : lwIP stack settings for socket mode/when used along with RTOS
Conclusion

macb_kconfig.png

Macb Driver

$
0
0

Cadence Macb Linux Driver for Zynq
Introduction
This page gives an overview of the macb driver which is available as part of the Zynq Linux distribution and in the mainline.
Paths, files, links and documentation on this page are given relative to the Linux kernel source tree.
Kernel Configuration Options
The following config options should be enabled in order to build the macb driver
CONFIG_ETHERNET
CONFIG_NET_CADENCE
CONFIG_MACB
CONFIG_NETDEVICES
CONFIG_HAS_DMA
{macb_kconfig.png}
Mainline status
The macb driver is currently in sync with mainline and any further changes will be upstreamed.
Devicetree
For more details on phy bindings please refer "Documentation/devicetree/bindings/net/macb.txt"
gem0: ethernet@e000b000 {
compatible = "cdns,gem";
reg = <0xe000b000 0x1000>;
status = "disabled";
interrupt-parent = <&gic>;
interrupts = <0 22 4>;
clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
clock-names = "pclk", "hclk", "tx_clk";
#address-cells = <1>;
#size-cells = <0>;
phy-handle = <&ethernet_phy>;
phy-mode = "rgmii-id";
ethernet_phy: ethernet-phy@7{
reg = <7>;
};
};
Features supported
Support for EthTool queries
NAPI support
Power management support
Known Issues and Limitations
Single MAC managing two PHYs: The current driver has no support for this use case.
No interrupt support for PHY events in driver. The current implementation relies on polling method for phy events
Testing Tools
Diagnostic and Protocol Tests
PING
This utility used to test the reachability of a host on an Internet Protocol(IP) network and to measure the round trip time for messages sent from the originating host to a destination computer
How to Run:
ping <Remote IP Address>
WebServer
Connect zynq board to a Linux x86 machine. Ensure that telnet server is running on the Zynq board. It tests for remote access for zynq board on host machine
Open a web browser on host machine and enter the static IP assigned to zynq board. Webpage is expected to be displayed properly.
Telnet
telnet <Server IP Address>
FTP & TFTP
How to run:
Open a ftp client on the host with the Zynq.
x86> ftp 192.168.1.10
Transfer a big enough file (in MBs) using mput command.
x86> mput <file_name>
File transfer should be completed without any error
Pkt Generator
Please refer the below link for how to run and various options
https://www.kernel.org/doc/Documentation/networking/pktgen.txt
Performance Tests
Netperf
How to Run
Server:
netserver
Client:
taskset 2 ./netperf -H <Server IP> -t TCP_STREAM
taskset 2 ./netperf -H <Server IP> -t UDP_STREAM
For more information please refer the below link:
http://www.netperf.org/netperf/
[[code]]
===Iperf===
How to Run
Server:
./iperf_arm -s -u
./iperf_arm -s
Client:
./iperf_arm -c <Server IP> -u -b <banwidth>
./iperf_arm -c <Server IP>
For more information please refer the below link:
http://en.wikipedia.org/wiki/Iperf
==Stress Test==
===Iperf with option -d===
Run iperf in dual testing mode. This will cause the server to connect back to the client on the port specified in the -L option (or defaults to the port the client connected to the server on). This is done immediately therefore running the tests simultaneously.
./iperf_arm -c <Server IP> -d
===Ping flood test===
Users can send hundred or more packets per second using -f option. It prints a ‘.’ when a packet is sent, and a backspace is printed when a packet is received
ping -f localhost
===gravecat===
gravecat is a tool which is shared by NI. It sends a lot of small sized UDP packets to overwhelm the Rx path.
How to run:
- Ensure gravecat binary is available in the SD card/ramdisk to be used after Linux boots up.
- Use the gravecat binary for x86 64 bit machine on the host.
- Run the following commands:
zynq> ./gravecat_armv7a -l 9999 &
x86> ./gravecat_x86_64 -s <zynq_gem_ip_address> 9999 4 1000 500
code
- Run it for 10 minutes. Stop the tool from host. Ping the Zynq board. Zynq board should respond properly.
- There should be no Rx lock up or hang. Zynq should respond to the ping requests.
Work to be done
IEEE 1588 support to be migrated from emacps driver to macb driver
Support for single mac managing two phys
Related Links

Macb Driver

$
0
0
...
For more information please refer the below link:
http://www.netperf.org/netperf/
[[code]]
===Iperf===
Iperf
How to Run
Server:
...
For more information please refer the below link:
http://en.wikipedia.org/wiki/Iperf
==Stress Test==
===Iperf
Stress Test
Iperf
with option -d=== -d
Run iperf in dual testing mode. This will cause the server to connect back to the client on the port specified in the -L option (or defaults to the port the client connected to the server on). This is done immediately therefore running the tests simultaneously.
./iperf_arm -c <Server IP> -d
===PingPing flood test=== test
Users can send hundred or more packets per second using -f option. It prints a ‘.’ when a packet is sent, and a backspace is printed when a packet is received
ping -f localhost
===gravecat=== gravecat
gravecat is a tool which is shared by NI. It sends a lot of small sized UDP packets to overwhelm the Rx path.
How to run:
...
zynq> ./gravecat_armv7a -l 9999 &
x86> ./gravecat_x86_64 -s <zynq_gem_ip_address> 9999 4 1000 500
code
- Run it for 10 minutes. Stop the tool from host. Ping the Zynq board. Zynq board should respond properly.
- There should be no Rx lock up or hang. Zynq should respond to the ping requests.

gravecat.rar

Macb Driver

$
0
0
...
Diagnostic and Protocol Tests
PING
...
a destination computercomputer.
How to Run:run:
ping <Remote IP Address>
WebServer
...
access for zynqZynq board on
Open a web browser on host machine and enter the static IP assigned to zynq board. Webpage is expected to be displayed properly.
Telnet
...
Transfer a big enough file (in MBs) using mput command.
x86> mput <file_name>
...
without any errorerror.
Pkt Generator
Please refer the belowto link below for how
https://www.kernel.org/doc/Documentation/networking/pktgen.txt
Performance Tests
Netperf
How to Runrun:
Server:
netserver
...
taskset 2 ./netperf -H <Server IP> -t TCP_STREAM
taskset 2 ./netperf -H <Server IP> -t UDP_STREAM
...
please refer to the below link:link below:
http://www.netperf.org/netperf/
Iperf
How to Runrun:
Server:
./iperf_arm -s -u
...
./iperf_arm -c <Server IP> -u -b <banwidth>
./iperf_arm -c <Server IP>
...
please refer to the below link:link below:
http://en.wikipedia.org/wiki/Iperf
Stress Test
...
gravecat
gravecat is a tool which is shared by NI. It sends a lot of small sized UDP packets to overwhelm the Rx path.
{gravecat.rar}
How to run:
- Ensure gravecat binary is available in the SD card/ramdisk to be used after Linux boots up.
...
Support for single mac managing two phys
Related Links
Linux Drivers

Macb Driver

$
0
0

Macb Driver

$
0
0
...
gravecat
gravecat is a tool which is shared by NI. It sends a lot of small sized UDP packets to overwhelm the Rx path.
{gravecat.rar}
How to run:
- Ensure gravecat binary is available in the SD card/ramdisk to be used after Linux boots up.

Macb Driver

$
0
0
...
Users can send hundred or more packets per second using -f option. It prints a ‘.’ when a packet is sent, and a backspace is printed when a packet is received
ping -f localhost
gravecat
gravecat is a tool which is shared by NI. It sends a lot of small sized UDP packets to overwhelm the Rx path.
How to run:
- Ensure gravecat binary is available in the SD card/ramdisk to be used after Linux boots up.
- Use the gravecat binary for x86 64 bit machine on the host.
- Run the following commands:
zynq> ./gravecat_armv7a -l 9999 &
x86> ./gravecat_x86_64 -s <zynq_gem_ip_address> 9999 4 1000 500
- Run it for 10 minutes. Stop the tool from host. Ping the Zynq board. Zynq board should respond properly.
- There should be no Rx lock up or hang. Zynq should respond to the ping requests.

Work to be done
IEEE 1588 support to be migrated from emacps driver to macb driver

Macb Driver

$
0
0

Linux Drivers

$
0
0
...
drivers/media/platform/xilinx/xilinx-tpg.c + xilinx-vtc.c
Mainlining in progress as of 12/2/2014: Pipeline driver (vipp + vip + dma), and TPG (tpg + vtc)
Watchdog
Cadence WDT for Zynq
Cadence WDT Driver
Yes
drivers/watchdog/cadence_wdt.c

Related Links
CAN Driver can4linux

Linux SPI Driver

$
0
0
...
SPI may not be enabled in the default kernel configuration. The following steps may be used to enable the driver in the kernel configuration.
{spimenuconfig.PNG}
Accessing A SPI Device From A User Space Program
This should work, but has not been tested yet. The SPI Dev device driver must be enable in the kernel configuration.

Using An SPI EEPROM Driver As A Higher Layer
There are higher layer drivers that allow the SPI driver to be used to access other devices such as an SPI serial EEPROM. A change was needed in the SPI AT25 driver of the kernel to use device tree and this change is also in the development branch as it is being submitted to the mainline also.

wdt_wiki.png

Linux SPI Driver

$
0
0
...
eeprom-name = "johnsat25";
};
} ;
Devicetree entries for spi:
Xilinx SPI controller Device Tree Bindings
Required properties:
- compatible : Should be "xlnx,xps-spi-2.00.a".
"xlnx,xps-spi-2.00.b" (DEPRECATED)
- reg : Physical base address and size of SPI registers map.
- interrupts : Property with a value describing the interrupt
number.
- interrupt-parent : Must be core interrupt controller
Optional properties:
- num-cs : Number of chip selects used.
- xlnx,num-ss-bits : Number of chip selects used (DEPRECATED).
Example:
spi@44a00000 {
compatible = "xlnx,xps-spi-2.00.a";
interrupt-parent = <&microblaze_0_axi_intc>;
interrupts = <0 0>;
reg = <0x44a00000 0x10000>;
num-cs = <0x1>;

} ;
Devicetree entries for flash:

Cadence WDT Driver

$
0
0

Cadence WDT Driver for Zynq
This page describes the Cadence WDT driver which is available in mainline and Xilinx Linux distribution as drivers/watchdog/cadence_wdt.c
Kernel Configuration Options
The following config options should be enabled in order to build the macb driver:
CONFIG_CADENCE_WATCHDOG
CONFIG_WATCHDOG
{wdt_wiki.png}
Devicetree
For more details, please refer "Documentation/devicetree/bindings/watchdog/cadence-wdt.txt"
For selecting an option to enable automatic reset when timer runs out, "reset-on-timeout" property should be added.
Example:
watchdog {
clocks = <&clkc 45>;
compatible = "cdns,wdt-r1p2";
interrupt-parent = <&intc>;
interrupts = <0 9 1>;
reg = <0xf8005000 0x1000>;
timeout-sec = <10>;
};
Features supported
Configurable timeout interval in seconds.
Reset on timeout can be selected.
Known Issues and Limitations
None
Testing
Related Links
Linux Drivers

Cadence WDT Driver

$
0
0
...
None
Testing
Start the watchdog timer and see if it runs out without enabling reset.
echo V > /dev/watchdog0
echo s > /dev/watchdog0
// after timeout
cdns-wdt f8005000.ps7-wdt: Watchdog timed out.
If reset is enabled the print above indicating reset wont show up and instead reset is observed.

Related Links
Linux Drivers
Viewing all 11776 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>