BlazePPS_v2/software README

Valeh Valiollahpour Amiri (vv2252@columbia.edu)
Christopher Campbell (cc3769@columbia.edu)
Yuanpei Zhang (yz2727@columbia.edu)
Sheng Qian (sq2168@columbia.edu)

What is included:
Directories & Files
Compiling Driver & Device Tree
Updating Device Tree
Loading/Unloading Ethernet Driver
Testing Ethernet Driver

--------------------
Directories & Files
--------------------

  - README
      You're reading me.

  - ethernet_driver
      Contains the ethernet driver

      - Makefile
          Used for compiling driver and device tree.

      - blazepps_ethernet.c & blazepps_ethernet.h
          The network driver.

      - socfpga.dts
          - Linux device tree file.

      - skeleton.dtsi
          Skeleton device tree file (necessary for compiling socfpga.dts to socfpga.dtb)

      - load.sh
          Bash script that loads the driver module and ups the network interface.

      - unload.sh
          Bash script that unloaded the driver module and downs the network interface.

      - test.sh:
          Bash script that tests the driver (it sends a packet, then simulates an
          rx interrupt to read a packet, so loopback should be enabled when using
          this test) 

  - mm_driver
      Contains the simple memory-mapped driver

      - Makefile
          Used for compiling driver, device tree, and test program.

      - txrx_subsys.c & txrx_subsys.h.h
          The MM driver.

      - txrx_test.c
          Test program for the driver.

      - socfpga.dts
          - Linux device tree file.

      - skeleton.dtsi
          Skeleton device tree file (necessary for compiling socfpga.dts to socfpga.dtb)

  - loopback_driver
        Contains the simple network driver

       - Makefile
          Used for compiling driver and device tree.

      - blazepps_loopback.c & blazepps_loopback.h
          The network driver.

      - socfpga.dts
          - Linux device tree file.

      - skeleton.dtsi
          Skeleton device tree file (necessary for compiling socfpga.dts to socfpga.dtb)

      - load.sh
          Bash script that loads the driver module and ups the network interface.

      - unload.sh
          Bash script that unloaded the driver module and downs the network interface.

-------------------------------
Compiling Driver & Device Tree
-------------------------------

  - Compiling driver & source tree
      
      $ make

  - Compiling driver

      $ make module

  - Compiling source tree

      $ make tree

---------------------
Updating Device Tree
---------------------

  1) Compile the dts file to a dtb file (see compiling driver & device tree).

  2) Copy the dtb file to the correct location (when using the server/uboot
     setup, copy it to the directory on the server containing the uImage).

----------------------------------
Loading/Unloading Ethernet Driver
----------------------------------

  - Loading

      $ ./load

  (use ifconfig to see the IP address and inteface name e.g. "eth1")

  - Unloading

      $ ./unload

------------------------
Testing Ethernet Driver
------------------------

  - Test transmitting and receiving a packet
    (must be used with loopback hardware enabled because the
     transmitted packet is expected to loopback)

  $ ./test 

  (use dmesg to see the data transmitted and received)
