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

Feature request: Support custom hex format #3

Closed
nikhenri opened this issue Apr 29, 2021 · 6 comments
Closed

Feature request: Support custom hex format #3

nikhenri opened this issue Apr 29, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@nikhenri
Copy link

Hi,
I am a FPGA designer and I found your extensions very useful.
The problem is when I m writing HEX in SytemVerilog, I don't use 0x prefix so the extension doesn't work

This is how a HEX is done in SystemVerilog
image

Do you think it would be possible to add the support of this prefix ?
Thank you

@maziac
Copy link
Owner

maziac commented Apr 30, 2021

Is the prefix a sole h or is it a 'h ?

@nikhenri
Copy link
Author

' give the base, so the 'h is the whole prefix.

I don't know your level of motivation, but there is also the 'b that is a prefix for binary string, ex: a<= 'b1010

Here a document explaining the format in details:
http://web.engr.oregonstate.edu/~traylor/ece474/beamer_lectures/verilog_number_literals.pdf

@maziac maziac added the enhancement New feature or request label Apr 30, 2021
@maziac
Copy link
Owner

maziac commented Apr 30, 2021

Could you please try this version:
https://github.com/maziac/hex-hover-converter/releases/tag/v1.2.0
It should allow decoding verily hex and binary numbers. (But not decimal format)

@nikhenri
Copy link
Author

nikhenri commented Apr 30, 2021

Hex seem to work correctly, with or without size
image

image

The binary is seen as hex, with or without size
image
expected: Dec: 4, Hex: 4
I think it's a display bug

Dont worry about 'd since if you don't write prefix, it's treaded as decimal
'd9 == 9

@maziac
Copy link
Owner

maziac commented May 1, 2021

Could you please try https://github.com/maziac/hex-hover-converter/releases/tag/v1.2.1

d should be supported and for b it should not display the hex anymore.

@nikhenri
Copy link
Author

nikhenri commented May 3, 2021

Work perfectly!
Thank you

@nikhenri nikhenri closed this as completed May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants