amitrana Posted June 8, 2012 Report Share Posted June 8, 2012 Hi UVM, IN uvm we pass the name of test at run time with +UVM_TEST_NAME . Can we do the same with the parameterized seqence,passing their name on command line by using the $value$plusargs. Second can we run a parameterized test in uvm? Quote Link to comment Share on other sites More sharing options...
dave_59 Posted June 8, 2012 Report Share Posted June 8, 2012 You can, but not directly. When you register a parameterized class with the factory using the the `uvm_object_param_utils macro, it does not register a string name with the factory, only by type. Therefore you can only create or override these classes by type. I see two possible options: You create your own string mappings using an associate array. uvm_object_wrapper type_lookup_by_string[string];type_lookup_by_string = '{"myseq1_4":myseq#(1,4)::get_type(), "myseq2_8":myseq#(2,8)::get_type()};...factory.create_object_by_type(type_lookup_by_string["myseq2_8"],...); You register the class with the factory using the uvm_object_registry class and provide a string mapping there. See the probe class in my DVCon paper. class myseq #(int A, extends uvm_sequence;typedef uvm_object_registry #(myseq#(A,),$sformatf("myseq%0d_%0d",A,) type_id;...factory.create_object_by_name("myseq2_8",...); Quote Link to comment Share on other sites More sharing options...
amitrana Posted June 11, 2012 Author Report Share Posted June 11, 2012 Hi Dave, Thanks for such a beautiful reply. Quote Link to comment Share on other sites More sharing options...
Rarisha Posted February 10, 2021 Report Share Posted February 10, 2021 Hi, Was this possible? can you show me how you did this? I wanted to pass a sequence name through command line, to be used in a sequence called by my test Quote Link to comment Share on other sites More sharing options...
dave_59 Posted February 12, 2021 Report Share Posted February 12, 2021 See the link to My DVCon paper. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.