microprobe.code.wrapper.Wrapper

class Wrapper[source]

Bases: object

Abstract class to represent a language wrapper.

abstract __init__()[source]

Initialization abstract method.

Methods

__init__()

Initialization abstract method.

context()

declare_global_var(var)

param var:

end_loop(instr)

param instr:

end_main()

footer()

get_direct_init(key, defaultvalue)

Get the value for key

headers()

infinite()

Returns a bool indicating if the loop is infinite.

init_global_var(var, value)

param var:

init_loop_pad()

init_main_pad()

outputname(name)

param name:

post_var()

register_direct_init(dummy_key, dummy_value)

Initialize key with the value value

required_global_vars()

reserved_registers(registers, target)

param registers:

set_benchmark(bench)

param bench:

set_target(target)

param target:

start_loop(instr, instr_reset[, aligned])

param instr:

start_main()

wrap_ins(instr)

param instr:

Attributes

benchmark

direct_initialization_support

Boolean indicating if the wrapper supports direct initialization.

reset

target




abstract outputname(name)[source]
Parameters:

name

abstract headers()[source]
abstract declare_global_var(var)[source]
Parameters:

var

abstract init_global_var(var, value)[source]
Parameters:
  • var

  • value

abstract required_global_vars()[source]
abstract start_main()[source]
abstract post_var()[source]
abstract start_loop(instr, instr_reset, aligned=True)[source]
Parameters:
  • instr

  • instr_reset

  • aligned – (Default value = True)

abstract wrap_ins(instr)[source]
Parameters:

instr

abstract end_loop(instr)[source]
Parameters:

instr

abstract end_main()[source]
abstract footer()[source]
abstract infinite()[source]

Returns a bool indicating if the loop is infinite.

abstract reserved_registers(registers, target)[source]
Parameters:
  • registers

  • target

set_benchmark(bench)[source]
Parameters:

bench

property benchmark
property reset
set_target(target)[source]
Parameters:

target

property target
context()[source]
init_loop_pad()[source]
init_main_pad()[source]
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.

register_direct_init(dummy_key, dummy_value)[source]

Initialize key with the value value

get_direct_init(key, defaultvalue)[source]

Get the value for key