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

Assignment pattern to array is not supported #683

Closed
veripoolbot opened this issue Oct 15, 2013 · 4 comments
Closed

Assignment pattern to array is not supported #683

veripoolbot opened this issue Oct 15, 2013 · 4 comments

Comments

@veripoolbot
Copy link
Contributor

@veripoolbot veripoolbot commented Oct 15, 2013


Author Name: Jie Xu (@jiexu)
Original Redmine Issue: 683 from https://www.veripool.org
Original Date: 2013-10-15
Original Assignee: Wilson Snyder (@wsnyder)


The following code will generate error when compiled with Verilator:

reg test_array [7:0];

test_array = '{default:1'b0}; 

The error message: Unsupported: Assignment pattern applies against non struct/union: UNPACKARRAYDTYPE.

This is related to #�.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Oct 15, 2013


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-10-15T11:16:38Z


True, thought this would work against packed arrays but doesn't seem to.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Nov 7, 2013


Original Redmine Comment
Author Name: Jeremy Bennett (@jeremybennett)
Original Date: 2013-11-07T19:29:00Z


Related to this are other aspects of array assigment for parameters. From @test_regress/t/t_sv_cpu_code/ports_h.sv@ we have:

localparam int str_pinid [0:15] =
'{
 "DEF", "ERR", "ERR", "ERR", "ERR", "ERR", "ERR", "ERR",
 "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7"
 };

From @test_regress/t/t_sv_cpu_code/pinout_h.sv@ we have:

typedef struct packed
{
 t_pinid   id;
 t_padtype padtype;
 int       aux;
} t_pin_descriptor;


localparam t_pin_descriptor
  pinout[ 1: 6]
  = '{
       '{default:0, id:PINID_A0,   padtype:PADTYPE_GPIO, aux:1},
       '{default:0, id:PINID_A1,   padtype:PADTYPE_GPIO},
       '{default:0, id:PINID_A2,   padtype:PADTYPE_GPIO},
       '{default:0, id:PINID_D0,   padtype:PADTYPE_GPIO},
       '{default:0, id:PINID_VDD0, padtype:PADTYPE_VDD},
       '{default:0, id:PINID_GND0, padtype:PADTYPE_GND}
       };

and also

localparam int pinout_size = 6;
localparam int pinout_wa[1:pinout_size][pinout_wa_id:pinout_wa_aux] =
'{
  '{PINID_A0,   PADTYPE_GPIO, 0},
  '{PINID_A1,   PADTYPE_GPIO, 0},
  '{PINID_A2,   PADTYPE_GPIO, 0},
  '{PINID_D0,   PADTYPE_GPIO, 0},
  '{PINID_VDD0, PADTYPE_VDD,  0},
  '{PINID_GND0, PADTYPE_GND , 0}
  };

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented Apr 2, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-04-02T03:18:34Z


Assignment patterns fixed in git towards 3.857.

The test posted here had an additional issue in that parameters could not have array assignments. This is fixed in git towards 3.857.

Note the sv_cpu test is closer but still not passing, it has an interface issue that I'm looking at.

@veripoolbot
Copy link
Contributor Author

@veripoolbot veripoolbot commented May 11, 2014


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-05-11T21:09:02Z


In 3.860.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.