Giter Site home page Giter Site logo

xilinx / pynq-networking Goto Github PK

View Code? Open in Web Editor NEW
44.0 11.0 17.0 8.67 MB

Networking Overlay on PYNQ

License: BSD 3-Clause "New" or "Revised" License

Tcl 50.72% Shell 0.05% C 5.46% Python 13.30% Jupyter Notebook 28.89% Makefile 0.14% C++ 1.35% BitBake 0.09%
pynq

pynq-networking's Introduction

PYNQ-Networking

PYNQ networking overlay enables networking capabilities from PL on the board. Traditionally, the PS on ZYNQ board connects to the Ethernet port, while this overlay also bridges the PL on ZYNQ to the Ethernet port. MQTT-SN is implemented on this overlay, leveraging the scapy python library.

Getting Started

On the latest PYNQ image, use the following command in a terminal.

sudo apt-get install tcpdump iptables ebtables bridge-utils
sudo pip3 install --upgrade git+https://github.com/Xilinx/PYNQ-Networking.git

After the setup, the notebook folder will be populated, and users can try the demo there. Users do not have to run any additional steps.

Note: For completeness, the following few sections introduce what have been done to the PYNQ image. These steps do not need to be performed by users, since they will be taken care of when this package is being installed.

Boot Files

This package requires the boot files to be compatible. For example, the device tree must have the following patch:

/ {
	chosen {
		bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1 uio_pdrv_genirq.of_id=\"generic-uio\"";
		linux,stdout-path = "/amba@0/serial@E0001000";
	};

	amba {

		fabric@40000000 {
			compatible = "generic-uio";
			reg = <0x40000000 0x10000>;
			interrupt-parent = <&intc>;
			interrupts = <0x0 0x1d 0x4>;
		};

		ethernet@e000b000 {
			phy-handle = <&ethernet_phy>;
                        ethernet_phy: ethernet-phy@1{
				reg = <1>;
			};
		};

		slcr@f8000000 {
			clkc@100 {
				fclk-enable = <0xf>;
			};
		};
	};


	xlnk {
		compatible = "xlnx,xlnk-1.0";
		clock-names = "xclk0", "xclk1", "xclk2", "xclk3";
		clocks = <&clkc 0xf &clkc 0x10 &clkc 0x11 &clkc 0x12>;
	};
	usb_phy0: phy0 {
		compatible = "ulpi-phy";
		#phy-cells = <0>;
		reg = <0xe0002000 0x1000>;
		view-port = <0x170>;
		drv-vbus;
	};
   
};

&usb0 {
	usb-phy = <&usb_phy0>;
};

The ethernet entry must have bridging enabled as above.

Again, if you are on the latest PYNQ image, you do not have to do this step.

Modifying eth0 Port

Users can modify the eth0 port on Linux (/etc/network/interfaces.d/eth0). An example of the modified file is stored in interfaces.d folder of this repository.

This step will be performed automatically during the installation process. A backup of the original file is also produced in the same directory (/etc/network/interfaces.d/).

pynq-networking's People

Contributors

drichmond avatar stephenneuendorffer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pynq-networking's Issues

issue with ethernet interface

after installing pynq networking i am unable to access pynq via browser.
is this due to changes made by pynq networking to the eth0 file in interfaces.d??
and i also don't have old backup up file.

Unknown constraints

I'm trying to regenerate the bitstream for this project and I'm running into a lot of implementation errors that appear to be due to my constraints file, which is a modified version of the base one. Could you provide the .xdc you used for this project?

kamene != scapy

Hi,

I'm a Scapy maintainer, and have bumped into this project because it was linked in https://github.com/phaethon/kamene/network/dependents

I've noticed that you were using kamene. I'm assuming you were using scapy-python3 before it was renamed. Please note that kamene is NOT an official Scapy version. Quoting https://scapy.net/

An independent fork of Scapy was created from v2.2.0 in 2015, aimed at supporting only Python3 (scapy3k). The fork diverged, did not follow evolutions and fixes, and has had its own life without contributions back to Scapy. Unfortunately, it has been packaged as python3-scapy in some distributions, and as scapy-python3 on PyPI leading to confusion amongst users. It should not be the case anymore soon. Scapy supports Python3 in addition to Python2 since 2.4.0. Scapy v2.4.0 should be favored as the official Scapy code base. The fork has been renamed as kamene.

Why this is a problem

