首页 > 系统相关 >MPsoc TSN网络功能设计及测试 (petalinux22.2)

MPsoc TSN网络功能设计及测试 (petalinux22.2)

时间:2024-07-29 16:58:10浏览次数:15  
标签:TSN MPsoc petalinux22.2 clock s2mm mm2s interrupt xlnx axi

TSN参考链接: link
xilinx内核TSN kernel代码链接: link
在这里插入图片描述
petalinux-config -c kernel选择如下:
在这里插入图片描述
TSN PL端设备树配置代码

tsn0_axi_firewall_0: axi_firewall@a0020000 {
			clock-names = "aclk";
			clocks = <&misc_clk_0>;
			compatible = "xlnx,axi-firewall-1.2";
			reg = <0x0 0xa0020000 0x0 0x1000>;
			xlnx,addr-width = <0x20>;
			xlnx,aruser-width = <0x0>;
			xlnx,awuser-width = <0x0>;
			xlnx,buser-width = <0x0>;
			xlnx,enable-ctl-clock = <0x0>;
			xlnx,enable-initial-delay = <0x1>;
			xlnx,enable-pipelining = <0x1>;
			xlnx,enable-prescaler = <0x1>;
			xlnx,enable-protocol-checks = <0x1>;
			xlnx,enable-timeout-checks = <0x1>;
			xlnx,firewall-mode = <0x0>;
			xlnx,id-width = <0x0>;
			xlnx,mask-err-resp = <0x0>;
			xlnx,num-read-outstanding = <0x8>;
			xlnx,num-read-threads = <0x1>;
			xlnx,num-write-outstanding = <0x8>;
			xlnx,num-write-threads = <0x1>;
			xlnx,protocol = <0x2>;
			xlnx,rdata-width = <0x20>;
			xlnx,ruser-width = <0x0>;
			xlnx,wdata-width = <0x20>;
			xlnx,wuser-width = <0x0>;
		};
		tsn0_axi_intc_0: interrupt-controller@a2001000 {
			#interrupt-cells = <2>;
			clock-names = "s_axi_aclk";
			clocks = <&misc_clk_0>;
			compatible = "xlnx,axi-intc-4.1", "xlnx,xps-intc-1.00.a";
			interrupt-controller ;
			interrupt-names = "irq";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4>;
			reg = <0x0 0xa2001000 0x0 0x1000>;
			xlnx,kind-of-intr = <0x2a>;
			xlnx,num-intr-inputs = <0xf>;
		};
		tsn0_axi_mcdma_0: axi_mcdma@a2000000 {
			#dma-cells = <1>;
			clock-names = "s_axi_aclk", "s_axi_lite_aclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>;
			compatible = "xlnx,eth-dma";
			interrupt-names = "mm2s_ch1_introut", "mm2s_ch2_introut", "s2mm_ch1_introut", "s2mm_ch2_introut", "s2mm_ch3_introut", "s2mm_ch4_introut";
			interrupt-parent = <&tsn0_axi_intc_0>;
			interrupts = <9 2 10 2 11 2 12 2 13 2 14 2>;
			reg = <0x0 0xa2000000 0x0 0x1000>;
			xlnx,addrwidth = <0x20>;
			xlnx,dlytmr-resolution = <0x7d>;
			xlnx,enable-single-intr = <0x0>;
			xlnx,group1-mm2s = <0xb>;
			xlnx,group1-s2mm = <0x457>;
			xlnx,group2-mm2s = <0x0>;
			xlnx,group2-s2mm = <0x0>;
			xlnx,group3-mm2s = <0x0>;
			xlnx,group3-s2mm = <0x0>;
			xlnx,group4-mm2s = <0x0>;
			xlnx,group4-s2mm = <0x0>;
			xlnx,group5-mm2s = <0x0>;
			xlnx,group5-s2mm = <0x0>;
			xlnx,group6-mm2s = <0x0>;
			xlnx,group6-s2mm = <0x0>;
			xlnx,include-dre ;
			xlnx,include-mm2s = <0x1>;
			xlnx,include-mm2s-dre = <0x1>;
			xlnx,include-mm2s-sf = <0x1>;
			xlnx,include-s2mm = <0x1>;
			xlnx,include-s2mm-dre = <0x1>;
			xlnx,include-s2mm-sf = <0x1>;
			xlnx,include-sg ;
			xlnx,mm2s-burst-size = <0x10>;
			xlnx,mm2s-scheduler = <0x0>;
			xlnx,num-mm2s-channels = <0x2>;
			xlnx,num-s2mm-channels = <0x4>;
			xlnx,prmry-is-aclk-async = <0x0>;
			xlnx,s2mm-burst-size = <0x10>;
			xlnx,sg-include-stscntrl-strm = <0x0>;
			xlnx,sg-length-width = <0xe>;
			xlnx,sg-use-stsapp-length = <0x0>;
			dma-channel@a2000000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				dma-channels = <0x2>;
				interrupt-parent = <&tsn0_axi_intc_0>;
				interrupts = <9 2 10 2>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
				xlnx,include-dre ;
			};
			dma-channel@a2000030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x4>;
				interrupt-parent = <&tsn0_axi_intc_0>;
				interrupts = <11 2 12 2 13 2 14 2>;
				xlnx,datawidth = <0x20>;
				xlnx,device-id = <0x0>;
				xlnx,include-dre ;
			};
		};
		tsn_endpoint_ip_0: tsn_endpoint_ip_0 {
			#address-cells = <2>;
			#size-cells = <2>;
			clock-names = "host_txfifo_aclk", "host_rxfifo_aclk", "s_axi_aclk", "gtx_clk", "gtx_clk90", "refclk";
			clocks = <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_0>, <&misc_clk_1>, <&misc_clk_1>, <&misc_clk_2>;
			compatible = "xlnx,tsn-endpoint-ethernet-mac-2.0";
			interrupt-names = "interrupt_ptp_rx_1", "interrupt_ptp_tx_1", "mac_irq_1", "tsn_ep_scheduler_irq", "interrupt_ptp_timer";
			interrupt-parent = <&tsn1_axi_intc_0>;
			interrupts = <0 2 2 2 4 2 7 2 6 2>;
			ranges ;
			reg = <0x0 0xb0000000 0x0 0x20000>;


		};
		misc_clk_1: misc_clk_1 {
			#clock-cells = <0>;
			clock-frequency = <125000000>;
			compatible = "fixed-clock";
		};
		misc_clk_2: misc_clk_2 {
			#clock-cells = <0>;
			clock-frequency = <300000000>;
			compatible = "fixed-clock";
		};
		tsn0_ta_dma_0: ta_dma@a1000000 {
			clock-names = "dma_clk", "rtc_clk";
			clocks = <&misc_clk_0>, <&misc_clk_1>;
			compatible = "xlnx,ta-dma-1.0";
			interrupt-names = "introut";
			interrupt-parent = <&tsn0_axi_intc_0>;
			interrupts = <8 2>;
			reg = <0x0 0xa1000000 0x0 0x800000>;
			xlnx,en-debug = <0x0>;
			xlnx,en-int-store-and-fwd = <0x1>;
			xlnx,en-statistics = <0x1>;
			xlnx,en-unaligined-addr-support = "true";
			xlnx,num-buffers-per-stream = <0x40>;
			xlnx,num-fetch-entries = <0x8>;
			xlnx,num-streams = <0x8>;
		};

