About modport access

  • Thread starter parag_paul@hotmail.com
  • Start date
P

parag_paul@hotmail.com

Guest
Does modport limit access to the members too. I mean, in the normal
cases when we are not using a modport for a particular interface, do
the members have any direction inside it ? Or they are just plain
variables . In the below mentioned test case if we had anothe
variable inside the inrteface like reg a;
could we access this a inside the if1 in dut ??

interface memsysInterface(clk);
input clk;
modport dut(input clk);
endinterface

module memsys_test_top;
bit clk;
memsysInterface if1(clk);
memsys dut(if1.dut);
endmodule

module memsys(interface if1);
endmodule
 
Parag,

On Mar 10, 12:14 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
Does modport limit access to the members too.
Yes it can. Also it can limit visibility of any tasks/functions in
the interface.

I mean, in the normal
cases when we are not using a modport for a particular interface, do
the members have any direction inside it ? Or they are just plain
variables . In the below mentioned test case if we had anothe
variable inside the inrteface like reg a;
could we access this a inside the if1 in dut ??

Unless the "reg a" is made visible via modport (and assuming that
the DUT uses the modport and not the interface itself), it can not.

HTH
Ajeetha, CVC
www.noveldv.com
 
On Mar 9, 11:14 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
Does modport limit access to the members too. I mean, in the normal
cases when we are not using a modport for a particular interface, do
the members have any direction inside it ? Or they are just plain variables
If you do not use an interface's modport, whether or not one exists,
then you have access to everything and the default direction is 'ref'
for a variable or 'inout' for a net.

. In the below mentioned test case if we had anothe
variable inside the inrteface like reg a;
could we access this a inside the if1 in dut ??

If you are using the modport, you have to add the member variables or
nets you want to directly access through the interface by name.

Dave
 
On Mar 10, 8:31 pm, "Dave Rich" <dave.nospam.r...@gmail.com> wrote:
On Mar 9, 11:14 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com
wrote:

Does modport limit access to the members too. I mean, in the normal
cases when we are not using a modport for a particular interface, do
the members have any direction inside it ? Or they are just plain variables

If you do not use an interface's modport, whether or not one exists,
then you have access to everything and the default direction is 'ref'
for a variable or 'inout' for a net.

. In the below mentioned test case if we had anothe
variable inside the inrteface like reg a;
could we access this a inside the if1 in dut ??

If you are using the modport, you have to add the member variables or
nets you want to directly access through the interface by name.

Dave
Thanks to all
Dave -- I was not sure about the inout of nets and ref for variables
thanks a lot
 

Welcome to EDABoard.com

Sponsor

Back
Top