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

Support for reading/assigning to packed arrays #446

Closed
veripoolbot opened this issue Mar 2, 2012 · 4 comments
Closed

Support for reading/assigning to packed arrays #446

veripoolbot opened this issue Mar 2, 2012 · 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: Iztok Jeras (@jeras)
Original Redmine Issue: 446 from https://www.veripool.org
Original Date: 2012-03-02
Original Assignee: Wilson Snyder (@wsnyder)


Hi,

Attached is a test for packed arrays. The test is based on the verilator test environment (except for the checksum) and can be run with "test_regress/t/t_array_packed.pl". It compiles and runs properly on ncsim (the -nc) option. Here is the list of issues:

  1. expression LHS size is not calculated correctly, note that in all expressions both sizes have the same bitsize
    %Warning-WIDTH: t/t_array_packed.v:46: Operator ASSIGNDLY expects 8 bits on the Assign RHS, but Assign RHS's REPLICATE generates 64 bits.

  2. the '{} operator is not supported (I have seen a post from December mentioning this)

  3. literals in the form 'b... with more than 32 bits seem not to be supported, but 64'b... works

There is a detail that is not clear to me but it is only relevant in combination with the '{} operator or with $dimensions(). According to the SystemVerilog standard (I only have 3.1a) a slice of a packed array is a packed array, for example "logic [3:0][7:0] data;" and the slice "data [1:0]". It seems ncsim has an issue here, I reported it.

What would be the easiest way for me to contribute to the Verilator test suite? Should I make a fork on GitHub, so you could fetch from it?

Regards,
Iztok Jeras

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-03-02T22:17:49Z


  1. Assigning packed arrays isn't currently supported, so this is a good test for that. We'll say that's what this bug tracks.

  2. '{} is #�.

  3. I'm not sure of your exact case, but the standard says "a number with a base specifier but no size specification) shall be at least 32." It doesn't say it must extend to the specific size.

Yes, a github branch would be great. If you have failing cases you can mark them as "skipped" so I can still commit them and you can test them elsewhere. In the .pl file:

$Self->{vlt} and $Self->skip("Verilator unsupported, bug###");

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-03-02T22:31:23Z


BTW this will take at least a month, as it's behind supporting structs, since structs are making changes in the same code vicinity.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Iztok Jeras (@jeras)
Original Date: 2012-03-06T14:12:56Z


Hi,

The next example can be used to test the feature:
test_regress/t/t_array_packed_write_read.pl
the test can be found at (branch test_sv):
https://github.com/jeras/verilator

Regards,
Iztok Jeras

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-01-15T04:32:45Z


I believe packed arrays were supported a few months ago, although changes towards 3.845 have resolved more issues there.

@veripoolbot veripoolbot added resolution: fixed Closed; fixed type: feature-IEEE Request to add new feature, described in IEEE 1800 labels Dec 22, 2019
wsnyder added a commit that referenced this issue Aug 16, 2022
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