- 26 Mar, 2014 6 commits
-
-
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>
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
-
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>
-
- 21 Mar, 2014 31 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 diagnostics messages were printed with too much newlines because they were using the standard libc puts instead of pp_puts
-
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
-
Pietro Fezzardi authored
This makes the diagnostics easier to understand, printing MASTER and SLAVE for every message
-
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
-
Pietro Fezzardi authored
It will be used to jump ahead in time when no machine is executing.
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
This structure represents all the delays on the outgoing link of the pp_instance. It will be used by the network operations
-
Pietro Fezzardi authored
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
-
Pietro Fezzardi authored
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.
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
These are namely Data Sets, runtime options, servo and TimeProperties. We need them in every instance because we have two ppi (master and slave) acting like two different machines, so they need different copies of these variables. We just put the per-instance stuff in the arch_data. Then we'll change the pointers in the ppg directly in the net operations, according to our needs.
-
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
For now it's the same as arch-unix but it will change when we will add more configuration parameters for the simulator. So it's better to change its name, from the beginning
-
Pietro Fezzardi authored
Kconfig is updated with new arch. It compiles but it's actually doing nothing
-
Pietro Fezzardi authored
New prototype for cfg_handler to remove the global variable *current_ppg. The current ppg is now passed as argument to the cfg handler as follows: typedef int (*cfg_handler)(int lineno, struct pp_globals *ppg, union pp_cfg_arg *arg); New variable added in include/ppsi/pp-instance.h: struct pp_globals_cfg { int cfg_items; int cur_ppi_n; }; Now struct pp_globals has a new field: struct pp_globals { [...] struct pp_globals_cfg cfg; [...] }; The field cfg_items has been moved from pp_globals to pp_globals_cfg. The configuration routine uses the field cur_ppi_n inside pp_globals_cfg to store the current ppi being configured. So neither the global variable *current_ppi is needed anymore. The helper inline function CUR_PPI has been defined to make accesses to current ppi more readable.
-
Grzegorz Daniluk authored
As it was done also in ptp-noposix. We need to try multiple times because sometimes it takes time for HAL to become ready (especially in the GrandMaster mode when it has to lock SoftPLL to an ext clock).
-
Pietro Fezzardi authored
given that INTS() is defined as inline it should not affect the performance even in time-critical cases.
-
- 02 Mar, 2014 3 commits
-
-
Pietro Fezzardi authored
-
Pietro Fezzardi authored
previously one could use config options without arguments, or config options with wrong names, and the program did not complain. now you have to use correct names for config options and only options with type ARG_NONE can be without arguments. hardcoded default config file and config string are supposed always correct so there's still no error check on their parsing. however for any config options passed from command line with -f or -C all the checks are enabled. if there are some syntax errors or options without value the process exits with errors, printing informations on all the found configuration errors.
-
Pietro Fezzardi authored
-