From 70c77d41670aa9a75f4048fbf6cadc069f1f3b2f Mon Sep 17 00:00:00 2001
From: Phillip Raffeck <phillip.raffeck@fau.de>
Date: Fri, 28 Jun 2019 10:04:27 +0200
Subject: [PATCH] cache analysis: comments

---
 lib/analysis/ecb.rb | 2 +-
 lib/analysis/wca.rb | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/analysis/ecb.rb b/lib/analysis/ecb.rb
index ba3d909..1933a2c 100644
--- a/lib/analysis/ecb.rb
+++ b/lib/analysis/ecb.rb
@@ -38,7 +38,7 @@ class ECBAnalysis
   # Calculates set of accessed cache blocks locally for this stream of
   # instructions. Modifications of the cache by calls are ignored.
   def ecb(instructions, cache_config)
-    cache = Cache.new(cache_config)
+    cache = Cache.new(cache_config) # Only used for address calculation
     ecb = Set.new
     instructions.each do |instr|
       tag, set, addr = cache.split_address(instr.address)
diff --git a/lib/analysis/wca.rb b/lib/analysis/wca.rb
index 5bd7690..e45eb38 100644
--- a/lib/analysis/wca.rb
+++ b/lib/analysis/wca.rb
@@ -374,9 +374,11 @@ class WCA
 
         wcet[wcet_for_obj] = [cycles, power_states.to_a]
         node.successors.select { |s| s.isr_entry? }.each { |int|
+          # find successors of isr_entries that activate tasks
           activators = topological_sort(int, GCFGLocalTrait.new).select { |n|
             n.abb.nil? ? false : n.abb.task_activation?
           }
+          # find nodes of activated tasks which are the global successors of the activation nodes
           activations = activators.map { |act|
             topological_sort(act, GCFGLocalTrait.new).map { |n| n.successors(:global) }
           }.flatten
-- 
GitLab