Skip to content

Print some Warnings#50

Merged
PhilippvK merged 24 commits intodevelopfrom
warn-implicit-trunc
Apr 16, 2026
Merged

Print some Warnings#50
PhilippvK merged 24 commits intodevelopfrom
warn-implicit-trunc

Conversation

@PhilippvK
Copy link
Copy Markdown
Member

@PhilippvK PhilippvK commented Jun 23, 2025

Prints warnings if unsupported (or undefined) behavior is detected:

  • Implicit truncations (e.g. unsigned<16> my_u16_val = my_u32_val; vs. unsigned<16> my_u16_val = my_u32_val[15:0];)
  • Shifting values out of range (number of bits in LHS) (e.g. my_u32_val << 33 or even 1'b1 << 2).

TODOs

  • Expose via CLI (e.g. -Wall, -Wimplicit-trunc, -Wno-implicit-trunc,...)
  • Print line in code where warning was emitted
  • Move warnings from etiss writer to coredsl2 parser
  • Drop warnings code from etiss writer
  • Add more warnings:
    • implicit-extend
    • bit-op-missmatch
    • sign-compare
    • shift-signed
    • unused-value -> Move to extra issue

@PhilippvK PhilippvK self-assigned this Jun 23, 2025
@PhilippvK PhilippvK force-pushed the warn-implicit-trunc branch from a5d4b58 to 790a44d Compare April 13, 2026 07:48
@PhilippvK
Copy link
Copy Markdown
Member Author

Moving to the parser has to be delayed after the type inference pass was upstreamed.

return self


def indexed_reference(self: behav.IndexedReference, context):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TODO: Remember for later to merge with #72
Needs update for Ranged Index Access.
self.right is completely missing in PASS

@PhilippvK PhilippvK changed the base branch from coredsl2 to develop April 16, 2026 09:58
@PhilippvK PhilippvK merged commit d3b20a7 into develop Apr 16, 2026
1 check passed
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