---
name: "Verilog::Netlist::Interface"
section: "3pm"
platform: "linux"
package: "libverilog-perl"
version: "3.482-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Verilog::Netlist::Interface"
---

# Verilog::Netlist::Interface(3pm)

Interface within a Verilog Netlist

## NAME

Verilog::Netlist::Interface - Interface within a Verilog Netlist

## SYNOPSIS

```
  use Verilog::Netlist;
  ...
  my $interface = $netlist->find_interface('name');
  my $cell = $self->find_cell('name')
  my $port =  $self->find_port('name')
  my $net =  $self->find_net('name')
```

## DESCRIPTION

A Verilog::Netlist::Interface object is created by Verilog::Netlist for every interface in the design.

## ACCESSORS

See also Verilog::Netlist::Subclass for additional accessors and methods.

- $self-\>comment

  Returns any comments following the definition.  keep\_comments=\>1 must be passed to Verilog::Netlist::new for comments to be retained.

- $self-\>find\_port\_by\_index

  Returns the port name associated with the given index.

- $self-\>modports

  Returns list of references to Verilog::Netlist::ModPort in the interface.

- $self-\>modports\_sorted

  Returns list of references to Verilog::Netlist::ModPort in the interface sorted by name.

- $self-\>name

  The name of the interface.

- $self-\>netlist

  Reference to the Verilog::Netlist the interface is under.

- $self-\>nets

  Returns list of references to Verilog::Netlist::Net in the interface.

- $self-\>nets\_sorted

  Returns list of name sorted references to Verilog::Netlist::Net in the interface.

- $self-\>nets\_and\_ports\_sorted

  Returns list of name sorted references to Verilog::Netlist::Net and Verilog::Netlist::Port in the interface.

- $self-\>ports

  Returns list of references to Verilog::Netlist::Port in the interface.

- $self-\>ports\_ordered

  Returns list of references to Verilog::Netlist::Port in the interface sorted by pin number.

- $self-\>ports\_sorted

  Returns list of references to Verilog::Netlist::Port in the interface sorted by name.

## MEMBER FUNCTIONS

See also Verilog::Netlist::Subclass for additional accessors and methods.

- $self-\>find\_net(*name*)

  Returns Verilog::Netlist::Net matching given name.

- $self-\>level

  Returns the reverse depth of this interface with respect to other modules and interfaces.  See also Netlist's modules\_sorted\_level.

- $self-\>lint

  Checks the interface for errors.

- $self-\>link

  Creates interconnections between this interface and other interfaces.

- $self-\>new\_net

  Creates a new Verilog::Netlist::Net.

- $self-\>dump

  Prints debugging information for this interface.

- $self-\>verilog\_text

  Returns verilog code which represents this interface.  Returned as an array that must be joined together to form the final text string.  The netlist must be already -\>link'ed for this to work correctly.

## DISTRIBUTION

Verilog-Perl is part of the \<https://www.veripool.org/\> free Verilog EDA software tool suite.  The latest version is available from CPAN and from \<https://www.veripool.org/verilog-perl\>.

Copyright 2000-2024 by Wilson Snyder.  This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.

## AUTHORS

Wilson Snyder \<wsnyder@wsnyder.org\>

## SEE ALSO

Verilog-Perl, Verilog::Netlist::Subclass Verilog::Netlist
