what is the meaning of the following construct

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

parag_paul@hotmail.com

Guest
I got a verilog with the following lines


module vl_leaf( .op1(), clk);
input clk;
initial #50 $finish;
initial $display("%m from named open port module ");
always @(clk) $display ( "%m, clk = %b open port = %b time = %t ",
clk, .op1() , $time );
endmodule



What does .op1() mean
-Parag
 
On Dec 18, 11:32 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com>
wrote:
I got a verilog with the following lines

module vl_leaf( .op1(), clk);
input clk;
initial #50 $finish;
initial $display("%m from named open port module ");
always @(clk) $display ( "%m, clk = %b open port = %b time = %t ",
clk, .op1() , $time );
endmodule

What does .op1() mean
-Parag
A named port connection in a module declaration is the counterpart to
a named port connection in a module instantiation. In a module
instantiation, .portname(expr) means that port portname is externally
connected to expr. In a module declaration, .portname(expr) means
that port portname is internally connected to expr. It is not fully
symmetrical though, as an internal expr can only consist of
identifiers declared as ports inside the module, or bit-selects or
part-selects of those, or concatenations of any of those. It cannot
be a general expression. This feature is rarely used, but can be used
to connect one internal port to multiple external ports, or split one
internal port across multiple external ports, or concatenate multiple
internal ports together to make one external port, or just give a port
a different name externally.

In this case, the expression is empty, so it declares a port op1 that
is connected to nothing inside the module.
 
On Dec 18, 10:38 am, sh...@cadence.com wrote:
On Dec 18, 11:32 am, "parag_p...@hotmail.com" <parag_p...@hotmail.com
wrote:

I got a verilog with the following lines

module vl_leaf( .op1(), clk);
input clk;
initial #50 $finish;
initial $display("%m from named open port module ");
always @(clk) $display ( "%m, clk = %b  open port = %b time = %t ",
clk, .op1() , $time );
endmodule

What does .op1() mean
-Parag

A named port connection in a module declaration is the counterpart to
a named port connection in a module instantiation.  In a module
instantiation, .portname(expr) means that port portname is externally
connected to expr.  In a module declaration, .portname(expr) means
that port portname is internally connected to expr.  It is not fully
symmetrical though, as an internal expr can only consist of
identifiers declared as ports inside the module, or bit-selects or
part-selects of those, or concatenations of any of those.  It cannot
be a general expression.  This feature is rarely used, but can be used
to connect one internal port to multiple external ports, or split one
internal port across multiple external ports, or concatenate multiple
internal ports together to make one external port, or just give a port
a different name externally.

In this case, the expression is empty, so it declares a port op1 that
is connected to nothing inside the module.
Hi

thnaks for the detailed explanation. I really don't know ans for this
question so from yesterday I was looking any reply for this question

thanks
Radhika
 

Welcome to EDABoard.com

Sponsor

Back
Top