The uvm_visitor class provides an abstract base class for a visitor. The visitor visits instances of type NODE. For general information regarding the visitor pattern see http://en.wikipedia.org/wiki/Visitor_pattern
| uvm_visitor #(NODE) | The uvm_visitor class provides an abstract base class for a visitor. |
| uvm_structure_proxy #(STRUCTURE) | The uvm_structure_proxy is a wrapper and provides a set of elements of the STRUCTURE to the caller on demand. |
| uvm_visitor_adapter #(STRUCTURE,uvm_visitor#(STRUCTURE)) | The visitor adaptor traverses all nodes of the STRUCTURE and will invoke visitor.visit() on every node. |
| uvm_top_down_visitor_adapter | This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. |
| uvm_bottom_up_visitor_adapter | This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. |
| uvm_by_level_visitor_adapter | This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. |
| uvm_component_proxy | The class is providing the proxy to extract the direct subcomponents of s |
| uvm_component_name_check_visitor | This specialized visitor analyze the naming of the current component. |
virtual function void begin_v()
This method will be invoked by the visitor before the first NODE is visited
virtual function void end_v()
This method will be invoked by the visitor after the last NODE is visited
pure virtual function void visit( NODE node )
This method will be invoked by the visitor for every visited node of the provided structure. The user is expected to provide the own functionality in this function.
class count_nodes_visitor#(type T=uvm_component) extends uvm_visitor#(T);
function new (string name = "");
super.new(name);
endfunction
local int cnt;
virtual function void begin_v(); cnt = 0; endfunction
virtual function void end_v(); `uvm_info("TEXT",$sformatf("%d elements",cnt),UVM_NONE) endfunction
virtual function void visit(T node); cnt++; endfunction
endclassThe uvm_structure_proxy is a wrapper and provides a set of elements of the STRUCTURE to the caller on demand. This is to decouple the retrieval of the STRUCTUREs subelements from the actual function being invoked on STRUCTURE
| uvm_structure_proxy #(STRUCTURE) | |
| The uvm_structure_proxy is a wrapper and provides a set of elements of the STRUCTURE to the caller on demand. | |
| Methods | |
| get_immediate_children | This method will be return in children a set of the direct subelements of s |
pure virtual function void get_immediate_children( STRUCTURE s, ref STRUCTURE children[$] )
This method will be return in children a set of the direct subelements of s
The visitor adaptor traverses all nodes of the STRUCTURE and will invoke visitor.visit() on every node.
| uvm_visitor_adapter #(STRUCTURE,uvm_visitor#(STRUCTURE)) | |
| The visitor adaptor traverses all nodes of the STRUCTURE and will invoke visitor.visit() on every node. | |
| Methods | |
| accept() | Calling this function will traverse through s (and every subnode of s). |
pure virtual function void accept( STRUCTURE s, VISITOR v, uvm_structure_proxy#(STRUCTURE) p, bit invoke_begin_end = 1 )
Calling this function will traverse through s (and every subnode of s). For each node found v.visit(node) will be invoked. The children of s are recursively determined by invoking p.get_immediate_children().~invoke_begin_end~ determines whether the visitors begin/end functions should be invoked prior to traversal.
This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. During traversal s will be visited before all subnodes of s will be visited.
| uvm_top_down_visitor_adapter | ||||||||||||||||||||||
| This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
| ||||||||||||||||||||||
This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. During traversal all children of node s will be visited s will be visited.
| uvm_bottom_up_visitor_adapter | ||||||||||||||||||||||
| This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
| ||||||||||||||||||||||
This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. During traversal will visit all direct children of s before all grand-children are visited.
| uvm_by_level_visitor_adapter | ||||||||||||||||||||||
| This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion. | ||||||||||||||||||||||
| Class Hierarchy | ||||||||||||||||||||||
| ||||||||||||||||||||||
| Class Declaration | ||||||||||||||||||||||
| ||||||||||||||||||||||
The class is providing the proxy to extract the direct subcomponents of s
| uvm_component_proxy | ||||||||
| The class is providing the proxy to extract the direct subcomponents of s | ||||||||
| Class Hierarchy | ||||||||
| ||||||||
| Class Declaration | ||||||||
| ||||||||
This specialized visitor analyze the naming of the current component. The established rule set ensures that a component.get_full_name() is parsable, unique, printable to order to avoid any ambiguities when messages are being emitted.
ruleset a legal name is composed of
the check is coded here as a function to complete it in a single function call otherwise save/restore issues with the used dpi could occur
| uvm_component_name_check_visitor | ||||||||
| This specialized visitor analyze the naming of the current component. | ||||||||
| Class Hierarchy | ||||||||
| ||||||||
| Class Declaration | ||||||||
| ||||||||
| Methods | ||||||||
| get_name_constraint | This method should return a regex for what is being considered a valid/good component name. | |||||||
virtual function string get_name_constraint()
This method should return a regex for what is being considered a valid/good component name. The visitor will check all component names using this regex and report failing names
This uvm_top_down_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion.
class uvm_top_down_visitor_adapter#( type STRUCTURE = uvm_component, VISITOR = uvm_visitor#(STRUCTURE) ) extends uvm_visitor_adapter#(STRUCTURE,VISITOR)
This uvm_bottom_up_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion.
class uvm_bottom_up_visitor_adapter#( type STRUCTURE = uvm_component, VISITOR = uvm_visitor#(STRUCTURE) ) extends uvm_visitor_adapter#(STRUCTURE,VISITOR)
This uvm_by_level_visitor_adapter traverses the STRUCTURE s (and will invoke the visitor) in a hierarchical fashion.
class uvm_by_level_visitor_adapter#( type STRUCTURE = uvm_component, VISITOR = uvm_visitor#(STRUCTURE) ) extends uvm_visitor_adapter#(STRUCTURE,VISITOR)
The class is providing the proxy to extract the direct subcomponents of s
class uvm_component_proxy extends uvm_structure_proxy#( uvm_component )
This specialized visitor analyze the naming of the current component.
class uvm_component_name_check_visitor extends uvm_visitor#( uvm_component )
This method will be return in children a set of the direct subelements of s
pure virtual function void get_immediate_children( STRUCTURE s, ref STRUCTURE children[$] )
Calling this function will traverse through s (and every subnode of s).
pure virtual function void accept( STRUCTURE s, VISITOR v, uvm_structure_proxy#(STRUCTURE) p, bit invoke_begin_end = 1 )
This method should return a regex for what is being considered a valid/good component name.
virtual function string get_name_constraint()