system verilog - SystemVerilog [Virtual interface instantiating] -


can instantiate virtual interface? syntax? example : if i've following interface:

interface if ( input in1, in2, output out1, out2 ); endinterface

virtual interface if vif;

can instantiate vif ?

virtual interfaces can have , virtual interface or instance of interface or null assigned .

ifs m_ifs () ;   vifs = m_ifs ;  // valid  vifs = vifs1 ;  // valid  vifs = null ( default value if unassigned)   if mean  vifs = new () or  new (if ) ;  

something statement above not allowed .

you instead

class interface_container {   virtual interface ifs vifs ;   } ;   interface_container m_interface_container[2] ;   m_interface_container[0] = new () ;  m_interface_container[1] = new () ;  

so have 2 instances of vif within instances of 2 class

you still have assign interface instance them . interface instance cannot dynamic represent physical connections.

m_interface_container[0].vifs = m_ifs ;  m_interface_container[1].vifs = m_ifs ;  

so there can many virtual interfaces , yet virtual interfaces ( if not null ) point fixed set of interface instances.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -