---------------- ARCHIVE CONTENTS ---------------- ----------------------------------------------------------------------------------------------------------------------- bin/ SIDERA Application ----------------------------------------------------------------------------------------------------------------------- docu/ -) faq.pdf A collection of questions (and of course answers) that may be helpful ;-) -) sidera.pdf.lnk.txt This paper lines out the principles of time-triggered communication and the implementation concepts of SIDERA. The focus is on the clock synchronization mechanism of the Time-Triggered Protocol TTP. -) flexray_case_study.pdf.lnk.txt This paper investigates the properties of the clock synchronization mechanism of the FlexRay communication protocol. Both papers provide simulation experiments using different system configurations. They provide a general view of theoretical and practical issues concerning the simulation of time-triggered communication systems. Browsing them will give you a good idea of the application possibilites of SIDERA. -) thesis.pdf.lnk.txt My PhD Thesis "Investigation of Fault-Tolerant Multi-Cluster Clock Synchronization Strategies by Means of Simulation". It describes the principles of clock synchronization in distributed systems rich in detail and contains many simulation experiments with systems of different size, from 1-cluster systems up to 4-cluster systems. ----------------------------------------------------------------------------------------------------------------------- samples/ Sample system configurations. The folder "TTP" contains a configuration for a TTP single-cluster system ("TTP/1_cluster_TTP.dat.xml") and one for a TTP 2-cluster system ("2_cluster_TTP.dat.xml"). Furthermore, folder "TTP" contains single-cluster system configurations and multi-cluster system configurations that have been used for validation of the SIDERA simulation environment. These configurations and the related simulation experiments are described in the paper "Thesis.pdf" (see above). The folder "Flexray" contains all cluster configurations that have been used for the simulation experiments presented in the paper "FlexRay_study.pdf" (see above). ----------------------------------------------------------------------------------------------------------------------- Readme.txt This file ;-) ----------------------------------------------------------------------------------------------------------------------- -------------------- SYSTEM REQUIREMENTS -------------------- -) Linux (Kernel Version >= 2.6) -) KDE desktop environment -) Qt3 (libqt-mt.so.3) or higher ------------ HOW TO START ------------ 1) After having unzipped the archive, start SIDERA (either from the file manager or from the shell) located in the "bin" directory: > ./bin/SIDERA 2) From the "File" menu, select "Open" and select a configuration from the "samples" directory (e.g. "TTP/1_cluster_TTP.dat.xml"). The contents of the configuration file are displayed in a tree view in the upper part of the application window. 3) From the "Edit" menu, select "Run simulation". The runtime information is displayed in the lower part of the application window. Simulation progress is indicated by a progress bar in the application window status bar. To pause simulation, choose "Stop simulation" from the "Edit" menu. A dialog pops up. To continue simulation, select "No" from the dialog. To abort simulation, select "Yes". 4) When simulation has completed, select a plot of choice from the "Analysis" menu (e.g. the "Precision" plot that shows the maximum deviation between any two clocks measured during simulation time). ------- REMARKS ------- Feel free to use and share this version of SIDERA with others. SIDERA is intended for people who are interested in clock synchronization in distributed systems and may be helpful for their research. More information about SIDERA and some documentation can be found at "http://www.alexanderplatz.at". SIDERA is NOT published under the GPL or any other software license (yet). --------------- VERSION HISTORY --------------- -------------------------------------------------------------------------------------------------------------------------- 2009-07-23: V1.3 Major update *) General .) New GUI *) Documentation .) New FAQs including screen shots .) New help functionality using a "WhatsThis" tool button .) added publications to documentation -) SIDERA.pdf -) FlexRay_study.pdf -) Thesis.pdf *) Configuration file (*.dat.xml): .) new configuration file structure *) Plot .) added a "communication system traffic" plot that shows the use of the available bandwith by every node .) added images and tool tips to the tool buttons for plot manipulation -------------------------------------------------------------------------------------------------------------------------- 2008-07-20: V1.2 *) General .) SIDERA is now independent from MATLAB Real-Time Workshop and the MATLAB model .) SIDERA configuration files have now extension *.dat.xml" instead of "*.dat" .) SIDERA is now a single binary (no "sapp" and "sui" anymore) .) every SIDERA session is logged into folder /temp as file ".log.txt" .) the file "/temp/Parameters.txt" is generated every time SIDERA is started (if it does not exist); it contains information about all configuration file settings (*.xml.dat-Files) *) Simulation parameters .) Maximum number of MEDL slots is now 1000 (was 160 before) .) Maximum slot duration is now 10000 Macroticks (was 1000 before) *) Configuration file (*.dat.xml): .) major structure update: grouped entries to different sections to improve structure .) added entry ""; if != 0, TTP protocol errors are ignored .) added entry ""; if != 0, value defines stochastic drift of node in 1/ppm (= sec/sec) .) added entry ""; number of entries for wrap-around clock reading buffer (default = 4) *) SIDERA settings file -) a file "temp/sidera.ini" is created (with default values for font and path settings), if it does not exist; it contains the selected log window font, the selected application window font and the last configuration file (*.dat.xml) that was loaded/saved *) FlexRay clock sync .) vRateCorrection is now applied in discrete steps (like the clock state correction term); till now, the MMCF (LCP) of the local clock was changed according to vRateCorrection (like in the TTEthernet rate correction) *) Bugfix .) Node 8 was not working due to a bug in the MATLAB model :-( -------------------------------------------------------------------------------------------------------------------------- 2007-04-11: V1.13 *) Application layout -) introduced default font settings (style and size) for sui log window and sui application (such that the text fits into the dialogs) *) Menu items -) added "Log Window Font" and "Application font" to "Settings" Menu *) SUI configuration file -) a file "temp/sui.ini" is created (with default values for font and path settings), if it does not exist; it contains the selected log window font, the selected application window font and the last configuration file (*.dat) that was loaded/saved *) "Cluster settings" dialog: -) rate synchronization settings disabled for multi-cluster systems -------------------------------------------------------------------------------------------------------------------------- 2007-04-06: V1.12 *) Menu items -) added "Clear Plots" to "Settings" Menu (closes all open plot windows) *) Plot -) plotted precision value is limited to a maximum deviation of clocks; meaningful for multi-cluster startup scenarios where the maximum deviation of two clocks in the startup phase usually is significantly high *) Configuration file (*.dat): -) If "max_coldstart_frames" is 0, it is set to 1 ("SET_COLDSTART_MAX(cluster,node,1)"). When configuration is saved, this setting is also saved. Introduced to remove a bug in the cluster startup part of the simulation. -) added "time_flooding" entry (optional) for externally synchronized clusters != 0: upon expiration of the listen timeout,. the coldstart node (= time master node) reads the time from its associated gateway node; if valid, the coldstart node copies the gateway time into the coldstart frame, inits its local clock to gateway time and sends a coldstart frame; if gateway time is invalid, the coldstart node restarts the listen timeout == 0: see above; if gateway time is invalid, the coldstart node copies its message send time (defined in the MEDL) into the coldstart frame, inits its local clock to message send time and sends a coldstart frame CAUTION: in a multi-cluster system with a "complete" feedback loop (i.e. ALL clusters are externally synchronized), at least one cluster has to set the "time_flooding" entry to 0! Otherwise, the system won't start up because all coldstart nodes read invalid gateway times ;-) *) Simulation slot length (multi-cluster systems) -) The simulation slot length (slot_len_sim) is the internally used duration of one slot in simulation time. The reference slot length (slot_len_ref) is the duration of one slot as specified in the configuration file. An internally used drift_multiplier = slot_len_ref/slot_len_sim brings simulation time and real-time into agreement: all timestamps in the system are multiplied with the drift_multiplier, thus "stretching" the duration of a simulation slot (slot_len_sim) to the reference slot length (slot_len_ref). Internally, a fixed duration of MMCF macroticks was used for slot_len_sim. This is OK for single-cluster systems and also for multi-cluster systems as long as all clusters in the system have the same slot_len_ref. If different clusters have different slot_len_ref's, events that happen at different points in real-time may happen at the same point in simlation time (due to different drift_multiplier's in the different clusters). .) Example: Cluster 0 slot_len_ref = 1000 MT (-> msg_send_time = 500) slot_len_sim = 20 MT (-> drift_multiplier = 50) Cluster 1 slot_len_ref = 1500 MT (-> msg_send_time = 750) slot_len_sim = 20 MT (-> drift_multiplier = 75) We assume that all nodes send a message in the middle of their sending slot. msg_send_time is the offset from the slot start time in macroticks (MT). For both clusters have the same slot_len_sim, the msg send times of both clusters in simulation time are equal (10 = 10) although in real-time they aren't (500 != 750). The temporal order of message send times is destroyed in simulation time. Therefore, in a multi-cluster system, the same drift multiplier is used for all clusters. The drift_multiplier of Cluster 0 (drift_multiplier(0)) is taken as a reference for all other clusters. This results in different slot_len_sim in case of different slot_len_ref. The slot_len_sim of Cluster i is calculated such that slot_len_sim(i) = slot_len_ref(i) / drift_multiplier(0) This solves the problem with the temporal order of events in simulation time: using drift_multiplier=50 for Cluster 0 and Cluster 1, we get for slot_len_sim (i): slot_len_sim(0) = 20 MT -> drift_multiplier(0) = 50 slot_len_sim(1) = 30 MT <- (slot_len_ref(1) / drift_multiplier(0) = 1500 /50 = 30) For the message send times it follows that msg_send_time(0) = 10, msg_send_time(1) = 15, which preserves the temporal order of message send times in simulation time. *) Samples: += "Multi-cluster" added different multi-cluster configurations with up to 4 clusters -------------------------------------------------------------------------------------------------------------------------- 2007-04-05: V1.11 *) Text Dialog -) removed confusing debug outputs (e.g. FREEZE->ACTIVE on cluster startup a.s.o.) *) Plot -) "splot" is not started as a separate binary (QProcess context) anymore; instead, the CPlot object is directly called from the "sui" application. -) The "splot" binary is not built anymore and therefore not contained in the "bin" directory. -) Added progress bar for plot progress. The plot progress bar is disabled when a plot command is issued while a simulation is running (because the same progress bar is used for simulation and plot progress). -) The "Analysis" menu is locked while a plot is in progress. *) "System settings" dialog: -) "Logfile sample rate" removed; the log file "*.mat" logs all events with macrotick granularity now. -) added "Clock settings" .) Define oscillator ticks per microtick and MMCF for all node clocks in the system. .) The oscillator tick has a constant duration of 5ns and cannot be changed (yet). *) "Cluster settings" dialog: -) revised dialog, re-arranged and re-grouped items, looks nice now :-) *) "Save as" file dialog: -) The current config file name (*.dat) is proposed for saving. -------------------------------------------------------------------------------------------------------------------------- 2007-03-31: V1.10 *) Menu items -) Unused menu items have been removed (among others, "Print", "New", "About Qt"). -) Added "Settings" Menu .) "Change Font" allows to change the text window dialog font .) "Clear History" clears all data in the text window dialog -) Added "Settings" ("Cleart" allows to change the text dialog font) -) Dedicated menu items (among others, all "Edit" menu items) are disabled while simulation is running and re-enabled after simulation has completed. -) Dedicated menu items (among others, all "Edit" menu items) are disabled if no configuration file has been loaded and enabled when a configuration file is loaded. *) Simulation progress indication -) No own dialog for the progress bar; simulation progress is indicated in the application window status bar. *) Process handling -) An active and running "sapp" process is terminated when the "sui" process that started it terminates. -) All active "splot" processes are terminated when the "sui" process that started them terminates. *) Parallel processing -) "sui" processes can be started in parallel :-) -) If a "sui" instance runs a simulation based on a given configuration file, no other "sui" instance is allowed to perform a simulation run based on this configuration file until simulation is completed or terminated. *) Samples -) added SIDERA single cluster validation tests from publication Alexander Hanzlik, Investigation of Fault-Tolerant Multi-Cluster Clock Synchronization Strategies by Means of Simulation, PhD Thesis, Vienna University of Technology, Institute for Computer Engineering, Vienna, Austria, Oct. 2004. -------------------------------------------------------------------------------------------------------------------------- 2007-03-26: V1.09 *) online log output -) all online logging information is displayed in the SUI application window; no console window is needed for reading online logging information anymore :-) *) process handling -) "sapp" and "Plot" are started in the context of QProcess objects; no "system" commands are used anymore :-) *) progress bar dialog -) not modal anymore (to be able to scroll the online log output in the SUI application window while simulation is running) -------------------------------------------------------------------------------------------------------------------------- 2007-03-25: V1.08 *) Configuration file (*.dat): -) removed tag from configuration file (*.dat) Configurations containing a tag are tolerated (for backwards compatibility), but the value of is ignored. The simulation slot length is set to SIM_SLOT_LEN_SIM_DEFAULT regardless of the value of an existing tag. When the configuration file is stored, a potentially existing tag is not stored. *) online log entries (*.dat.txt): -) All timing information (e.g. macrotick timestamps, microtick timestamps, GOD's clock, ...) are given in terms of REALTIME. That means that all timestamps are multiplied with the DRIFT_MULTIPLIER (slot_len_ref/slot_len_sim). This brings the timing informations in the online log and the plots into agreement. Prior to this version of SIDERA, all timetamps have been given in terms of SIMULATION time. -------------------------------------------------------------------------------------------------------------------------- 2007-03-24: V1.07 *) online log entries (*.dat.txt): -) PROTOCOL ERROR: communication system blackout added ACK_COUNT, INV_COUNT, FAIL_COUNT to log output added local MACROTICK counter to log output -) PROTOCOL ERROR: clock synchronization, acknowledgement added local MACROTICK counter to log output *) protocol error handling -) communication system blackout, acknowledgement error The checks are performed each time a node enters its sending slot. If there is more than one sending slot for a node in the communication schedule (MEDL), the checks are performed in EACH sending slot of this node. Prior to this version of SIDERA, the checks have been performed in the FIRST sending slot of each node (i.e. only ONCE per communication cycle). In FlexRay clusters, checks for communication system blackout and acknowledgement errors are not performed. -------------------------------------------------------------------------------------------------------------------------- 2007-02-23: V1.06 *) all FlexRay parameters are now CLUSTER-global (and not system-global any more) *) Configuration file (*.dat): -) added "Flexray_pOffsetCorrectionOut" Bounds maximum offset correction value for all nodes in FlexRay clusters (if > 0). -) added "Flexray_comm_cycle_len" -) added "Flexray_NIT" -) removed "Flexray_vrate_integral" (does not make sense any more!) *) modified FlexRay rate correction part: // GET_VRATE_CORRECTION() is the midterm of the offset differences of sync nodes // from two consecutive communication cycles vRateCorrection_new = GET_VRATE_CORRECTION (cluster_idx,this_node) + vRateCorrection_old; vRateCorrection_new = damp (vRateCorrection_new); // apply Flexray_gClusterDriftDamping vRateCorrection_new = bound (vRateCorrection_new); // apply Flexray_pRateCorrectionOut vRateCorrection_old = vRateCorrection_new; -------------------------------------------------------------------------------------------------------------------------- 2007-02-20: V1.05 *) configuration file (*.dat) is now in XML format with the following restrictions: -) "single" values: opening tag, value and closing tag have to be in the same line (e.g. 0.1 ) -) there has to be at least one whitespace between opening tag and value and value and closing tag, respectively (e.g. 0.1 will produce an error) -) enclosing tags have to be "standalone" in one line, e.g. ("Node" is enclosing tag) .) not OK: 20 ... .) OK 20 *) "System settings" dialog: -) "Logfile sample rate" is no longer adjustible (it is set to SIM_MACROTICK_LEN by default); the log file "*.mat" logs all events with macrotick granularity now *) added file "/SIDERA/Open Item List.txt" not to forget things that shall be done or fixed ;-) -------------------------------------------------------------------------------------------------------------------------- 2007-02-17: V1.04 *) added "sim_comm_rounds" to configuration file (*.dat): The simulation time is no longer changeable. The number of communication rounds ("sim_comm_rounds") determines simulation time. Either "sim_comm_rounds" or "sim_time" have to exist in the configuration file. If both entries exists, "simm_comm_rounds" wins (to be compatible with configuration files created before release V1.04). sim_comm_rounds = sim_time / (GET_NUM_MEDL_SLOTS(0) * SIM_SLOT_LEN_SIM_DEFAULT * SIM_MACROTICK_LEN) In a multi-cluster system, sim_time depends on the number of MEDL slots of cluster 0 (the simulation slot length SIM_SLOT_LEN_SIM_DEFAULT is the same for all clusters). *) "System settings" dialog: -) added "communication rounds" spinbox -) disabled "simulation time" spinbox *) "Cluster settings" -) disabled "simulation slot length" spinbox simulation slot length is set to "SIM_SLOT_LEN_SIM_DEFAULT" by init_model_param() -------------------------------------------------------------------------------------------------------------------------- 2006-12-09: V1.03 *) "System settings" dialog: added buttons "Help", "OK" and "Cancel" *) "Help" buttons: disabled in all dialogs, but there will be a help utility in the future, I promise ;-) *) Added optional entry to configuration file (*.dat): -)Flexray_vrate_integral "0": the state deviations from two successive communication cycles (GET_VRATE_CORRECTION) are used for rate correction /* calculate new MMCF value */ LCP_new = GET_LCP(cluster_idx, this_node) + ((float)GET_VRATE_CORRECTION (cluster_idx,this_node) / (float)GET_TDMA_ROUND_LEN(cluster_idx)); "1": the state deviations are summed up and the SUM is used for rate correction /* update rate correction integral (= sum of all deviations from successive cycles) */ UPDATE_VRATE_CORRECTION_INTEGRAL(cluster_idx,this_node, GET_VRATE_CORRECTION (cluster_idx,this_node)); /* calculate new MMCF value */ LCP_new = GET_LCP(cluster_idx, this_node) + ((float)GET_VRATE_CORRECTION_INTEGRAL (cluster_idx,this_node) / (float)GET_TDMA_ROUND_LEN(cluster_idx)); *) Samples: += Cluster1_Zf_0_delta_rho_max_jump_588slots_damp5_maxrcorr_10_integral.dat: FlexRay cluster with 5 microticks damp value and 10 microticks maximum rate correction (per cluster cycle each); the state deviations are summed up and used for rate correction ("Flexray_vrate_integral" is 1) -------------------------------------------------------------------------------------------------------------------------- 2006-12-03: V1.02 *) Added version string. Shown in stdout when calling "./sui", "./sapp" and "./Plot", respectively. *) Added optional entries to configuration file (*.dat): -) Flexray_gClusterDriftDamping -) Flexray_pRateCorrectionOut for simulation of the FlexRay rate correction damping mechanism. *) Samples: += single_cluster_node0_starts_lately.dat: node fails in slot 0 and reintegrates in slot 30 Cluster1_Zf_0_delta_rho_max_jump_588_no_rate_damp.dat: FlexRay cluster without no rate correction bounds Cluster1_Zf_0_delta_rho_max_jump_588slots_damp5_maxrcorr_10.dat: FlexRay cluster with 5 microticks damp value and 10 microticks maximum rate correction (per cluster cycle each) -------------------------------------------------------------------------------------------------------------------------- 2006-11-19: V1.01 *) "Cluster settings": checkbox "cluster startup" enabled (cluster startup simulation now possible) *) Logging: the console output is now logged to file "*.dat.txt" *) Samples: += added FlexRay configurations presented in Publication "Stability and Performance of Clock Synchronization in Flexray", International Review on Computers and Software (IRECOS), Vol.1, N.2, September 2006 -------------------------------------------------------------------------------------------------------------------------- 2006-11-02: Initial Version V1.00 *) Samples: single_cluster.dat, multi_cluster.dat --------------------------------------------------------------------------------------------------------------------------