1. 25 Oct, 2016 3 commits
  2. 20 Sep, 2016 1 commit
    • Alessandro Rubini's avatar
      Support E2E build without P2P. Saves 5kB in wrpc-sw · 3542ae48
      Alessandro Rubini authored
      Here in ppsi,
        ./MAKEALL wrpc_defconfig wrpc_pdelay_defconfig
      shows a very small difference, but most pdelay code is then
      discarded by the wrpc-sw link time, due to --gc-sections.
      This is the result:
         laptopo% ./MAKEALL spec_defconfig spec_pdelay_defconfig
         ##### Building with 'spec_defconfig'
         /opt/lm32-gcc-4.5.3/bin/lm32-elf-ar: creating libsdbfs.a
            text    data     bss     dec     hex filename
           87688    3492    6352   97532   17cfc wrc.elf
         ##### Building with 'spec_pdelay_defconfig'
         /opt/lm32-gcc-4.5.3/bin/lm32-elf-ar: creating libsdbfs.a
            text    data     bss     dec     hex filename
           93140    3492    6360  102992   19250 wrc.elf
      What is missing now is the run-time choice between e2e and p2p. Later....
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  3. 16 May, 2016 1 commit
    • Alessandro Rubini's avatar
      pdelay: fix init, audit frame formats · 0a50c6d3
      Alessandro Rubini authored
      This commit ensures all architectures do the proper things to work
      with either end-to-end and peer-to-peer, and all frames use the
      proper addresses
       * we avoid ifdef by using HAS_PTP and HAS_E2E
       * no need to -D config items in Makefile
       * wrpc now correctly sets ppg->delay_mech at startup
       * the simulator now correctly sets ppg->delay_mech at startup
       * bare archs correctly set ppg->delay_mech at startup
       * bare archs properly use one or the other multicast address
       * pp_instance_cfg->delay_mech is removed as not yet used
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  4. 08 Apr, 2016 2 commits
  5. 06 Jul, 2015 3 commits
  6. 26 Jun, 2015 1 commit
  7. 05 Dec, 2014 1 commit
    • Alessandro Rubini's avatar
      general: move buffers our of pp_instance, and make them smaller · d93b31c7
      Alessandro Rubini authored
      In order to fit all pp_instance items withing WRS shared memory,
      we need to make them a little smaller.  Thus, the tx and rx buffers
      are now allocated separately.  And, while I am at it, I make them
      smaller, because 128 bytes are more than enough for PTP with
      extensions (all frames are under 100 bytes). Given we are always
      showr of memory in wrpc-sw, this is benefical.
      As a side effect, clean up some out-of-memory exit paths, and fix a
      use-before-check buglet in arch-unix (no, we never go out of memory,
      but the check was wrong).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
  8. 11 Nov, 2014 1 commit
  9. 07 Nov, 2014 5 commits
  10. 22 Sep, 2014 2 commits
  11. 18 Jul, 2014 1 commit
    • Pietro Fezzardi's avatar
      arch-sim: new simulator diagnostics and config · 717a8f5e
      Pietro Fezzardi authored
      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
      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.
  12. 26 Mar, 2014 1 commit
  13. 21 Mar, 2014 18 commits
    • Pietro Fezzardi's avatar
    • Pietro Fezzardi's avatar
      arch-sim: use new functions to access instances · 77db1c77
      Pietro Fezzardi authored
      when possible substitute the access pattern
      	ppi = &ppg->pp_instances[n];
      	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
    • Pietro Fezzardi's avatar
      arch-sim: fixed linking with libc-functions · b98cd522
      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's avatar
      arch-sim: randomized jitter in transmission · 7093ef18
      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's avatar
      arch-sim: added config option "sim_duration_sec" · c70c124a
      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's avatar
    • Pietro Fezzardi's avatar
      arch-sim: refactorized net_ops · b07673a4
      Pietro Fezzardi authored
    • Pietro Fezzardi's avatar
      arch-sim: new standard names for the ifaces · 7cd3719d
      Pietro Fezzardi authored
      This makes the diagnostics easier to understand, printing MASTER and SLAVE
      for every message
    • Pietro Fezzardi's avatar
      arch-sim: network operations and main loop · dcddecbc
      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's avatar
      arch-sim: config options for net delay · d53137e5
      Pietro Fezzardi authored
    • Pietro Fezzardi's avatar
      time-sim: added sim_fast_forward_ns · 02bf7e83
      Pietro Fezzardi authored
      It will be used to jump ahead in time when no machine is executing.
    • Pietro Fezzardi's avatar
      arch-sim: added struct pp_sim_net_delay · 8ba0d746
      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's avatar
      arch-sim: added per-arch config options · 17a47301
      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's avatar
      arch-sim: new inline functions to select instances · 54eb55be
      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's avatar
    • Pietro Fezzardi's avatar
      arch-sim: fields added to struct sim_ppi_arch_data · 16b4b4e3
      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's avatar
      time-sim: added time operations · aea3aa29
      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's avatar
      arch-sim: new prototype for global arch_data · 44e73697
      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