Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
veripoolbot opened this issue Nov 4, 2011 · 4 comments
Closed

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

veripoolbot opened this issue Nov 4, 2011 · 4 comments
Assignees
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 414 from https://www.veripool.org
Original Date: 2011-11-04
Original Assignee: Wilson Snyder (@wsnyder)


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.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2011-11-29T03:10:51Z


Fixed in git towards 3.831; thanks for the testcase.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-01-20T12:11:09Z


In 3.831.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jan Egil Ruud
Original Date: 2013-02-01T10:22:04Z


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]}));

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-02-02T23:34:45Z


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.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800
Projects
None yet
Development

No branches or pull requests

2 participants