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

SV unrecognized syntax: Multidimensioned typedef references #183

Closed
veripoolbot opened this issue Nov 12, 2009 · 3 comments
Closed

SV unrecognized syntax: Multidimensioned typedef references #183

veripoolbot opened this issue Nov 12, 2009 · 3 comments
Assignees

Comments

@veripoolbot
Copy link
Collaborator


Author Name: vesselin kavalov (@vessko)
Original Redmine Issue: 183 from https://www.veripool.org
Original Date: 2009-11-12
Original Assignee: Wilson Snyder (@wsnyder)


%Error: test1.v:30: syntax error, unexpected '[', expecting IDENTIFIER or '='

module lib_add_bintree
#(parameter
     // Number of input values
       NUM       = 9
     // Width of each value
     , WIDTH     = 8
) (
     // Values to add
       input  logic  [NUM-1:0][WIDTH-1:0]    a
     // Resulting sum
     , output logic  [WIDTH-1:0]             sum
);

typedef logic [WIDTH-1:0] val_t;

localparam NLOG =
                   (NUM <=     2) ?  1
                 : (NUM <=     4) ?  2
                 : (NUM <=     8) ?  3
                 : (NUM <=    16) ?  4
                 : (NUM <=    32) ?  5
                 : (NUM <=    64) ?  6
                 : (NUM <=   128) ?  7
                 : (NUM <=   256) ?  8
                 : (NUM <=   512) ?  9
                 : (NUM <=  1024) ? 10
                 : 0;

// binary search tree
val_t [NLOG:0][NUM-1:0] tree;
endmodule

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: vesselin kavalov (@vessko)
Original Date: 2009-11-12T20:08:39Z


Oops! I didn't know it will smear the new lines :( Attaching the file

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-11-12T20:36:26Z


Sorry, I had misread the specification "{packed_dimension} vs [packed_dimension]"

Fixed in git for 3.222.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2009-11-24T14:58:53Z


In 3.222.

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

No branches or pull requests

2 participants