mateuszchudyk / vscode-hexinspector

Visual Studio Code extension that provides fast and easy way to peek other forms of a hexadecimal value.
https://marketplace.visualstudio.com/items?itemName=mateuszchudyk.hexinspector
MIT License
15 stars 6 forks source link

Support for inspecting in Verilog or VHDL. #12

Open joshgalvan opened 1 year ago

joshgalvan commented 1 year ago

I only know Verilog well enough to comment on it, but I know VHDL would benefit from this, too.

In Verilog numbers written default to decimal, but if prepended by 'b or 'h the number is binary or hexadecimal, respectively. 'd also works if you want to explicitly write a decimal value.

The normal way someone would write a number in Verilog is: som_var = 8'hFF. This means the following number is 8 bits wide and is represented in hexadecimal.

joshgalvan commented 1 year ago

Adding other scenarios of numbers written in Verilog:

4'b1001; 32'h1234ABCD; 2'd4; 'b1101011; (You don't have to specify the bit-width of the number)

You can of course write plain numbers, which default to decimal.