microprobe.code.wrapper.Wrapper
- class Wrapper[source]
Bases:
ABCAbstract class to represent a language wrapper.
Methods
__init__()Initialization abstract method.
context()declare_global_var(var)end_loop(instr)end_main()footer()get_direct_init(key, defaultvalue)Get the value for key
headers()infinite()Returns a
boolindicating if the loop is infinite.init_global_var(var, value)outputname(name)post_var()register_direct_init(dummy_key, dummy_value)Initialize key with the value value
reserved_registers(registers, target)set_benchmark(bench)set_target(target)start_loop(instr, instr_reset[, aligned])wrap_ins(instr)Attributes
Boolean indicating if the wrapper supports direct initialization.
- init_global_var(var: Variable, value: int | str | Callable[[], int | str]) str[source]
- Parameters:
var
value
- start_loop(instr: Instruction, instr_reset: Instruction, aligned: bool = True) str[source]
- Parameters:
instr
instr_reset
aligned – (Default value = True)
- wrap_ins(instr: Instruction) str[source]
- Parameters:
instr
- end_loop(instr: Instruction) str[source]
- Parameters:
instr
- reserved_registers(registers: List[Register], target: Target) List[Register][source]
- Parameters:
registers
target
- property benchmark
- property reset
- property target
- property direct_initialization_support
Boolean indicating if the wrapper supports direct initialization.
Direct initialization refers to the capability of initializing values without requiring the execution of instructions. For instance, simulation-based format usually allow the specification of the initial values of the memory and the registers.