tsn_talker功能测试:
在这里插入图片描述
在这里插入图片描述
UDP Socket功能测试:
安装IPIC module:

insmod /lib/modules/5.15.0-xilinx-v2022.1/extra/xilinx_tsn_ip_intercept.ko IPv4_tuple=1,1,0,0,1,1

在这里插入图片描述

标签:TSN,MPsoc,petalinux22.2,clock,s2mm,mm2s,interrupt,xlnx,axi
From: https://blog.csdn.net/yiyi201200/article/details/140774741

相关文章

  • AMD MPSoC PS PCIe作为EP与Host在异常状态下的工作情况
    正常情况下,PCIeEP和Host同时启动,Host给EP提供参考时钟,双方协商后建立PCIe链路。客户希望测试PCIeHost异常情况下,AMDMPSoCPSPCIe作为EP,是否能独立工作;是否能在Host恢复正常后,建立PCIe链路,正常传输数据。使用了ZCU112单板作为PCIeEP,和X86主机作为PCIeHost测试。结果如下:......
  • 革新网络通信:多端口TSN交换机IP核,引领工业通信新时代
     导语在数字化转型的浪潮中,企业面临着越来越复杂的挑战,尤其在确保关键操作的实时性和可靠性方面。时间敏感网络(TSN)技术以其独特的优势,有效应对这些挑战,开启了工业通信新纪元。时间敏感网络 TIMESENSITIVENETWORKING时间敏感网络(TSN,Time-SensitiveNetworking)是IEEE802......
  • TSN - Interfering frame
    https://mp.weixin.qq.com/s/db_8ZX3UMmiUNC6S4nR0eA简单介绍跨界干扰帧相关的问题。本文目录:1.简介2.识图3.干扰帧4.帧抢占5.实际实现中的问题6.无处可配的GuardBand7.总结 1.简介  Animportantrequirementtoachievealowlatencyistoensure......
  • TSN和DDS测试解决方案
    时间敏感网络TSN技术是基于统一的网络时间,通过调度机制管理通信数据流,最终实现确定性与可预期的以太网通信系统。时间敏感网络TSN技术旨在提升以太网网络的实时性和可靠性,并提供灵活的网络资源管理。该技术的应用主要来源于传统以太网技术在面对实时性、确定性和低延迟等严苛要求......
  • 车载以太网AVB交换机 TSN交换机 时间敏感网络 6端口 百兆 SW100TSN
    SW100TSN时间敏感网络AVB交换机        为6端口百兆车载以太网交换机,其中包含5通道100BASE-T1泰科MATEnet接口和1个通道100/1000BASE-T标准以太网(RJ45接口),可以实现纳米级时间同步,车载以太网多通道交换,Bypass数据采集和监控等功能,支持TSN/AVB协议,边界时钟,gPTP时钟桥......
  • 浅析TSN网络之车载以太网协议测试
    TSN是一项从视频音频数据领域延伸至工业领域、汽车领域的技术。TSN最初来源于音视频领域的应用需求,当时该技术被称为AVB,由于针对音视频网络需要较高的带宽和最大限度的实时,借助AVB能较好的传输高质量音视频。2012年,AVB任务组在其章程中扩大了时间确定性以太网的应用需求和适用范......
  • mpsoc嵌入式vitis开发—EMIO LED实验
    前言vitis版本:Vitis2023.2由于Vitis版本更新,很多API发生变化,学习原子哥的教程时很多代码对于不上,所以自己重新写一遍,并记录下自己踩过的坑,方便以后查看。这里直接给出代码,其他的流程参考原子哥的《2_DFZU2EG_4EVMPSoC之嵌入式Vitis开发指南_V1.0.pdf》代码采用CodeGeeX-AM......
  • mpsoc嵌入式vitis开发—AXI GPIO中断实验
    前言vitis版本:Vitis2023.2由于Vitis版本更新,很多API发生变化,学习原子哥的教程时很多代码对于不上,所以自己重新写一遍,并记录下自己踩过的坑,方便以后查看。这里直接给出代码,其他的流程参考原子哥的《2_DFZU2EG_4EVMPSoC之嵌入式Vitis开发指南_V1.0.pdf》代码#include"sleep.h......
  • mpsoc嵌入式vitis开发—外部中断实验
    前言vitis版本:Vitis2023.2由于Vitis版本更新,很多API发生变化,学习原子哥的教程时很多代码对于不上,所以自己重新写一遍,并记录下自己踩过的坑,方便以后查看。这里直接给出代码,其他的流程参考原子哥的《2_DFZU2EG_4EVMPSoC之嵌入式Vitis开发指南_V1.0.pdf》代码#include"platfor......
  • [90G] 以太网交换机 VSC7549-V/5CC、VSC7549TSN-V/5CC-VAO、VSC7549TSN-V/5CC 提供差
    1、VSC7549-V/5CC 90GEnterpriseSwitch概述VSC7549SPARX-5-90是一款90GbpsSMB/SME以太网交换机,支持1G、2.5G、5G和10G以太网端口组合。该设备提供了一组丰富的企业以太网交换功能。它使用多级多功能内容感知处理器(VCAP)技术,提供VLAN和QoS处理,通过智能帧处理和灵活的帧操作......