axi_ready_gen

AXI Ready generation object. Ready signals of write command channel, write data channel, write response channel , read command channel and read data channel are generated independently from other attributes. This class is being used to generate all kinds of different patterns of ready signal which user wants. Please refer section READY Generation of PG267 for more details about how to generate ready.

Functions
new

function new( |
input | string | name | = | "unnamed_axi_ready_gen"
| );

Constructor to create a new AXI ready generation

reset_to_defaults
virtual function void reset_to_defaults();

Reset all variables in ready generation to default value. please refer xil_axi_ready_gen_policy_t , xil_axi_ready_rand_policy_t for more details about ready generation policy.

    this.max_low_time = 5;
    this.min_low_time = 0;

    this.max_high_time = 5;
    this.min_high_time = 0;

    this.max_event_count = 1;
    this.min_event_count = 1;

    this.event_cycle_count_reset = 2000;
    this.ready_policy = XIL_AXI_READY_GEN_SINGLE;
    this.ready_rand_policy = XIL_AXI_READY_RAND_SINGLE;
    this.event_count = 1;
    this.high_time = 5;
    this.low_time = 2;
    this.rand_event_count = 1;
    this.rand_high_time = 5;
    this.rand_low_time = 1;
    this.use_variable_ranges = XIL_AXI_FALSE;

copy

function void copy( |
axi_ready_gen | rhs
| );

Copies the contents of the input ready generation to the current ready generation

my_clone
virtual function axi_ready_gen my_clone ();

Clones the current ready generation and returns a handle to the new generation

convert2string
virtual function string convert2string();

Returns a format of string of Ready information for axi_ready_gen

    Policy
    Random Policy
    Use Variable Ranges
    Max Low Time
    Min Low Time
    Max High Time
    Min High Time
    Max Event Count
    Min Event Count
    Event Cycle Count Reset
    Low Time
    High Time
    Event Count

set_use_variable_ranges
virtual function void set_use_variable_ranges();

Sets use_variable_ranges to be TRUE. This is to set that get_low_time, get_high_time, get_event_count are randomly generated between the range of minimum and maximum value

clr_use_variable_ranges
virtual function void clr_use_variable_ranges();

Sets use_variable_ranges to be FALSE.This is to set that get_low_time, get_high_time, get_event_count are returned with current low_time, high_time, event_count if ready_policy is not RANDOM

get_use_variable_ranges
virtual function xil_axi_boolean_t get_use_variable_ranges();

Returns the current state of the variable range use feature.

set_ready_policy

virtual function void set_ready_policy( |
input | xil_axi_ready_gen_policy_t | value
| );

Sets the policy of axi_ready_gen. refer xil_axi_ready_gen_policy_t for policy. if policy is XIL_AXI_READY_GEN_NO_BACKPRESSURE, Then it returns

    set_low_time(0)
    set_low_time_range(0,0);
    set_high_time(1);
    set_high_time_range(1,1)
    clr_use_variable_ranges()

get_ready_policy
virtual function xil_axi_ready_gen_policy_t get_ready_policy();

Returns the current ready generation policy of axi_ready_gen. refer xil_axi_ready_gen_policy_t for policy information

set_event_cycle_count_reset

virtual function void set_event_cycle_count_reset( |
input | xil_axi_uint | value
| );

Sets event_cycle_count_reset value of ready generation

get_event_cycle_count_reset
virtual function xil_axi_uint get_event_cycle_count_reset();

Returns the current event_cycle_count_reset of axi_ready_gen. In ready generation,event_cycle_count_reset is used to reset event_counter(count number of ready/valid handshake) to zero.

get_low_time_range

virtual function void get_low_time_range( |
output | xil_axi_uint | min,
output | xil_axi_uint | max
| );

Returns min_low_time and max_low_time of the ready generation. low_time is how many cycles ready stay low.

set_low_time_range

virtual function void set_low_time_range( |
input | xil_axi_uint | min,
input | xil_axi_uint | max
| );

Sets min_low_time and max_low_time of the ready generation

get_low_time
virtual function xil_axi_uint get_low_time();

Returns low time of the current ready generation. if ready policy is XIL_AXI_READY_GEN_NO_BACKPRESSURE, low time is 0, else if ready policy is XIL_AXI_READY_GEN_RANDOM or get_use_variable_ranges is TRUE, low is the randomly generated low time. else low time is low_time of current ready generation. low_time is how many cycles ready stay low.

set_low_time

virtual function void set_low_time( |
input | xil_axi_uint | updated
| );

Sets the low time of the ready generation

get_high_time_range

virtual function void get_high_time_range( |
output | xil_axi_uint | min,
output | xil_axi_uint | max
| );

Returns min_high_time and max_high_time of the ready generation. high_time is how many cycles ready stay high.

set_high_time_range

virtual function void set_high_time_range( |
input | xil_axi_uint | min,
input | xil_axi_uint | max
| );

Sets min_high_time and max_high_time of the ready generation. high_time is how many cycles ready stay high.

get_high_time
virtual function xil_axi_uint get_high_time();

Returns high time of axi_ready_gen. If ready policy is XIL_AXI_READY_GEN_NO_BACKPRESSURE, returns 1, else if ready policy is XIL_AXI_READY_GEN_RANDOM or get_use_variable_ranges is TRUE, high time is the randomly generated high time. else high time is high_time of current ready generation.High_time is how many cycles ready stay high.

set_high_time

virtual function void set_high_time( |
input | xil_axi_uint | updated
| );

Sets the high time of the ready generation

get_event_count_range

virtual function void get_event_count_range( |
output | xil_axi_uint | min,
output | xil_axi_uint | max
| );

Returns min_event_count and max_event_count of the ready generation. event count is used when policy is XIL_AXI_READY_RAND_AFTER_VALID_EVENTS. refer xil_axi_ready_gen_policy_t about how event_count works

set_event_count_range

virtual function void set_event_count_range( |
input | xil_axi_uint | min,
input | xil_axi_uint | max
| );

Sets min_event_count and max_event_count of the ready generation. event count is used when policy is XIL_AXI_READY_RAND_AFTER_VALID_EVENTS. refer xil_axi_ready_gen_policy_t about how event_count works.

get_event_count
virtual function xil_axi_uint get_event_count();

Returns event_count of axi_ready_gen. event count is used when policy is XIL_AXI_READY_RAND_AFTER_VALID_EVENTS. refer xil_axi_ready_gen_policy_t about how event_count works.

set_event_count

virtual function void set_event_count( |
input | xil_axi_uint | in
| );

Sets the number of events that ready stays at high. event count is used when policy is XIL_AXI_READY_RAND_AFTER_VALID_EVENTS. refer xil_axi_ready_gen_policy_t about how event_count works.

get_ready_rand_policy
virtual function xil_axi_ready_rand_policy_t get_ready_rand_policy();

Returns ready_rand_policy of the ready generation. refer xil_axi_ready_rand_policy_t for more information.