runtime.contstants module

class runtime.constants.DIRS

Bases: object

Constant global directory names.

CIRCA_REPO = ''

Root directory of the CIRCA framework. Is set dynamically on start.

TEMPLATES = ''

Directory containing template circuits for QualityAssurance. Is set dynamically on start.

APPROX_CIRCUITS = '/approx_circuits'

Name of the directory in which the approximated circuit files will be stored.

CANDIDATES = '/candidates'

Name of the parent directory for the candidates’ own directories.

OUTPUT = '/output'

Name of the output directory.

class runtime.constants.LOG

Bases: object

Constant default log file names.

APPROX_FILE = 'approx_circuits_log.log'

Name of the log file containing only the most important log entries of each loop iteration.

LOG_FILE = 'log.log'

Name of the log file in which all log entries are stored.

class runtime.constants.QC

Bases: object

Global constants for quality constraints.

WORST_CASE = 'WC'

Unique ID of the Worst-Case error metric.

BIT_FLIP = 'BF'

Unique ID of the Bit-Flip error metric.

RELATIVE = 'REL'

Unique ID of the Relative error metric.

BIT_MASK = 'BM'

Unique ID of the Bit-Mask error metric.

SUPPORTED_QCS = ['WC', 'BF', 'REL', 'BM']

List of all error metric IDs.

class runtime.constants.APPROX

Bases: object

Global constants for approximation methods.

PRECISION_SCALING = 'PS'

Unique ID of the Precision Scaling approximation technique.

AIG_REWRITING = 'AIG'

Unique ID of the AIG-Rewriting approximation technique.

SUPPORTED_AMS = ['PS', 'AIG']

List of all approximation technique IDs.

METHODS_KEYWORD = 'AppMethods'

Keyword for specifying approximation methods in candidate annotations.

OPTIONS_KEYWORD = 'AMOptions'

Keyword for specifying additional approximation options in candidate annotations.

class runtime.constants.CFG

Bases: object

Configuration file section names and keywords.

SECTION_GENERAL = 'General'
SECTION_INPUT = 'Input'
SECTION_ESTIMATION = 'Estimation'
SECTION_QA = 'QualityAssurance'
SECTION_APPROX = 'Approximation'
SECTION_OUTPUT = 'Output'
GENERAL_TOP_MODULE = 'TopModule'
INPUT_METHOD = 'Method'
INPUT_KEY = 'Key'
SEARCH_METHOD = 'Method'
ESTIMATION_METHOD = 'Method'
QA_METHOD = 'Method'
QA_QCS = 'QualityConstraints'
QA_CIRCUIT_TYPE = 'CircuitType'
QA_OUTPUT_SIGNAL = 'OutputSignal'
QA_OUTPUT_SIGNED = 'OutputIsSigned'
QA_OUTPUT_CONCAT = 'OutputSignalConcat'
QA_VALID_SIGNAL = 'ValidSignal'
QA_RESET_SIGNAL = 'ResetSignal'
QA_RESET_HIGH_ACTIVE = 'ResetSignalIsHighActive'
QA_START_SIGNAL = 'StartSignal'
QA_START_HIGH_ACTIVE = 'StartSignalIsHighActive'
APPROX_METHOD = 'Method'
APPROX_QCS = 'QualityConstraints'
APPROX_QCS_BOUND = 'bound'
APPROX_QCS_STEP = 'step'
OUTPUT_METHOD = 'Method'
class runtime.constants.CIRCUIT_TYPE

Bases: object

Possible values of the CircuitType config option.

COMBINATIONAL = 'combinational'
RUN_TO_COMPLETION = 'run_to_completion'
STREAMING = 'streaming'
class runtime.constants.SQCC

Bases: object

TOP_MODULE = 'sqcc'
NAME_VALID = 'valid_sqcc'
NAME_Q = 'q_sqcc'