Skip to content

Conversation

leonardt
Copy link
Owner

Based off vector-decl, so pulled into that branch for the diff.

This changes the numeric literal code gen behavior to leverage the default, implicit syntax for width, signedness, and radix.

@leonardt leonardt requested a review from rdaly525 July 11, 2019 22:40
@rdaly525
Copy link
Collaborator

What is the reason to do this? I think keeping on the radix for 32 bit numbers would be more clear and not too verbose.

@rdaly525
Copy link
Collaborator

Oh, actually this seems reasonable especially with slicing.

@leonardt
Copy link
Owner Author

@rdaly525 actually, it's mainly motivated by the fact that the coreir primitive definitions rely on "unsized" parameter values. When the default size is explicit, it seems like verilator does a different inference algorithm that triggers a warning. This change unblocks that code. In the future, I think it would make sense to have two modes: one that has implicit default syntax, other that has fully explicit syntax. Then the user could choose which type of numeric literal they'd like to generate (e.g. force a 32'd prefix.

@leonardt leonardt merged commit 0b391bc into vector-decl Jul 12, 2019
@leonardt leonardt deleted the default-num-tostr branch December 2, 2019 15:21
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