microprobe.target.Target¶
-
class
Target
(isa, env=None, uarch=None)[source]¶ Bases:
microprobe.utils.misc.Pickable
Class to represent a code generation target.
A target is defined by the architecture, the microarchitecture implementation and the generation environment. The Target object provides a common interface to all the architecture/microarchitecture/environment specific methods using a facade software design pattern. Therefore, all the references to target related properties should go through this object interface in order to minimize the coupling with the other modules (code generation, design space exploration, …).
-
__init__
(isa, env=None, uarch=None)[source]¶ Create a Target object.
Parameters: - isa (
ISA
) – Architecture (i.e. Instruction Set Architecture) - env (
Environment
) – Environment (default: None) - uarch (
Microarchitecture
) – Microarchitecture (default: None)
Returns: Target instance
Return type: - isa (
Methods
__init__
(isa[, env, uarch])Create a Target object. full_report
()Return a long description of the Target. property_isa_map
(prop_name)Generate property to isa map. set_env
(env)Set the environment of the Target. set_isa
(isa)Set the ISA of the Target. set_uarch
(uarch)Set the microarchitecture of the Target. set_wrapper
(wrapper)Set the wrapper of the Target. Attributes
description
Description of the Target ( str
).environment
Environment of the Target ( Environment
).isa
Architecture of the Target ( ISA
).microarchictecture
Microarchitecture of the Target ( Microarchitecture
).name
Name of the Target ( str
).reserved_registers
Reserved registers of the Target ( list
ofRegister
).wrapper
Wrapper of the Target ( Wrapper
).
-
environment
¶ Environment of the Target (
Environment
).
-
microarchictecture
¶ Microarchitecture of the Target (
Microarchitecture
).
-
property_isa_map
(prop_name)[source]¶ Generate property to isa map.
Return a dictionary mapping values of the property prop_name to the list of
InstructionType
that have that property value.Parameters: prop_name ( str
) – Property nameReturns: Dictionary mapping value properties to instruction types Return type: dict
mapping property values tolist
ofInstructionType
Raises: microprobe.exceptions.MicroprobeTargetDefinitionError – if the property is not found
-
set_env
(env)[source]¶ Set the environment of the Target.
Parameters: env ( Environment
) – Execution environment definition
-
set_uarch
(uarch)[source]¶ Set the microarchitecture of the Target.
Parameters: uarch ( Microarchitecture
) – Microarchitecture
-