axi_ready_gen

AXI Ready generation class.

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_gen, ~name~ is the name of the instance.

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.

max_low_time = 5;
min_low_time = 0;

max_high_time = 5;
min_high_time = 0;

max_event_count = 1;
min_event_count = 1;

event_cycle_count_reset = 2000;
ready_policy = XIL_AXI_READY_GEN_SINGLE;
ready_rand_policy = XIL_AXI_READY_RAND_SINGLE;
event_count = 1;
high_time = 5;
low_time = 2;
rand_event_count = 1;
rand_high_time = 5;
rand_low_time = 1;
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 ();

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

convert2string
virtual function string convert2string();

Returns a format of string with below Ready information.

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 value of use_variable_ranges.

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 axi_ready_gen.

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 axi_ready_gen. 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 <axi_ready_gen>.low_time is how many cycles ready stay low.

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 axi_ready_gen. low_time is how many cycles ready stay low.

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 axi_ready_gen. 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 axi_ready_gen. 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 axi_ready_gen. High_time is how many cycles ready stay high.

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 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_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 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.

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 axi_ready_gen. refer xil_axi_ready_rand_policy_t for more information.