microprobe.target

microprobe.target package

A target is defined by three components. The architecture definition (see isa subpackage), the microarchitecture definition (see uarch subpackage) and the environment definition (see env subpackage). These three elements define the properties of the target which might be queried during the code generation in order to drive the code generation.

The main elements of this package are the following:

  • import_definition() function provides support for importing target definitions.

  • Definition objects encapsulate the required information to be able to import architecture, microarchitecture or environment definitions.

  • Target objects are in charge of providing a generic API to query all kind of target properties. This is the main object that is used by other modules and packages of microprobe to query target information (e.g. instructions, registers, functional units, etc.).

Functions

import_definition(definition_tuple)

Return the target corresponding the to the given definition_tuple.

Classes

Definition(filename, name, description)

Class to represent a target element definition.

Target(isa[, env, uarch])

Class to represent a code generation target.

Classes diagram

Inheritance diagram of Definition, Target



Functions

import_definition(definition_tuple: str | Tuple[Definition, Definition, Definition])[source]

Return the target corresponding the to the given definition_tuple.

Return the target object corresponding the to the given definition_tuple. The definition_tuple is a string of the form <architecture_name>-<uarch_name>-<environment_name> that defines the target. This function uses the search paths provided in the configuration to look for the definitions to import.

Parameters:

definition_tuple (str) – Target definition string

Returns:

The target object corresponding to the given definition_tuple

Return type:

Target

Raises:

microprobe.exceptions.MicroprobeTargetDefinitionError – if something is wrong during the import