AXI muckbucket
Public Member Functions | List of all members
axi_if_abstract Class Reference

abstract base class for polymorphic interface class (axi_if_concrete) for AXI UVM environment More...

Inheritance diagram for axi_if_abstract:
Inheritance graph
[legend]
Collaboration diagram for axi_if_abstract:
Collaboration graph
[legend]

Public Member Functions

 uvm_object_utils (axi_if_abstract) new(string name
 
virtual int get_data_bus_width ()
 returns data bus width More...
 
virtual task wait_for_clks (int cnt=1)
 used for waiting More...
 
virtual task wait_for_not_in_reset ()
 Wait for reset to deassert. More...
 
virtual task wait_for_awready_awvalid ()
 Wait for both awready awvalid to assert. More...
 
virtual task wait_for_awvalid ()
 Wait for awvalid to assert. More...
 
virtual task wait_for_wready ()
 Wait for awready to assert. More...
 
virtual task wait_for_bvalid ()
 Wait for bvalid to assert. More...
 
virtual task wait_for_write_address (output axi_seq_item_aw_vector_s s)
 Wait for a valid write address to be acknowledged and return it. More...
 
virtual task wait_for_write_data (output axi_seq_item_w_vector_s s)
 Wait for a valid write data to be acknowledged and return it. More...
 
virtual task wait_for_write_response (output axi_seq_item_b_vector_s s)
 Wait for a valid write response to be acknowledged and return it. More...
 
virtual task wait_for_read_address (output axi_seq_item_ar_vector_s s)
 Wait for a valid read address to be acknowledged and return it. More...
 
virtual task wait_for_read_data (output axi_seq_item_r_vector_s s)
 Wait for a valid read data to be acknowledged and return it. More...
 
virtual bit get_awready_awvalid ()
 Get the value of awready and awvalid. More...
 
virtual bit get_awready ()
 Get the value of awready. More...
 
virtual bit get_wready_wvalid ()
 Get the value of wready and wvalid. More...
 
virtual bit get_wvalid ()
 Get the value of wvalid. More...
 
virtual bit get_wready ()
 Get the value of wready. More...
 
virtual bit get_bready_bvalid ()
 Get the value of bready and bvalid. More...
 
virtual bit get_bvalid ()
 Get the value of bvalid. More...
 
virtual bit get_bready ()
 Get the value of bready. More...
 
virtual bit get_arready_arvalid ()
 Get the value of arready and arvalid. More...
 
virtual bit get_arready ()
 Get the value of arready. More...
 
virtual bit get_rready_rvalid ()
 Get the value of rready and rvalid. More...
 
virtual bit get_rvalid ()
 Get the value of rvalid. More...
 
virtual bit get_rready ()
 Get the value of rready. More...
 
virtual task set_awvalid (bit state)
 Set the value of awvalid. More...
 
virtual task set_awready (bit state)
 Set the value of awready. More...
 
virtual task set_wvalid (bit state)
 Set the value of wvalid. More...
 
virtual task set_wready (bit state)
 Set the value of wready. More...
 
virtual task set_bvalid (bit state)
 Set the value of bvalid. More...
 
virtual task set_bready (bit state)
 Set the value of bready. More...
 
virtual task set_arvalid (bit state)
 Set the value of arvalid. More...
 
virtual task set_rvalid (bit state)
 Set the value of rvalid. More...
 
virtual task set_rready (bit state)
 Set the value of rready. More...
 
virtual void enable_awready_toggle_pattern (bit< 31:0 > pattern)
 Set the value of awready toggle pattern and enable toggling. More...
 
virtual void disable_awready_toggle_pattern ()
 Disable awready toggling. More...
 
virtual void enable_wready_toggle_pattern (bit< 31:0 > pattern)
 Set the value of wready toggle pattern and enable toggling. More...
 
virtual void disable_wready_toggle_pattern ()
 Disable wready toggling. More...
 
virtual void enable_bready_toggle_pattern (bit< 31:0 > pattern)
 Set the value of bready toggle pattern and enable toggling. More...
 
virtual void disable_bready_toggle_pattern ()
 Disable bready toggling. More...
 
virtual void enable_arready_toggle_pattern (bit< 31:0 > pattern)
 Set the value of arready toggle pattern and enable toggling. More...
 
virtual void disable_arready_toggle_pattern ()
 Disable arready toggling. More...
 
virtual void enable_rready_toggle_pattern (bit< 31:0 > pattern)
 Set the value of rready toggle pattern and enable toggling. More...
 
virtual void disable_rready_toggle_pattern ()
 Disable rready toggling. More...
 
virtual void write_aw (axi_seq_item_aw_vector_s s, bit valid=0b1)
 Drive all the signals on the write address channel with the specified values. More...
 
virtual void write_w (axi_seq_item_w_vector_s s)
 Drive all the signals on the write data channel with the specified values. More...
 
virtual void write_b (axi_seq_item_b_vector_s s, bit valid=0b1)
 Drive all the signals on the write response channel with the specified values. More...
 
virtual void read_aw (output axi_seq_item_aw_vector_s s)
 Get the values on the write address channel. More...
 
virtual void read_w (output axi_seq_item_w_vector_s s)
 Get the values on the write data channel. More...
 
virtual void read_b (output axi_seq_item_b_vector_s s)
 Get the values on the write response channel. More...
 
virtual void write_ar (axi_seq_item_ar_vector_s s, bit valid=0b1)
 Drive all the signals on the read address channel with the specified values. More...
 
virtual void write_r (axi_seq_item_r_vector_s s)
 Drive all the signals on the read data channel with the specified values. More...
 
virtual void read_ar (output axi_seq_item_ar_vector_s s)
 Get the values on the read address channel. More...
 
virtual void read_r (output axi_seq_item_r_vector_s s)
 Get the values on the read data channel. More...
 

Detailed Description

abstract base class for polymorphic interface class (axi_if_concrete) for AXI UVM environment

This class is extended by a class called axi_if_concrete that is nested inside axi_if. The class methods have access to the interface's internals so can drive signals, read signals, etc. The class also registers with the uvm_config_db and does a set_type_override so we get the concrete class instead of the abstract class. This lets us use a class and not have to parameterize an interface and all the UVC stuff that talks to it. All the functions and tasks are for the testbench to talk to the DUT as efficiently as possible but in an understandable way.

See also
axi_if.sv

Definition at line 37 of file axi_if_abstract.svh.

Member Function Documentation

void axi_if_abstract::disable_arready_toggle_pattern ( )
virtual

Disable arready toggling.

Todo:
: what happens when disabled..

Definition at line 504 of file axi_if_abstract.svh.

void axi_if_abstract::disable_awready_toggle_pattern ( )
virtual

Disable awready toggling.

Todo:
: what happens when disabled..

Definition at line 450 of file axi_if_abstract.svh.

void axi_if_abstract::disable_bready_toggle_pattern ( )
virtual

Disable bready toggling.

Todo:
: what happens when disabled..

Definition at line 486 of file axi_if_abstract.svh.

void axi_if_abstract::disable_rready_toggle_pattern ( )
virtual

Disable rready toggling.

Todo:
: what happens when disabled..

Definition at line 522 of file axi_if_abstract.svh.

void axi_if_abstract::disable_wready_toggle_pattern ( )
virtual

Disable wready toggling.

Todo:
: what happens when disabled..

Definition at line 468 of file axi_if_abstract.svh.

void axi_if_abstract::enable_arready_toggle_pattern ( bit< 31:0 >  pattern)
virtual

Set the value of arready toggle pattern and enable toggling.

arready can be toggled pseudo randonly with a repeating 32-bit pattern

Parameters
pattern- barrel register value to use to toggle arready

Definition at line 495 of file axi_if_abstract.svh.

void axi_if_abstract::enable_awready_toggle_pattern ( bit< 31:0 >  pattern)
virtual

Set the value of awready toggle pattern and enable toggling.

awready can be toggled pseudo randonly with a repeating 32-bit pattern

Parameters
pattern- barrel register value to use to toggle awready

Definition at line 441 of file axi_if_abstract.svh.

void axi_if_abstract::enable_bready_toggle_pattern ( bit< 31:0 >  pattern)
virtual

Set the value of bready toggle pattern and enable toggling.

bready can be toggled pseudo randonly with a repeating 32-bit pattern

Parameters
pattern- barrel register value to use to toggle bready

Definition at line 477 of file axi_if_abstract.svh.

void axi_if_abstract::enable_rready_toggle_pattern ( bit< 31:0 >  pattern)
virtual

Set the value of rready toggle pattern and enable toggling.

rready can be toggled pseudo randonly with a repeating 32-bit pattern

Parameters
pattern- barrel register value to use to toggle rready

Definition at line 513 of file axi_if_abstract.svh.

void axi_if_abstract::enable_wready_toggle_pattern ( bit< 31:0 >  pattern)
virtual

Set the value of wready toggle pattern and enable toggling.

wready can be toggled pseudo randonly with a repeating 32-bit pattern

Parameters
pattern- barrel register value to use to toggle wready

Definition at line 459 of file axi_if_abstract.svh.

bit axi_if_abstract::get_arready ( )
virtual

Get the value of arready.

(Is the slave currently ready for a read address?)

Returns
value of arready

Definition at line 318 of file axi_if_abstract.svh.

bit axi_if_abstract::get_arready_arvalid ( )
virtual

Get the value of arready and arvalid.

(Is the read address channel currently being acknowledged by the slave?) One function instead of two seperate to save a call from testbench land to RTL land (this only really matters in emulator and even then not that much.)

Returns
true if both arvalid and arready are asserted else false

Definition at line 308 of file axi_if_abstract.svh.

bit axi_if_abstract::get_awready ( )
virtual

Get the value of awready.

(Is the slave currently ready for a write address?)

Returns
value of awready

Definition at line 232 of file axi_if_abstract.svh.

bit axi_if_abstract::get_awready_awvalid ( )
virtual

Get the value of awready and awvalid.

(Is the write address channel currently being acknowledged by the slave?) One function instead of two seperate to save a call from testbench land to RTL land (this only really matters in emulator and even then not that much.)

Returns
true if both awvalid and awready are asserted else false

Definition at line 221 of file axi_if_abstract.svh.

bit axi_if_abstract::get_bready ( )
virtual

Get the value of bready.

(Is the master currently ready for a write response?)

Returns
value of bready

Definition at line 296 of file axi_if_abstract.svh.

bit axi_if_abstract::get_bready_bvalid ( )
virtual

Get the value of bready and bvalid.

(Is the write response channel currently being acknowledged by the slave?) One function instead of two seperate to save a call from testbench land to RTL land (this only really matters in emulator and even then not that much.)

Returns
true if both bvalid and bready are asserted else false

Definition at line 276 of file axi_if_abstract.svh.

bit axi_if_abstract::get_bvalid ( )
virtual

Get the value of bvalid.

(Is the write response currently valid?)

Returns
value of bvalid

Definition at line 286 of file axi_if_abstract.svh.

int axi_if_abstract::get_data_bus_width ( )
virtual

returns data bus width

This function allows the driver to retrieve the data bus width from the interface.

Definition at line 117 of file axi_if_abstract.svh.

Referenced by axi_monitor::read_address(), and axi_monitor::write_data().

Here is the caller graph for this function:

bit axi_if_abstract::get_rready ( )
virtual

Get the value of rready.

(Is the master currently ready for a read data?)

Returns
value of rready

Definition at line 350 of file axi_if_abstract.svh.

bit axi_if_abstract::get_rready_rvalid ( )
virtual

Get the value of rready and rvalid.

(Is the read data channel currently being acknowledged by the slave?) One function instead of two seperate to save a call from testbench land to RTL land (this only really matters in emulator and even then not that much.)

Returns
true if both rvalid and rready are asserted else false

Definition at line 330 of file axi_if_abstract.svh.

bit axi_if_abstract::get_rvalid ( )
virtual

Get the value of rvalid.

(Is the read data currently valid?)

Returns
value of awready

Definition at line 340 of file axi_if_abstract.svh.

bit axi_if_abstract::get_wready ( )
virtual

Get the value of wready.

(Is the slave currently ready for a write data?)

Returns
value of wready

Definition at line 264 of file axi_if_abstract.svh.

bit axi_if_abstract::get_wready_wvalid ( )
virtual

Get the value of wready and wvalid.

(Is the write data channel currently being acknowledged by the slave?) One function instead of two seperate to save a call from testbench land to RTL land (this only really matters in emulator and even then not that much.)

Returns
true if both wvalid and wready are asserted else false

Definition at line 244 of file axi_if_abstract.svh.

bit axi_if_abstract::get_wvalid ( )
virtual

Get the value of wvalid.

(Is the write data currently valid?)

Returns
value of awready

Definition at line 254 of file axi_if_abstract.svh.

void axi_if_abstract::read_ar ( output axi_seq_item_ar_vector_s  s)
virtual

Get the values on the read address channel.

s is a packed struct to ease usage in an emulator environment (like Veloce).

Returns
packed struct of read address channel signal values.

Definition at line 598 of file axi_if_abstract.svh.

void axi_if_abstract::read_aw ( output axi_seq_item_aw_vector_s  s)
virtual

Get the values on the write address channel.

s is a packed struct to ease usage in an emulator environment (like Veloce).

Returns
packed struct of write address channel signal values.

Definition at line 561 of file axi_if_abstract.svh.

void axi_if_abstract::read_b ( output axi_seq_item_b_vector_s  s)
virtual

Get the values on the write response channel.

s is a packed struct to ease usage in an emulator environment (like Veloce).

Returns
packed struct of write response channel signal values.

Definition at line 579 of file axi_if_abstract.svh.

void axi_if_abstract::read_r ( output axi_seq_item_r_vector_s  s)
virtual

Get the values on the read data channel.

s is a packed struct to ease usage in an emulator environment (like Veloce).

Returns
packed struct of read data channel signal values.

Definition at line 616 of file axi_if_abstract.svh.

void axi_if_abstract::read_w ( output axi_seq_item_w_vector_s  s)
virtual

Get the values on the write data channel.

s is a packed struct to ease usage in an emulator environment (like Veloce).

Returns
packed struct of write data channel signal values.

Definition at line 570 of file axi_if_abstract.svh.

task axi_if_abstract::set_arvalid ( bit  state)
virtual

Set the value of arvalid.

(true=read address is valid; false=read address is not valid)

Parameters
state- value to drive arvalid

Definition at line 414 of file axi_if_abstract.svh.

task axi_if_abstract::set_awready ( bit  state)
virtual

Set the value of awready.

(true=slave is ready for write address; false=slave is not ready.)

Parameters
state- value to drive awready

Definition at line 369 of file axi_if_abstract.svh.

task axi_if_abstract::set_awvalid ( bit  state)
virtual

Set the value of awvalid.

(true=write address is valid; false=write address is not valid)

Parameters
state- value to drive awvalid

Definition at line 360 of file axi_if_abstract.svh.

task axi_if_abstract::set_bready ( bit  state)
virtual

Set the value of bready.

(true=master is ready for write response; false=master is not ready.)

Parameters
state- value to drive bready

Definition at line 405 of file axi_if_abstract.svh.

task axi_if_abstract::set_bvalid ( bit  state)
virtual

Set the value of bvalid.

(true=write response is valid; false=write response is not valid)

Parameters
state- value to drive bvalid

Definition at line 396 of file axi_if_abstract.svh.

task axi_if_abstract::set_rready ( bit  state)
virtual

Set the value of rready.

(true=master is ready for read data; false=master is not ready.)

Parameters
state- value to drive rready

Definition at line 432 of file axi_if_abstract.svh.

task axi_if_abstract::set_rvalid ( bit  state)
virtual

Set the value of rvalid.

(true=read data is valid; false=read data is not valid)

Parameters
state- value to drive rvalid

Definition at line 423 of file axi_if_abstract.svh.

task axi_if_abstract::set_wready ( bit  state)
virtual

Set the value of wready.

(true=slave is ready for write data; false=slave is not ready.)

Parameters
state- value to drive wready

Definition at line 387 of file axi_if_abstract.svh.

task axi_if_abstract::set_wvalid ( bit  state)
virtual

Set the value of wvalid.

(true=write data is valid; false=write data is not valid)

Parameters
state- value to drive wvalid

Definition at line 378 of file axi_if_abstract.svh.

axi_if_abstract::uvm_object_utils ( axi_if_abstract  )
new
task axi_if_abstract::wait_for_awready_awvalid ( )
virtual

Wait for both awready awvalid to assert.

Used to know when the write address has been received and acknowledged by slave

Definition at line 141 of file axi_if_abstract.svh.

task axi_if_abstract::wait_for_awvalid ( )
virtual

Wait for awvalid to assert.

Used to wait for when a valid write address is on the channel.

Definition at line 149 of file axi_if_abstract.svh.

task axi_if_abstract::wait_for_bvalid ( )
virtual

Wait for bvalid to assert.

Used to wait for when a valid write response is on the channel.

Definition at line 165 of file axi_if_abstract.svh.

task axi_if_abstract::wait_for_clks ( int  cnt = 1)
virtual

used for waiting

The testbench side is entirely event driven (or is meant to be). This function is called to wait for time

Definition at line 127 of file axi_if_abstract.svh.

task axi_if_abstract::wait_for_not_in_reset ( )
virtual

Wait for reset to deassert.

Definition at line 133 of file axi_if_abstract.svh.

task axi_if_abstract::wait_for_read_address ( output axi_seq_item_ar_vector_s  s)
virtual

Wait for a valid read address to be acknowledged and return it.

Used to wait for, and return, a valid read address.

Returns
values on the read address channel.

Definition at line 201 of file axi_if_abstract.svh.

Referenced by axi_monitor::read_address().

Here is the caller graph for this function:

task axi_if_abstract::wait_for_read_data ( output axi_seq_item_r_vector_s  s)
virtual

Wait for a valid read data to be acknowledged and return it.

Used to wait for, and return, a valid read data.

Returns
values on the read data channel.

Definition at line 210 of file axi_if_abstract.svh.

Referenced by axi_monitor::read_data().

Here is the caller graph for this function:

task axi_if_abstract::wait_for_wready ( )
virtual

Wait for awready to assert.

Used to wait for when the slave is ready for write data

Definition at line 157 of file axi_if_abstract.svh.

task axi_if_abstract::wait_for_write_address ( output axi_seq_item_aw_vector_s  s)
virtual

Wait for a valid write address to be acknowledged and return it.

Used to wait for, and return, a valid write address.

Returns
values on the write address channel.

Definition at line 174 of file axi_if_abstract.svh.

Referenced by axi_monitor::write_address().

Here is the caller graph for this function:

task axi_if_abstract::wait_for_write_data ( output axi_seq_item_w_vector_s  s)
virtual

Wait for a valid write data to be acknowledged and return it.

Used to wait for, and return, a valid write data beat.

Returns
values on the write data channel.

Definition at line 183 of file axi_if_abstract.svh.

Referenced by axi_monitor::write_data().

Here is the caller graph for this function:

task axi_if_abstract::wait_for_write_response ( output axi_seq_item_b_vector_s  s)
virtual

Wait for a valid write response to be acknowledged and return it.

Used to wait for, and return, a valid write response.

Returns
values on the write response channel.

Definition at line 192 of file axi_if_abstract.svh.

Referenced by axi_monitor::write_response().

Here is the caller graph for this function:

void axi_if_abstract::write_ar ( axi_seq_item_ar_vector_s  s,
bit  valid = 0b1 
)
virtual

Drive all the signals on the read address channel with the specified values.

s is a packed struct to ease usage in an emulator environment(like Veloce)

Parameters
s- packed struct containing all read address channel signal values (except arvalid)
valid- value to drive on arvalid

Definition at line 589 of file axi_if_abstract.svh.

void axi_if_abstract::write_aw ( axi_seq_item_aw_vector_s  s,
bit  valid = 0b1 
)
virtual

Drive all the signals on the write address channel with the specified values.

s is a packed struct to ease usage in an emulator environment(like Veloce)

Parameters
s- packed struct containing all write address channel signal values (except awvalid)
valid- value to drive on awvalid

Definition at line 532 of file axi_if_abstract.svh.

void axi_if_abstract::write_b ( axi_seq_item_b_vector_s  s,
bit  valid = 0b1 
)
virtual

Drive all the signals on the write response channel with the specified values.

s is a packed struct to ease usage in an emulator environment(like Veloce)

Parameters
s- packed struct containing all write response channel signal values (except bvalid)
valid- value to drive on bvalid

Definition at line 552 of file axi_if_abstract.svh.

void axi_if_abstract::write_r ( axi_seq_item_r_vector_s  s)
virtual

Drive all the signals on the read data channel with the specified values.

s is a packed struct to ease usage in an emulator environment(like Veloce)

Parameters
s- packed struct containing all read data channel signal values

Definition at line 607 of file axi_if_abstract.svh.

void axi_if_abstract::write_w ( axi_seq_item_w_vector_s  s)
virtual

Drive all the signals on the write data channel with the specified values.

s is a packed struct to ease usage in an emulator environment(like Veloce)

Parameters
s- packed struct containing all write data channel signal values
Todo:
: is this parameter still used anywhere?

Definition at line 542 of file axi_if_abstract.svh.


The documentation for this class was generated from the following file: