-2

Here here different UVM class signatures:

virtual class uvm_env extends uvm_component;
virtual class uvm_scoreboard extends uvm_component;
virtual class uvm_monitor extends uvm_component;

class uvm_sequencer #(type REQ=uvm_sequence_item, RSP=REQ) 
                    extends uvm_sequencer_param_base #(REQ, RSP);

class uvm_driver #(type REQ=uvm_sequence_item,
                   type RSP=REQ) extends uvm_component;

virtual class uvm_sequence #(type REQ = uvm_sequence_item,
                             type RSP = REQ) extends uvm_sequence_base;

In above we can see uvm_sequencer, uvm_driver and uvm_sequence are parametrized classes. Why uvm_sequence class is still abstract one, while other two are not?

toolic
  • 57,801
  • 17
  • 75
  • 117
AnuragChauhan
  • 143
  • 1
  • 15
  • 1
    Does it really matter why? The library is provided to you as a standard as is with standard documentation. So, you just have to use it accordingly, otherwise create your own test library. It is this way because... You can ask accellera uvm committee. – Serge Aug 04 '23 at 19:25
  • @Serge I didn't get that I have done anything here for this comment. I think you have never asked in your learning time very important question "Why?" – AnuragChauhan Aug 06 '23 at 06:36
  • @OP I did :-). But in this case there is no good answer, just an opinion. Even the developer might not know it exactly. – Serge Aug 07 '23 at 01:25
  • @Serge So you are justifying your comments here. .....Even no one knows including developer, how would someone will come to know without asking.... I am not asking it on FB. It is very respected portal for asking your questions. And finally you were not force to reply. – AnuragChauhan Aug 07 '23 at 15:13

2 Answers2

2

Here is link to answer to same question. quoting from answer

"uvm_driver should have been declared as a virtual class. It serves no useful purpose unless you extend it with code that does the actual driving. The virtual keyword prevents you from ever constructing it."

https://verificationacademy.com/forums/uvm/why-uvm-driver-and-sequencer-are-non-virtual

Parth Pandya
  • 36
  • 1
  • 5
2

The uvm_sequencer class is not defined as virtual because it is already useful as it is without being extended.

The uvm_dirver class is not defined as virtual probably because of legacy from OVM. There were a couple of rare cases it could be used without extension.

dave_59
  • 39,096
  • 3
  • 24
  • 63