- 21 Nov, 2016 1 commit
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 04 Nov, 2016 1 commit
-
-
Alessandro Rubini authored
Most arguments of net->send are redundant, as the ppi includes all info. In particular, chtype and "is_pdelay_addr" derive from the message type. And the timestamp is always internal. I chose not to remove message, len and msgtype because the message being sent includes the header (ppi->tx_offset), so there's some calculation to extract them. This may happen in a later commit, if I find that is a size improvement. Bugs fixed as a side effect: - the "if" for "is_pelay" missed PDELAY_RESP_F_UP (now it's in msgtype.c) - wrpc pdelay was always using the e2e mac address This commit decreases the size of all archs by 60 bytes, but increases wrpc by 20 bytes because of the fix above Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 16 May, 2016 1 commit
-
-
Alessandro Rubini authored
We don't zero timer any more (see preceding commit), no need to special case anything. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 06 Jul, 2015 1 commit
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 07 Nov, 2014 1 commit
-
-
Alessandro Rubini authored
I'm going to introduce a "flags" field in pp_instance, so diagnostic flags are better called d_flags. The same applies, for consistency, to the global variable. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 22 Sep, 2014 2 commits
-
-
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
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>
-
- 18 Jul, 2014 1 commit
-
-
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.
-
- 21 Mar, 2014 17 commits
-
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
It now returns the initial value of freq_ppm_real, a parameter representing the error of the simulated hw clock
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
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.
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
It will be used to jump ahead in time when no machine is executing.
-
Pietro Fezzardi authored
They're designed to be used for both the instances, master and slave. This is possible because the new data structure pp_sim_time_instance holding all the information about the time of a single instance is placed inside the ppi arch_data
-
Pietro Fezzardi authored
Kconfig is updated with new arch. It compiles but it's actually doing nothing
-