Skip to content

Conversation

@meheff
Copy link
Collaborator

@meheff meheff commented Jan 14, 2026

These were representable but were unusable because they could not be converted to a IndexableExpression. Also add unpacked array parameters and array assignment to the C API.

These were representable but were unusable because they could not be converted to a IndexableExpression. Also add this capability to the C API.
meheff added a commit to xlsynth/xlsynth that referenced this pull request Jan 14, 2026
These were representable but were unusable because they could not be converted to a IndexableExpression. Also add this capability to the C API.

EXPECT_EQ(m->Emit(nullptr),
R"(module top;
parameter P0[2] = '{'0, '0};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe it's valid SystemVerilog to have an unpacked param without an explicit data type. Similar below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. Sorry I missed it earlier.

There is not a specific example of this construct in the spec, but the grammar production rules allow it (6.20.1) and it doesn't appear to be explicitly disallowed. There is some discussion about aggregate constants at the end of 6.20.2 where such an exception seemingly would be made. I assume it behaves just as an array of the implicit data type (32-bit signed logic in SV).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both Verific and VCS report syntax errors in this case. E.g.

Error-[SE] Syntax error
  Following verilog source has syntax error :
...
token is '='
    parameter P0[2] = '{'0, '0};

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

Successfully merging this pull request may close these issues.

2 participants