Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1069

How do I pass a type of class as a parameter to sequence?

$
0
0

I have a test0 class, where I should pass the parent "item_program" class and its child "item_program_testX", but the child should always be different (one test class - one child):

class test0 extends uvm_test;

`uvm_component_utils (test0)

env0 e0;
seq0 #(item_program, item_program_test1) s0;

...........

endclass: test0

THE QUESTION IS: What should I write instead of "???" in seq0 class:

class seq0 extends uvm_sequence #(item_program, ??? );

`uvm_object_utils (seq0)

function new(string name = "seq0");
super.new(name);
endfunction
............
endclass: seq0

REMINDER: I'll be passing a const parent as the first parameter and the second param will always be different.


Viewing all articles
Browse latest Browse all 1069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>