microprobe.target.Target¶
-
class
Target(isa, env=None, uarch=None)[source]¶ Bases:
microprobe.utils.misc.PickableClass 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
descriptionDescription of the Target ( str).environmentEnvironment of the Target ( Environment).isaArchitecture of the Target ( ISA).microarchictectureMicroarchitecture of the Target ( Microarchitecture).nameName of the Target ( str).reserved_registersReserved registers of the Target ( listofRegister).wrapperWrapper 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
InstructionTypethat have that property value.Parameters: prop_name ( str) – Property nameReturns: Dictionary mapping value properties to instruction types Return type: dictmapping property values tolistofInstructionTypeRaises: 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
-