[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
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #414

Instantiate per bit array of modules with sub-range as output

Added by Jeremy Bennett over 1 year ago. Updated 4 months ago.

Status:Closed Start date:11/04/2011
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:Unsupported
Target version:-

Description

Verilator does not like per bit array instantiations of modules where the output wire is not the full declared size of the wire. For example:

   wire [17:10] bitout;
   wire [27:24] short_bitout;
   wire [7:0]     allbits;
   wire [15:0]     twobits;

   sub
     i_sub3 [7:4] (.allbits (allbits),
           .twobits (twobits[15:8]),
           .bitout (bitout[17:14]));

The error message " Unsupported: Per-bit array instantiations with output connections to non-wires." suggests Verilator has become confused. The following works just fine:

   sub
     i_sub4 [7:4] (.allbits (allbits),
           .twobits (twobits[15:8]),
           .bitout (short_bitout[27:24]));

as does

   sub
     i_sub5 [7:0] (.allbits (allbits),
           .twobits (twobits),
           .bitout (bitout[17:10]));

The key seems to be using the full declared width of the output wire.

t_inst_array_partial.v - Verilog file demonstrating the problem (1.1 kB) Jeremy Bennett, 11/04/2011 05:48 pm

t_inst_array_partial.pl (463 Bytes) Jeremy Bennett, 11/04/2011 05:48 pm

History

Updated by Wilson Snyder over 1 year ago

  • Category set to Unsupported
  • Status changed from New to Feature

Updated by Wilson Snyder over 1 year ago

  • Status changed from Feature to Resolved
  • Assignee set to Wilson Snyder

Fixed in git towards 3.831; thanks for the testcase.

Updated by Wilson Snyder over 1 year ago

  • Status changed from Resolved to Closed

In 3.831.

Updated by Jan Egil Ruud 4 months ago

I've found another case where Verilator gives the error "Unsupported: Per-bit array instantiations with output connections to non-wires". Just add the following code to t_inst_array_partial.v :
sub
    i_sub6 [7:4] (.allbits (allbits),
          .twobits (twobits[15:8]),
          .bitout ({bitout[14+:2],short_bitout[25+:2]}));

Updated by Wilson Snyder 4 months ago

Other case fixed towards 3.845. Thanks for the simple test to find it.

BTW if you could please file a new bug if there are new issues, or I might miss that there's a problem attached to a bug that is already closed, thanks.

Also available in: Atom