Class FilterBenchmark


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

      Fields 
      Modifier and Type Field Description
      (package private) static IntVar cost  
      (package private) static java.util.List<java.lang.Integer> Ds  
      (package private) static java.util.List<java.lang.String> Ns  
      (package private) static java.util.List<IntVar> Rs  
      (package private) static java.util.List<IntVar> Ts  
    • Constructor Summary

      Constructors 
      Constructor Description
      FilterBenchmark()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void chainingSchedule()
      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​(java.lang.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 java.util.List<java.util.List<IntVar>> makeConstraints​(Store store, Filter filter, int addNum, int mulNum)
      It creates constraint model for scheduling of filter operations.
      static java.util.List<java.util.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 java.util.List<java.util.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 java.util.List<java.util.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 java.util.List<java.util.List<IntVar>> makeLabelingList​(IntVar[] T, IntVar[] R)
      It creates an array of arrays using two arrays.
      static void pipelineSchedule()
      It solves available filters for different scenario consisting of different number of resources.
      static void pipeMulSchedule()
      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.
      • Methods inherited from class java.lang.Object

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

      • Ts

        static java.util.List<IntVar> Ts
      • Rs

        static java.util.List<IntVar> Rs
      • Ds

        static java.util.List<java.lang.Integer> Ds
      • Ns

        static java.util.List<java.lang.String> Ns
    • Constructor Detail

      • FilterBenchmark

        public FilterBenchmark()
    • Method Detail

      • main

        public static void main​(java.lang.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 java.util.List<java.util.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 java.util.List<java.util.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 java.util.List<java.util.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 java.util.List<java.util.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 java.util.List<java.util.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.