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

struct typedef io decleration with packed array does not instantiated correctly with AUTOINST #1485

Closed
veripoolbot opened this issue Aug 1, 2019 · 1 comment
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Idan Regev
Original Redmine Issue: 1485 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


verilog-mode v2019-05-06-28bee25-vpo;

package a_pkg;
typedef struct packed{
logic [7:0] a;
logic b;
} t_a_field;
endpackage

module a #(parameter A=2) (
input a_pkg::t_a_field [A-1:0] userdata //
);

using autoinst in other module:
a
#(
.A(2)
)
u_a
(
/AUTOINST/
);

Result:
AUTOINST of a will result of an error
.a_pkg::t_a_field(a_pkg::t_a_field/.[A-1:0]/),

Current workaround
Use a non packed array
module a #(parameter A=2) (
input a_pkg::t_a_field userdata [A-1:0]//
);

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-08-01T11:00:32Z


You need to tell Verilog-Mode what are types. For example add to the end of your module and submodule files:

// Local Variables:
// verilog-typedef-regexp: "^t_"
// End:

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

No branches or pull requests

2 participants