- Sep 22, 2014
-
-
Alessandro Rubini authored
Otherwise, if we have two PTP ports for the same interface, like Ethernet and UDP, we are not able to tell which message is for which. This now works as expected: ./ppsi -C "port eth0; iface eth0; role master; proto raw; diagnostics 111" \ -C "port eth0u; iface eth0; role master; proto udp; diagnostics 111" Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This adds the "adjust_frequecy" method to time-wrs. The WR servo is not using this method, which is only called by the normal PTP servo. With this new method, a non-WR slave is able to trim frequency, whereas before this commit we were only able to jump our time. The code move straight the FPGA register, by having some hardware-specific constants explicit in the code. Thus, it is not very beautiful, but it works fine on my systems. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
All adjustments are passed as part-per-billion, so after getting mad in understanding what freq_ppm was, I renamed all of them to freq_ppb. While making changes I verified this is what it is. Thus I fixed the comment in ppsi.h (that was wrong by a factor of 64) and the adjustment code in bare-time.c that made the same error (I admit I don't test arch-bare often). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 06, 2014
-
-
Alessandro Rubini authored
This bug was present in previous versions too: when not sending the calibration pattern, we had no timeout, so a lost frame was fatal. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This commits adds retry in most wr states. This allows to deal with lost frames. There a few missing items, and a few rough situation. The code itself shows a number of repetitions, which I dislike, but over time we'll fix it properly. By now this should be enough to deal with transient data loss during calibration, that happens at some users' site. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 05, 2014
-
-
Alessandro Rubini authored
WR_DEFAULT_INIT_REPEAT is going to be used instead (we had both, none of them used; now we'll use one). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Currently, a wrpc slave taks almost 10s to do the calibration step (uncalibrated/wr-s-lock), because, among other things, of eeprom access. Thus, a 10s timeout is really unsuitable. Turn it to 15 instead. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 03, 2014
-
-
Alessandro Rubini authored
The wrPortState variable was assigned-to in various places: it was "almost" mirroring the PTP state, but not every WR state was actually setting it. In fact, it was only used for calibration sub-states, so remove all other assignment. Often, the code did: wp->wrMode = NON_WR; wp->wrPortState = WR_PORT_IDLE; but only wrMode was ever checked, so WR_PORT_IDLE (was: WRS_IDLE) is redundant and can be removed altogether. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Some sub-states are never used, so remove them. Moreover, avoid using WRS_CALIBRATION for two things: now wrPortState only uses WR_PORT_ values (well, it will in the next commit). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Aug 02, 2014
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This picks the following commits (most recent on top): e17d874 README: update for the new code base d391e62 added 64-bit example/test 670b5e8 Makefile: support 64-bit option; add div64.c c2384cd vsprintf-full: offer 64-bit printing as an option 220b19e vsprintf-full: simplify a little 526daa6 vsprintf-full: remove unsed code for %p printing 1a28825 vsprintf-full: prevent a warning when a pointer is 16 bits We are using 64-bit prints currently, but wrpc-sw does. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jul 21, 2014
-
-
Alessandro Rubini authored
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Remove duplicated messages, and misleading ones (ofm is not averaged any more, only mpd is averaged). This changes the log format, and may upset users with old grep lines saved somewhere. Like me. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Also, prepare for drop support (i.e., no message for the special error code) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This adds frame dropping as a fault-injection mechanism. It activates it for arch-unix in the same commit, because I tested it. Not documented yet. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Also, prepare for drop support (i.e., no message for the special error code) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
For some reason (I don't rememeber why), RX timestamps are retrieved from the socket, while TX timestamps are with tops->get. Thus, there was no utc/tai correction on receive stamps (i.e. T2). This affects us when we are driven by a WR switch, that properly differentiates between UTC and TAI. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Jul 18, 2014
-
-
Pietro Fezzardi authored
There is no need to remove outliers and to make a running average on ofm. Indeed we know that ofm = t2 - t1 -mpd. We are already removing outliers and averaging on mpd. So, if after mpd has been "cleaned", ofm still shows outliers or irregularities they are for sure due to t1 and t2. So they are errors coming from the clocks and they have not to be ignored. Instead they must be corrected ASAP, and to do that the software must be able to see them instantly. So no running avg nor outlier removal has to be performed on ofm values.
-
Pietro Fezzardi authored
The integral accumulator of the PI servo is now a 64bit integer. The stored values are bit shifted by 10, so we have a finer granularity on the control. With the previous implementation the integral part stopped working when ofm was under the value of OPTS(ppi)->ai. This problem has been solved with this changes. I had to use __div64_32() from lib/div64.c, because dividing for a long long is not allowed in arch-wrpc (it takes too much RAM).
-
Pietro Fezzardi authored
diagnostics: For testing purposes we can't just read the ofm value printed out by the slave, because that's only the offset perceived by the slave and can be wrong. We need instead to print out the offset obtained subtracting the real time of the master from the real time of the slave. To print out the ofm we use the "ext" flag of pp_diag. The ofm is printed only when the slave gets a DelayResp message from the master. A new tool to strip ofm out of simulator log is provided config: now the max number of simulated ptp iterations can be configured. previously one could set the number of seconds to simulate. this is not possible anymore.
-
- Jul 09, 2014
-
-
Pietro Fezzardi authored
the cur_ppi_n field in ppg was not reset properly at the beginning of the parsing function, causing the CHECK_PPI macro to fail
-
- Mar 26, 2014
-
-
Alessandro Rubini authored
Commit 84df8890 changed the build order, avoiding libraries. Back then I fogot to apply the same change to time-wrpc, and didn't notice because ./MAKEALL worked fine. We never linkerd the final ppsi.elf for WRPC since then. Now I'm updating the ppsi submodule in the wrpc-sw repository, and this must be fixed to avoid the missing symbols in the final link. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
KERNELVERSION variable from Linux was still used. It was not initialized so the displayed version in the headers of make gconfig and make menuconfig was missingor wrong. It just said (null) or KERNELVERSION. KERNELVERSION has been changed to VERSION all over the kconfig scripts. Makefile.kconfig exports this variable so it can be used by config scripts with getenv(). Now it prints the ppsi version with the present commit, like diplayed from git describe --always --dirty
-
-
Alessandro Rubini authored
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
10 seconds is not interesting, because by default such a big offset is fixed by a jump in time. With 0.9 we get no jump and a more "interesting" path towards zero. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Mar 21, 2014
-
-
the simulated hardware error must be applied earlier than the correction made by the servo, because this is more close to the real behaviour, where the servo has no way to know it the hw clock is biased or not
-
It now returns the initial value of freq_ppm_real, a parameter representing the error of the simulated hw clock
-
-
when possible substitute the access pattern ppi = &ppg->pp_instances[n]; with ppi = INST(ppg, n); In the simulator-specific code also pp_sim_get_master() and pp_sim_get_slave() are used. Finally pp_sim_is_master() and pp_sim_is_slave() are used to make the conditions easier to understand
-
-
the diagnostics messages were printed with too much newlines because they were using the standard libc puts instead of pp_puts
-
the send function checks if the sent packet is a Follow_Up. In this case it adds the jitter to the delay of the previous Sync, to avoid the the Follow_Up to be received before its Sync.
-