- Jul 21, 2014
-
-
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
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
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.
-
-
-
It sets how much time the simulator should simulate. The default value is set to 3600 so that running the simulator without specifying the sim_duration_sec option will result in a simulation representing an hour of real time
-
-
-
-
This makes the diagnostics easier to understand, printing MASTER and SLAVE for every message
-
Now you can assign the name you want to the interfaces, because it doesn't really look for a physical interface with that name. This can be useful to make the diagnostics easier to understand
-
so that you don't need to be administrator to run the simulator and you don't have conflicts if there is already a PTP instance running on the standard ports
-
New struct sim_pending_pkt is introduced to hold information on pakets still in fly. An array of such structures is stored in ppg->arch_data. This array is written by every send. The insertion is designed to sort automatically the packets so that the first element of the array after an insertion is always the first packet that will be received. Function sim_fast_forward_ns is changed to update also the reception times into this array, so that when you fast forward, also the pending packets are fast_forwarded. The main loop works in this way: - if there are packets to be received check when - if the first packet to be received is coming before the state machine timestamps expire, then fast forward till it's time to receive it. Then receive it and call the state machine of the receiver - if there are no packet pending or the first pending packet is coming after a timeout, then fast forward till the timeout expires and run all the state machines
-
-
It will be used to jump ahead in time when no machine is executing.
-
-
This structure represents all the delays on the outgoing link of the pp_instance. It will be used by the network operations
-
startup is changed, because we need to set the initial time for the master before we set the initial offset from master fo the slave. In this way the diagnostics cannot be turned on to print out the config for the master. This is not a problem, because the master it's not meant to be configurable
-
pp_sim_get_master(ppg) always returns a pointer to master pp_instance. pp_sim_get_slave(ppg) always returns a pointer to slave pp_instance. pp_sim_is_master(ppi) and pp_sim_is_slave(ppi) are test for obvious conditions. these last two can be used only if ppi->glbs != NULL, so only if a ppi has been fully initialized.
-