T
Travis
Guest
Hi all -
I've got a statement:
assign shift_out={tempA,tempB}[index]
where tempA and tempB are both 4 bits wide, and I want to pick one
value out of that array that is given by index.
If index comes in as a binary number, how can I convert it to an
integer?
I looked online, there is a $bitstoint(expr) type of things, but that
is for 64 bit input vectors.
I'm using a case statement because I only have 4 options,
but in the future, what is a more elegant solution?
Thanks!
I've got a statement:
assign shift_out={tempA,tempB}[index]
where tempA and tempB are both 4 bits wide, and I want to pick one
value out of that array that is given by index.
If index comes in as a binary number, how can I convert it to an
integer?
I looked online, there is a $bitstoint(expr) type of things, but that
is for 64 bit input vectors.
I'm using a case statement because I only have 4 options,
but in the future, what is a more elegant solution?
Thanks!