-
Notifications
You must be signed in to change notification settings - Fork 141
PTPRouter
This project enhances the reference IPv4 router and SCONE with a simplification of the Precision Time Protocol IEEE-1588. This allows two NetFPGAs to be synchronized down to a few 10s of nanoseconds.The NetFPGAs act as routers running a modified version of SCONE.
Released.
The hardware implementation can only timestamp a single incoming packet at once. This can cause race conditions if two PTP packets arrive without an intervening read of the timestamp. This problem should get fixed in the future, but for now we wait 50 ms between sending PTP packets on the same port.
There probably are issues that we don't know about.
1.0
Sara Bolouki, Peter Pawlowski, Jad Naous.
Make sure you are using the NetFPGA 2.0 base package. You will also need a beta account to be able to download. You can download the tarball here.
Same tests as the reference router and scone. Currently, no PTP-specific tests are defined. However, you can connect two NetFPGAs together and check that they get synchronized using a probe :) Usage below shows how to configure and run the system.
The following describes how to build, install, and run the project.
- Download the project tarball
- Untar the tarball on top of your installed NF2 tree
- cd NF2/projects/ptp_router/sw
- make install
- cd scone-ptp
- make
First you will need to set the MAC addresses and IP addresses of the router ports. This is done by modifying the sw/scone-ptp/cpuhw file. This is file is similar to the one used by SCONE (see the Guide). An example follows:
eth0 192.168.0.9 255.255.255.0 00:00:00:00:09:01The file is space separated. The first column specifies the NetFPGA port number. Don't get confused between eth0 and nf2c0, they are the same thing in this file. Use the ethX notation for the configuration files. The second column is the IP address, the third is the network mask, and the third is the MAC address.
eth1 192.168.1.9 255.255.255.0 00:00:00:00:09:02
eth2 192.168.2.9 255.255.255.0 00:00:00:00:09:03
eth3 192.168.3.9 255.255.255.0 00:00:00:00:09:04
For PTP, each port of the NetFPGA can be:
- passive so that it does not consume PTP messages and just passes them along. That is, the port behaves like a regular router port.
- master so that it is the source for time synchronization and slave ports synchronize to it
- slave so that the port needs a master clock to synchronize to
The configuration of each port is stored in sw/scone-ptp/ptp.conf. Following is an example file:
eth1 master eth2 master eth3 passive
If the above line are in ptp.conf, then the router will synchronize to a master on port 0 and will send synchronize two other NetFPGAs to it on ports 1 and 2. Since port 3 is passive, it does not participate in the synchronization.
debug_data pins 0-4 are connected to toggling signals from the FPGA. These pins go out to the logic analyzer connection pins. You can connect an oscilloscope to observe these signals and be able to look at the synchronization between two boards.
just type "./scone_ptp" as root in sw/scone-ptp.
We connected 3 NetFPGA nodes in a chain and measured the time differences Clock delta time are calculated between the grand master node, the first and second slaves. Different experiments show the different sampling methods. When an experiment says redundancy filtered, it means that for every pair of equal samples consecutive, we only use one sample.
Sampling every 500 ms, 1200 samples, redundancy filtered
Master and first slave: Master and second slave: First and second slave:
Sampling every 100 ms, 1200 samples, redundancy not filtered
Master and first slave: Master and second slave: First and second slave:
Sampling every 100 ms, 1200 samples, redundancy filtered
Master and first slave: Master and second slave: First and second slave: