-
If I have a structure like this
how do I determine the number of bits needed to hold this structure? |
Beta Was this translation helpful? Give feedback.
Answered by
subbdue
Mar 18, 2023
Replies: 1 comment
-
The One big advantage of the
Output:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
subbdue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
$bits()
system function returns the number of bits required to hold an expression or variable. In the example below it is used to get the bitstream size of astruct
and anarray
.One big advantage of the
$bits()
function is that it can be used as an elaboration time constant . Hence, it can be used in the declaration of other data types or variables.Output: