From 403e13383f4b6813d27d4ec4067a29a552893de4 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Wed, 16 May 2012 18:43:28 +0200 Subject: C++: Break out the P-OMLP code into own file Part of refactoring sharedres.cpp. --- native/src/sharedres.cpp | 75 +++--------------------------------------------- 1 file changed, 4 insertions(+), 71 deletions(-) (limited to 'native/src/sharedres.cpp') diff --git a/native/src/sharedres.cpp b/native/src/sharedres.cpp index 4520ccb..02815dc 100644 --- a/native/src/sharedres.cpp +++ b/native/src/sharedres.cpp @@ -451,8 +451,8 @@ static Interference max_local_request_span(const TaskInfo &tsk, return span; } -static void charge_arrival_blocking(const ResourceSharingInfo& info, - BlockingBounds& bounds) +void charge_arrival_blocking(const ResourceSharingInfo& info, + BlockingBounds& bounds) { unsigned int i = 0; const TaskInfos& tasks = info.get_tasks(); @@ -496,11 +496,11 @@ static ClusterLimits np_fifo_limits( return limits; } -static Interference np_fifo_per_resource( +Interference np_fifo_per_resource( const TaskInfo& tsk, const ClusterResources& clusters, unsigned int procs_per_cluster, unsigned int res_id, unsigned int issued, - int dedicated_irq = NO_CPU) + int dedicated_irq) { const unsigned long interval = tsk.get_response(); ClusterLimits limits = np_fifo_limits(tsk, clusters, procs_per_cluster, @@ -553,73 +553,6 @@ static Interference bound_blocking(const LimitedContentionSet &lcs, unsigned int return inter; } -BlockingBounds* part_omlp_bounds(const ResourceSharingInfo& info) -{ - // split everything by partition - Clusters clusters; - - split_by_cluster(info, clusters); - - // split each partition by resource - ClusterResources resources; - - split_by_resource(clusters, resources); - - // sort each contention set by request length - sort_by_request_length(resources); - - // We need for each task the maximum request span. We also need the - // maximum direct blocking from remote partitions for each request. We - // can determine both in one pass. - - unsigned int i; - - // direct blocking results - BlockingBounds* _results = new BlockingBounds(info); - BlockingBounds& results = *_results; - - for (i = 0; i < info.get_tasks().size(); i++) - { - const TaskInfo& tsk = info.get_tasks()[i]; - Interference bterm; - - foreach(tsk.get_requests(), jt) - { - const RequestBound& req = *jt; - - Interference blocking; - - blocking = np_fifo_per_resource( - tsk, resources, 1, - req.get_resource_id(), req.get_num_requests()); - - // add in blocking term - bterm += blocking; - - // Keep track of maximum request span. - // Is this already a single-issue request? - if (req.get_num_requests() != 1) - // nope, need to recompute - blocking = np_fifo_per_resource( - tsk, resources, 1, - req.get_resource_id(), 1); - - // The span includes our own request. - blocking.total_length += req.get_request_length(); - blocking.count += 1; - - // Update max. request span. - results.raise_request_span(i, blocking); - } - - results[i] = bterm; - } - - charge_arrival_blocking(info, results); - - return _results; -} - BlockingBounds* clustered_omlp_bounds(const ResourceSharingInfo& info, unsigned int procs_per_cluster, -- cgit v1.2.2