======================= Approximation component ======================= * :ref:`Input component ` * :ref:`Quality assurance component ` * **Approximation component** * :ref:`Estimation component ` * :ref:`Search component ` * :ref:`Output ` .. Approximation component .. ======================= .. todo:: * Figure of approximation component. Highlight approximators. .. _user_guide_approx: Component description --------------------- In the configuration file, the user specifies at least one approximation technique, used to approximate the candidates. CIRCA currently provides two techniques: precision scaling (PS) and approximation-aware AIG rewriting (AIG). For each specified approximation technique, CIRCA instantiates an *approximator* and assigns the approximators to the corresponding candidates. During the approximation process, the *Approximation* component calls the candidate's approximator to generate new variants. Additionally to the approximation techniques, the user has to specify :ref:`local quality constraints `, i.e., local error metrics and local error bounds, and may specify the step-size in which the error bounds are increased in the next iteration. .. The *Approximation* component controls the actual approximation process of each candidate to generate a new variant. It supervises the :ref:`Approximator ` sub-components, e.g., precision scaling, by assigning them to candidates and assembling the approximated circuits from the approximated candidate variants. Only the *Approximator* sub-components can be specified in the configuration file. They will be used as default approximation methods for each candidate without approximation methods assigned to it in annotations. .. Multiple *Approximators* can be specified so that candidates will be approximated using different methods. .. Standard *Approximators* of CIRCA are ``PS`` (*precision scaling*) and ``AIG`` (*approximation-aware AIG rewriting*). .. Functionality .. ------------- .. In the ``Approximation`` section of the configuration file, approximation methods and :ref:`local quality constraints ` are specified. Both are used as defaults for candidates which have not been assigned approximation methods or quality constraints during the *input* stage. When these candidates are approximated, separate variants for each approximation method will be generated. The error metrics, bounds and steps specified by the quality constraints serve as a means to control how far and how quickly the approximated variant's acceptable error increases during the approximation process. .. _precision_scaling: Precision scaling ----------------- The precision scaling approximation method generates approximated variants of a candidate by replacing bits of the candidate's output vector with logic 1s or 0s, starting from the LSB. This causes the logic behind the replaced bits to become obsolete; thus, enabling an external synthesis tool to remove it and thereby reduce the circuit's area, delay, power consumption, etc. .. note:: Precision scaling is inherently better compatible with the *bit-flip* error metric than with *worst-case*, because the increasing significance of the replaced bits leads to an exponential increase of the absolute error, making the variant generation for all worst-case error values in-between the exponential steps effectively unnecessary. *Thus, in order to significantly reduce runtime overhead, it is highly recommended to use BF as local error metric.* AIG rewriting [*]_ ------------------ Approximation-aware AIG rewriting operates on the And-Inverter-Graph representation of a circuit. The technique identifies the critical paths, ranks the nodes on the critical paths by their cut size, and iteratively substitutes the nodes by logical *0*. In this way, the computational delay, the area, as well as the power consumption can be reduced. To check the variant's compliance with its quality constraints, an approximation miter formed (a circuit similar to the :ref:`SQCC `) and a SAT solver is employed. .. note:: This technique is restricted to combinational candidates. Configuration options --------------------- :``Method``: ``precision_scaling`` or ``aig_rewriting`` or both separated by a ``c`` :``QualityConstraints``: The default local quality constraints for each candidate which got no constraints assigned in the input stage. The format of the specification is CIRCA's :ref:`standard quality constraint syntax `. Both the ``bound`` and the ``step`` parameter are optional. The maximum ``bound`` can be determined automatically for each candidate and each error metric has a default ``step`` value. At least one error metric must be specified. All error metrics are supported unless restricted by a candidate's approximation method. .. admonition:: Notes and restrictions * The approximators specified in the config. file are the default approximators. Some front-ends allow the specification of candidate-specific configurations, including candidate-specific approximators which override the default settings. * Approximation method implementations can specify a set of restrictions for the quality constraints of their candidates. There may be incompatibilities in some configurations of approximation methods and error metrics. In such a case, the quality constraints will be adjusted accordingly, if possible, and a warning message will be generated. If the adjustments lead to an invalid configuration, e.g., no error metrics left, the approximation process will not be started and CIRCA will terminate with an error message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :ref:`Back to the User Guide ` .. [*] `Arun Chandrasekharan, Mathias Soeken, Daniel Große, and Rolf Drechsler. 2016. Approximation-aware rewriting of AIGs for error tolerant applications. In Proceedings of the 35th International Conference on Computer-Aided Design (ICCAD '16). ACM, New York, NY, USA, Article 83, 8 pages. `_ DOI: https://doi.org/10.1145/2966986.2967003