Package org.jacop.examples.fd.filters
Class FilterBenchmark
java.lang.Object
org.jacop.examples.fd.filters.FilterBenchmark
This is a set of filter scheduling examples, commonly used in High-Level Synthesis.
- Version:
- 4.8
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
It solves available filters for different scenario consisting of different number of resources.private static int
div
(int A, int B) static int
experiment1
(Store store, Filter filter, int addNum, int mulNum) It optimizes scheduling of filter operations.static int
experiment1C
(Store store, Filter filter, int addNum, int mulNum, int clock) It optimizes scheduling of filter operation in fashion allowing chaining of operations within one clock cycle.static int
experiment1P
(Store store, Filter filter, int addNum, int mulNum) It optimizes scheduling of filter operations.static int
experiment1PM
(Store store, Filter filter, int addNum, int mulNum) It optimizes scheduling of filter operations in a fashion allowing pipelining of multiplication operations.static int
experiment2
(Store store, Filter filter, int addNum, int mulNum) It optimizes scheduling of filter operations.static int
experiment2C
(Store store, Filter filter, int addNum, int mulNum, int clock) It optimizes scheduling of filter operation in fashion allowing chaining of operations within one clock cycle.static int
experiment2P
(Store store, Filter filter, int addNum, int mulNum) It optimizes scheduling of filter operations.static int
experiment2PM
(Store store, Filter filter, int addNum, int mulNum) It optimizes scheduling of filter operation in fashion allowing pipelining of multiplication operations.static void
It executes the program for number of filters, number of resources (adders, multipliers) and number of different synthesis techniques ( algorithmic pipelining, multiplier pipelining, chaining, no special techniques).makeConstraints
(Store store, Filter filter, int addNum, int mulNum) It creates constraint model for scheduling of filter operations.makeConstraintsChain
(Store store, Filter filter, int addNum, int mulNum, int clk) It creates constraint model for scheduling of filter operation in fashion allowing chaining of operations within one clock cycle.makeConstraintsPipeline
(Store store, Filter filter, int addNum, int mulNum) It creates a model for optimization of scheduling of operations of a given filter.makeConstraintsPipeMultiplier
(Store store, Filter filter, int addNum, int mulNum) It creates constraint model for scheduling of filter operation in fashion allowing pipelining of multiplication operations.makeLabelingList
(IntVar[] T, IntVar[] R) It creates an array of arrays using two arrays.static void
It solves available filters for different scenario consisting of different number of resources.static void
It solves available filters for different scenario consisting of different number of resources.static void
schedule()
It solves available filters for different scenario consisting of different number of resources.
-
Field Details
-
Ts
-
Rs
-
Ds
-
Ns
-
cost
-
-
Constructor Details
-
FilterBenchmark
public FilterBenchmark()
-
-
Method Details
-
main
It executes the program for number of filters, number of resources (adders, multipliers) and number of different synthesis techniques ( algorithmic pipelining, multiplier pipelining, chaining, no special techniques).- Parameters:
args
- parameters (none)
-
schedule
public static void schedule()It solves available filters for different scenario consisting of different number of resources. -
pipeMulSchedule
public static void pipeMulSchedule()It solves available filters for different scenario consisting of different number of resources. It performs pipelining of multiplier operations. -
chainingSchedule
public static void chainingSchedule()It solves available filters for different scenario consisting of different number of resources. It performs chaining of operations. -
pipelineSchedule
public static void pipelineSchedule()It solves available filters for different scenario consisting of different number of resources. It performs algorithmic pipelining. -
experiment1
It optimizes scheduling of filter operations.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- cost of the solution or -1 if no solution found.
-
experiment1C
It optimizes scheduling of filter operation in fashion allowing chaining of operations within one clock cycle.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.clock
- number of time units within a clock.- Returns:
- cost of the solution or -1 if no solution found.
-
div
private static int div(int A, int B) -
experiment1PM
It optimizes scheduling of filter operations in a fashion allowing pipelining of multiplication operations.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- cost of the solution or -1 if no solution found.
-
experiment2PM
It optimizes scheduling of filter operation in fashion allowing pipelining of multiplication operations.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- cost of the solution or -1 if no solution found.
-
experiment1P
It optimizes scheduling of filter operations. It performs algorithmic pipelining.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- cost of the solution or -1 if no solution found.
-
experiment2P
It optimizes scheduling of filter operations. It performs algorithmic pipelining three times.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- cost of the solution or -1 if no solution found.
-
experiment2
It optimizes scheduling of filter operations.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- cost of the solution or -1 if no solution found.
-
experiment2C
It optimizes scheduling of filter operation in fashion allowing chaining of operations within one clock cycle.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.clock
- number of time units within a clock.- Returns:
- cost of the solution or -1 if no solution found.
-
makeConstraints
public static List<List<IntVar>> makeConstraints(Store store, Filter filter, int addNum, int mulNum) It creates constraint model for scheduling of filter operations.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- start time and resource assignment variables describing the scheduling problem.
-
makeConstraintsPipeMultiplier
public static List<List<IntVar>> makeConstraintsPipeMultiplier(Store store, Filter filter, int addNum, int mulNum) It creates constraint model for scheduling of filter operation in fashion allowing pipelining of multiplication operations.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.- Returns:
- start time and resource assignment variables describing the scheduling problem.
-
makeConstraintsChain
public static List<List<IntVar>> makeConstraintsChain(Store store, Filter filter, int addNum, int mulNum, int clk) It creates constraint model for scheduling of filter operation in fashion allowing chaining of operations within one clock cycle.- Parameters:
store
- the constraint store in which the constraints are imposed.filter
- the filter being scheduled.addNum
- number of adders available.mulNum
- number of multipliers available.clk
- number of time units within a clock.- Returns:
- start time and resource assignment variables describing the scheduling problem.
-
makeConstraintsPipeline
public static List<List<IntVar>> makeConstraintsPipeline(Store store, Filter filter, int addNum, int mulNum) It creates a model for optimization of scheduling of operations of a given filter. The pipelined model assumes that the filter is unrolled three times.- Parameters:
store
- constraint store in which the constraints are imposed.filter
- filter for which pipelined execution is optimized.addNum
- number of available addersmulNum
- number of available multipliers.- Returns:
- variables corresponding to start time and resource assignment of the filter operations.
-
makeLabelingList
It creates an array of arrays using two arrays.- Parameters:
T
- an array of variables corresponding to start time of an operation.R
- an array of variables corresponding to resource of an operation.- Returns:
- an array of arrays, each array containing one starttime and one resource assignment variable.
-