Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1018

Verilator won't inline modules that contain interfaces

Added by Johan Bjork about 1 year ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unsupported
% Done:

0%


Description

From V3Inline.cpp
    virtual void visit(AstVar* nodep, AstNUser*) {
    // Can't look at AstIfaceRefDType directly as it is no longer underneath the module
    if (nodep->isIfaceRef()) {
        // Unsupported: Inlining of modules with ifaces (see AstIface comment above)
        if (m_modp) cantInline("Interfaced",true);
    }
    nodep->iterateChildren(*this);
    }

Ideally verilator should support inlining modules that contain interfaces to improve both verilation/compilation time as well as runtime.

History

#1 Updated by Johan Bjork about 1 year ago

I started working on this. Some tricky required to handle AstVarXRef's but nothing too terrible. patch draft here: https://github.com/phb/verilator-dev/tree/issue1018

Happy holidays everyone!

#2 Updated by Wilson Snyder about 1 year ago

  • Status changed from New to Assigned
  • Assignee set to Johan Bjork

Surprisingly less code than I expected.

I think you need to m_renameInterfaces.clear() on each visit AstModule.

Also, for testing, for each of the exsting interface test .pl files please make a new _noinl.pl test file similar to e.g. t_inst_slice_noinl.pl. Otherwise we'll only be verifying the inliner version, and when the non-inline code drifts we'll soon get bug reports of large designs breaking because they didn't get inlined.

#3 Updated by Johan Bjork about 1 year ago

Updated patch. From the first patch the main changes are 1) Added noinl tests 2) Ensure to clone the AstIfaceRefDType when needed, as it contains a link to the cell which now is cloned.

#4 Updated by Wilson Snyder about 1 year ago

Great, fixed in git towards 3.881.

#5 Updated by Wilson Snyder 12 months ago

  • Status changed from Assigned to Closed

In 3.882.

Also available in: Atom