Issue #183
SV unrecognized syntax: Multidimensioned typedef references
| Status: | Closed | Start: | 11/12/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | Wilson Snyder | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
%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
History
Updated by vesselin kavalov 4 months ago
- File test1.v added
Oops! I didn't know it will smear the new lines :( Attaching the file
Updated by Wilson Snyder 4 months ago
- Status changed from New to Resolved
- Assigned to set to Wilson Snyder
Sorry, I had misread the specification "{packed_dimension} vs [packed_dimension]"
Fixed in git for 3.222.
Updated by Wilson Snyder 3 months ago
- Subject changed from SV unrecognized syntax to SV unrecognized syntax: Multidimensioned typedef references
![[logo]](/img/veripool_small.png)