Class FilterBenchmark

java.lang.Object
org.jacop.examples.fd.filters.FilterBenchmark

public class FilterBenchmark extends Object
This is a set of filter scheduling examples, commonly used in High-Level Synthesis.
Version:
4.10
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static IntVar
     
    (package private) static List<Integer>
     
    (package private) static List<String>
     
    (package private) static List<IntVar>
     
    (package private) static List<IntVar>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
    main(String[] args)
    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).
    static List<List<IntVar>>
    makeConstraints(Store store, Filter filter, int addNum, int mulNum)
    It creates constraint model for scheduling of filter operations.
    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.
    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.
    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.
    static List<List<IntVar>>
    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
    It solves available filters for different scenario consisting of different number of resources.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FilterBenchmark

      public FilterBenchmark()
  • Method Details

    • main

      public static void main(String[] args)
      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

      public static int experiment1(Store store, Filter filter, int addNum, int mulNum)
      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

      public 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.
      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

      public 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.
      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

      public static int experiment2PM(Store store, Filter filter, int addNum, int mulNum)
      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

      public static int experiment1P(Store store, Filter filter, int addNum, int mulNum)
      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

      public static int experiment2P(Store store, Filter filter, int addNum, int mulNum)
      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

      public static int experiment2(Store store, Filter filter, int addNum, int mulNum)
      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

      public 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.
      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 adders
      mulNum - number of available multipliers.
      Returns:
      variables corresponding to start time and resource assignment of the filter operations.
    • makeLabelingList

      public static List<List<IntVar>> makeLabelingList(IntVar[] T, IntVar[] R)
      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.