There are two issues:

  • for you: you are using a version of Scapy that clearly is buggy and not maintained. Development is stopped (or sometimes a few merged PRs now and then) and it's missing many improvements and bug fixes. Moreover we had issues with the owner of this fork trying to mislead users by using a confusing name.
  • for us: we get bug reports that we fixed ages ago because some people still use this fork. This wastes some of our time

I'd advise switching to scapy = the original Scapy. Note that all you need to do is change the import name.

Thanks for your time !

PS: sorry if this feels copy/pasted. It is a bit :(

Issues with Network Processor demo

I'm trying to work through the 04_network_processor notebook on a PYNQ-Z1 board running the most recent version of the PYNQ image (v2.3).

I'm running into the some issues with the LinkManager cell. First, it appears that the commands cannot execute from within the notebook. When I sudo the commands individually in the terminal, I get the following error while loading the kernel module:
insmod: ERROR: could not insert module /usr/local/lib/python3.6/dist-packages/pynq_networking/kernel_module/pynqenet.ko: Invalid module format
and I see the following error in the output from dmesg:
pynqenet: disagrees about version of symbol module_layout

I believe these errors are due to a differing kernel version between what the PYNQ board is running (4.14) and what the module was compiled against (4.9). Would it be possible to get an upgraded module compiled against the 2.3, or upcoming 2.4 PYNQ image? (I'm working with @drichmond and he suggested as much)

boot error message

Hi,

After successfully installed the package, I ran into the following error message when rebooting the board:

image

Overlay modifications for v2.6 pynq image

In the documentation of this repo, it is mentioned that the overlay is made for v2.4 pynq image.
However, it does not work for the latest pynq images and there is an error in making the Pynq-Networking repo on the image.

Is there any modification that we can do to this repo to make it work for v2.5 and v2.6 pynq images as well?

Network IOP

can we connect hdmi input with network IOP instead of pmod arduino. so that we can send frames over Ethernet.

Fails building with release 2.5

Has this project been abandoned? Under release 2.5, it fails to build numpy.

I dont understand even why its trying to do that as numpy is already installed...:

Building wheels for collected packages: kamene, netifaces, paho-mqtt, numpy
  Running setup.py bdist_wheel for kamene ... done
  Stored in directory: /root/.cache/pip/wheels/a3/50/a5/fe0378ed5275c6846a20dcf3efa21d9f64634bca3a4d3aefea
  Running setup.py bdist_wheel for netifaces ... done
  Stored in directory: /root/.cache/pip/wheels/23/8f/f3/7054578f04c904f70757c5c85a6e2823baa69d42365526e93d
  Running setup.py bdist_wheel for paho-mqtt ... done
  Stored in directory: /root/.cache/pip/wheels/02/94/6c/8474137cb7a5a3e001d70a22c8ff919caee69435376bccce79
  Running setup.py bdist_wheel for numpy ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3fbfrchq/numpy/setup.py
';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))"
bdist_wheel -d /tmp/tmpkqq9nhw3pip-wheel- --python-tag cp36:
  Running from numpy source directory.
  Cythonizing sources
  Processing numpy/random/_bounded_integers.pxd.in
  Processing numpy/random/_common.pyx
  Traceback (most recent call last):
    File "/tmp/pip-build-3fbfrchq/numpy/tools/cythonize.py", line 238, in <module>
      main()
    File "/tmp/pip-build-3fbfrchq/numpy/tools/cythonize.py", line 234, in main
      find_process_files(root_dir)
    File "/tmp/pip-build-3fbfrchq/numpy/tools/cythonize.py", line 225, in find_process_files
      process(root_dir, fromfile, tofile, function, hash_db)
    File "/tmp/pip-build-3fbfrchq/numpy/tools/cythonize.py", line 191, in process
      processor_function(fromfile, tofile)
    File "/tmp/pip-build-3fbfrchq/numpy/tools/cythonize.py", line 79, in process_pyx
      VENDOR, required_version))
  RuntimeError: Building NumPy requires Cython >= 0.29.14
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-3fbfrchq/numpy/setup.py", line 488, in <module>
      setup_package()
    File "/tmp/pip-build-3fbfrchq/numpy/setup.py", line 469, in setup_package
      generate_cython()
    File "/tmp/pip-build-3fbfrchq/numpy/setup.py", line 275, in generate_cython
      raise RuntimeError("Running cythonize failed!")
  RuntimeError: Running cythonize failed!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.