private class ClusterMutExclNonPipelined.OptimizeSchedule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.HashMap<java.lang.Integer,java.util.List<java.lang.String>> |
commCpuMap
Communication tasks mapped to the same DMA engines
|
private java.util.HashMap<java.lang.Integer,java.util.List<java.lang.String>> |
dataFlowCpuMap
tasks mapped to the same processors.
|
(package private) ClusterMutExclNonPipelined |
optiSolver
Latency and Processor usage optimizer
|
(package private) boolean |
verifyLatency
Verify if the latency was really reduced or not with
extra constraints
|
Constructor and Description |
---|
ClusterMutExclNonPipelined.OptimizeSchedule()
Build a new schedule optimizer object
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
generateNonLazySchedule(java.util.HashMap<java.lang.String,java.lang.String> model)
Generate a non-lazy schedule from the loose schedule obtained
|
java.util.Map<java.lang.String,java.lang.String> |
generateProcOptimalSched(java.util.HashMap<java.lang.String,java.lang.String> procAllocationModel,
java.util.HashMap<java.lang.String,java.lang.String> startTimeModel)
Generate constraints for improving the processor usage and solve it.
|
private Graph |
getBufferConstraintSdf(java.util.HashMap<java.lang.String,java.lang.String> model)
Generate a SDF graph from the model containing buffer size.
|
Actor |
getOutgoingPreviousDmaActor(Actor hsdfActr,
Graph hsdfGraph) |
private java.util.List<java.lang.String> |
getOverlappingActors(java.lang.String actor,
java.util.List<java.lang.String> clusterHsdfActors,
java.util.HashMap<java.lang.String,java.lang.String> model)
Get actors which can potentially execute in parallel with this actor.
|
private void |
initLists(java.util.HashMap<java.lang.String,java.lang.String> procAllocationModel,
java.util.HashMap<java.lang.String,java.lang.String> startTimeModel)
Form the lists of tasks allocated to Processors and DMA engines.
|
private void |
nonLazyConstraints(java.util.HashMap<java.lang.String,java.lang.String> model,
Graph bufferConstraintHsdf)
Generate constraints to make a schedule non-lazy
|
private void |
setActorTimes(java.util.HashMap<java.lang.String,java.lang.String> model)
Fix task start times to a given value in the model
|
private void |
strictProcSymConstraints(java.util.HashSet<java.lang.String> actrAllocated,
int startProcIndex,
Cluster cluster,
java.util.HashMap<java.lang.String,java.lang.String> model)
Generate strict processor constraint to allocate a new processor only
if the processor with lower index and no empty time slot.
|
private java.util.HashMap<java.lang.Integer,java.util.List<java.lang.String>> dataFlowCpuMap
private java.util.HashMap<java.lang.Integer,java.util.List<java.lang.String>> commCpuMap
ClusterMutExclNonPipelined optiSolver
boolean verifyLatency
public ClusterMutExclNonPipelined.OptimizeSchedule()
public java.util.Map<java.lang.String,java.lang.String> generateProcOptimalSched(java.util.HashMap<java.lang.String,java.lang.String> procAllocationModel, java.util.HashMap<java.lang.String,java.lang.String> startTimeModel)
procAllocationModel
- model containing processor allocation information for all the tasksstartTimeModel
- model containing start times information for all the taskspublic java.util.Map<java.lang.String,java.lang.String> generateNonLazySchedule(java.util.HashMap<java.lang.String,java.lang.String> model)
model
- lazy schedule obtained from originally solving the problemprivate java.util.List<java.lang.String> getOverlappingActors(java.lang.String actor, java.util.List<java.lang.String> clusterHsdfActors, java.util.HashMap<java.lang.String,java.lang.String> model)
actor
- name of the actorclusterHsdfActors
- hsdf actors allocated to the clustermodel
- model containing start and end times of the tasksprivate void strictProcSymConstraints(java.util.HashSet<java.lang.String> actrAllocated, int startProcIndex, Cluster cluster, java.util.HashMap<java.lang.String,java.lang.String> model)
actrAllocated
- list of actor allocated to this clusterstartProcIndex
- starting index of the processorcluster
- cluster where to perform allocationmodel
- model containing start time valueprivate void setActorTimes(java.util.HashMap<java.lang.String,java.lang.String> model)
model
- model containing task start times.public Actor getOutgoingPreviousDmaActor(Actor hsdfActr, Graph hsdfGraph)
private void nonLazyConstraints(java.util.HashMap<java.lang.String,java.lang.String> model, Graph bufferConstraintHsdf)
model
- lazy model obtained from the solverbufferConstraintHsdf
- HSDF graph containing the buffer sizes for all the channelsprivate void initLists(java.util.HashMap<java.lang.String,java.lang.String> procAllocationModel, java.util.HashMap<java.lang.String,java.lang.String> startTimeModel)
procAllocationModel
- model containing processor allocationstartTimeModel
- model containing start times of the tasksprivate Graph getBufferConstraintSdf(java.util.HashMap<java.lang.String,java.lang.String> model)
model
- model obtained from the SMT solver