Representing parameter as little endian #80
-
How would I have a (for example) 2 byte parameter of an instruction be laid out as little endian in the byte code? As far as I can tell the slice (`8) only allows you to grab the lower bits of a value. Is there a way to grab the upper bits or specific bit range? Better yet, is there a directive that allows me to say "encode this 2 byte parameter as little endian"? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Currently, you can use the following syntax: if |
Beta Was this translation helpful? Give feedback.
Currently, you can use the following syntax: if
x
is a 16-bit value, thenx[7:0] @ x[15:8]
is its little-endian representation (Verilog-style bit slices). I'm thinking about adding anleXX()
family of functions for automatically doing that in the future! (In this case it would bele16(x)
)