Skip to content
Snippets Groups Projects
Commit 70c77d41 authored by Phillip Raffeck's avatar Phillip Raffeck
Browse files

cache analysis: comments

parent 4e8c7417
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ class ECBAnalysis ...@@ -38,7 +38,7 @@ class ECBAnalysis
# Calculates set of accessed cache blocks locally for this stream of # Calculates set of accessed cache blocks locally for this stream of
# instructions. Modifications of the cache by calls are ignored. # instructions. Modifications of the cache by calls are ignored.
def ecb(instructions, cache_config) def ecb(instructions, cache_config)
cache = Cache.new(cache_config) cache = Cache.new(cache_config) # Only used for address calculation
ecb = Set.new ecb = Set.new
instructions.each do |instr| instructions.each do |instr|
tag, set, addr = cache.split_address(instr.address) tag, set, addr = cache.split_address(instr.address)
......
...@@ -374,9 +374,11 @@ class WCA ...@@ -374,9 +374,11 @@ class WCA
wcet[wcet_for_obj] = [cycles, power_states.to_a] wcet[wcet_for_obj] = [cycles, power_states.to_a]
node.successors.select { |s| s.isr_entry? }.each { |int| 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| activators = topological_sort(int, GCFGLocalTrait.new).select { |n|
n.abb.nil? ? false : n.abb.task_activation? 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| activations = activators.map { |act|
topological_sort(act, GCFGLocalTrait.new).map { |n| n.successors(:global) } topological_sort(act, GCFGLocalTrait.new).map { |n| n.successors(:global) }
}.flatten }.flatten
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment