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

regression in handling union/struct/array hierarchy #867

Closed
veripoolbot opened this issue Dec 24, 2014 · 3 comments
Closed

regression in handling union/struct/array hierarchy #867

veripoolbot opened this issue Dec 24, 2014 · 3 comments
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Iztok Jeras (@jeras)
Original Redmine Issue: 867 from https://www.veripool.org
Original Date: 2014-12-24
Original Assignee: Wilson Snyder (@wsnyder)


From this commit on:

Support enum.first/name and similar methods, #�.
c1593f856d4a4ca47864203a94b30b86dd3271a8

I have trouble using the next code:

union packed {
  logic [32-1:0] [8-1:0] idx;
  struct packed {
     logic             [16-1:0] z, y, x;
     logic [32-2*3-1:0] [8-1:0] r;
  } nam;
} gpr;

assign pmem_a = rst ? 0 : (pmem_selz ? gpr.nam.z[15:1] : PC + 1);
R = gpr.nam.z[0] ? pmem_d[15:8] : pmem_d[7:0];

I get the next error:

%Error: ../tbn//../rtl/rp_8bit.sv:229: Member selection of non-struct/union object 'MEMBERSEL 'nam'' which is a 'MEMBERDTYPE 'nam''

Code like "gpr.nam.z" without geting a subset of the vector works fine.

Regards,
Iztok Jeras

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Iztok Jeras (@jeras)
Original Date: 2014-12-24T15:44:25Z


an attempt at a test file, I just searched for unions in the regression directory and added the troublesome code to "test_regress/t/t_struct_init.v", so I am not sure this is the right file or maybe a new testcase would be needed

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-12-25T02:52:26Z


Sorry about that. Pushed to git towards 3.869.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-02-13T01:40:44Z


In 3.870.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants