Beispiel #1
0
from microprobe.code.context import Context
from microprobe.code.ins import Instruction
from microprobe.exceptions import MicroprobeCodeGenerationError, \
    MicroprobeError, MicroprobeValueError
from microprobe.utils.imp import get_all_subclasses, load_source
from microprobe.utils.logger import DEBUG, get_logger, set_log_level
from microprobe.utils.misc import OrderedDict, findfiles, Progress, \
    open_generic_fd

# Local modules


# Constants

#: Package logger (:class:`~.logging.Logger`).
LOG = get_logger(__name__)

_INIT = True
__all__ = ['get_wrapper', 'Synthesizer']


# Functions
def get_wrapper(name):
    """Return a wrapper object with name *name*.

    Look for the registered :class:`~.Wrapper` objects and return and instance
    of the one with name equal *name*.

    :param name: Wrapper name
    :type name: :class:`~.str`
    :return: A wrapper instance
from microprobe.target import import_definition
from microprobe.utils.cmdline import dict_key, existing_dir, \
    float_type, int_type, print_error, print_info
from microprobe.utils.logger import get_logger

__author__ = "Ramon Bertran"
__copyright__ = "Copyright 2011-2021 IBM Corporation"
__credits__ = []
__license__ = "IBM (c) 2011-2021 All rights reserved"
__version__ = "0.5"
__maintainer__ = "Ramon Bertran"
__email__ = "*****@*****.**"
__status__ = "Development"  # "Prototype", "Development", or "Production"

# Constants
LOG = get_logger(__name__)  # Get the generic logging interface


# Functions
def main_setup():
    """
    Set up the command line interface (CLI) with the arguments required by
    this command line tool.
    """

    args = sys.argv[1:]

    # Get the target definition
    try:
        target = import_definition("power_v206-power7-ppc64_linux_gcc")
    except MicroprobeTargetDefinitionError as exc: