mlonmcu.target package

Subpackages

Submodules

mlonmcu.target.common module

Helper functions used by MLonMCU targets

mlonmcu.target.common.add_common_options(parser: ArgumentParser, target)[source]

Add a set of common options to a command line parser.

Parameters:
parserargparse.ArgumentParser

The command line parser

mlonmcu.target.common.cli(target, args: List[str] = None)[source]

Utility to handle the command line api for targets.

Parameters:
targetTarget

The target to be used.

argslist

Interface to pass arguments to the command line parser from test functions.

mlonmcu.target.common.execute(*args, **kwargs)[source]

Redicrection of old mlonmcu.target.common.execute to new location mlonmcu.setup.utils.execute

Parameters:
argslist

Arguments

kwargsdict

Keyword Arguments

mlonmcu.target.common.init_target_features(names, config)[source]

mlonmcu.target.elf module

mlonmcu.target.host_x86 module

mlonmcu.target.metrics module

class mlonmcu.target.metrics.Metrics[source]

Bases: object

add(name, value, optional=False, overwrite=False, prepend=False)[source]
static from_csv(text)[source]
get(name)[source]
get_data(include_optional=False, identify_optional=False)[source]
has(name)[source]
to_csv(include_optional=False)[source]

mlonmcu.target.target module

MLonMCU Target definitions

class mlonmcu.target.target.Target(name: str, features: List[Feature] = None, config: dict = None)[source]

Bases: object

Base target class

Attributes:
namestr

Default name of the target

featureslist

List of target features which should be enabled

configdict

User config defined via key-value pairs

inspect_programstr

Program which can be used to inspect executables (i.e. readelf)

inspect_program_argslist

List of additional arguments to the inspect_program

envos._Environ

Optinal map of environment variables

DEFAULTS = {'fclk': None, 'print_outputs': False, 'repeat': None, 'temp_dir_base': None}
FEATURES = {'benchmark'}
OPTIONAL = {}
REQUIRED = {}
add_backend_config(backend, config, optimized_layouts=False, optimized_schedules=False)[source]
add_platform_config(platform, config)[source]
add_platform_defs(platform, defs)[source]
exec(program: Path, *args, cwd='/home/docs/checkouts/readthedocs.org/user_builds/mlonmcu/checkouts/latest/docs', **kwargs)[source]

Use target to execute a executable with given arguments

export_artifacts(path)[source]
property fclk
generate(elf) Tuple[dict, dict][source]
generate_artifacts(elf)[source]
get_arch()[source]
get_backend_config(backend, optimized_layouts=False, optimized_schedules=False)[source]
get_hardware_details()[source]
get_metrics(elf, directory, *args, handle_exit=None)[source]
get_platform_config(platform)[source]
get_platform_defs(platform)[source]
get_target_system()[source]
inspect(program: Path, *args, **kwargs)[source]

Use target to inspect a executable

parse_exit(out)[source]
parse_stdout(out, metrics, exit_code=0)[source]
property print_outputs
process_features(features)[source]
reconfigure()[source]
property repeat
property supports_argv
property supports_filesystem
property supports_stdin
property supports_stdout
property supports_uart
property temp_dir_base

Module contents