step_cycle_ratio
interface is implemented by
processors that support a changeable ratio between steps and
cycles. The set-step-rate command uses this interface to
set the ratio between steps and cycles.
The set_ratio sets the ratio between steps and cycles. Note that the introduction of stall cycles can skew the ratio. The get_ratio simply returns the current ratio.
The cycles and step arguments must be in the range [1..128] and cycles must be a power of two. Implementers of this interface may choose to ignore other values of cycles and step and may log an error.
typedef struct { uint32 steps; uint32 cycles; } step_cycle_ratio_t; SIM_INTERFACE(step_cycle_ratio) { step_cycle_ratio_t (*get_ratio)(conf_object_t *obj); void (*set_ratio)(conf_object_t *obj, uint32 steps, uint32 cycles); }; #define STEP_CYCLE_RATIO_INTERFACE "step_cycle_ratio"