[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 #446

Support for reading/assigning to packed arrays

Added by Iztok Jeras about 1 year ago. Updated 4 months ago.

Status:Closed Start date:03/02/2012
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:Unsupported
Target version:-

Description

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

t_array_packed.pl (463 Bytes) Iztok Jeras, 03/02/2012 06:40 pm

t_array_packed.v (4 kB) Iztok Jeras, 03/02/2012 06:40 pm

History

Updated by Wilson Snyder about 1 year ago

  • Subject changed from various issues with packed arrays to Support for reading/assigning to packed arrays
  • Category set to Unsupported
  • Status changed from New to Assigned
  • Assignee set to Wilson Snyder

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 bug355.

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###");

Updated by Wilson Snyder about 1 year ago

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

Updated by Iztok Jeras about 1 year ago

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

Updated by Wilson Snyder about 1 year ago

  • Status changed from Assigned to Feature

Updated by Wilson Snyder 4 months ago

  • Status changed from Feature to Closed

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

Also available in: Atom