Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I think we can also use
my_integer <= conv_integer(std_logic_type);
TrickyDicky's example does convert std_logic_vector to integer. The conversion is done in two steps because you must specify if there is a sign bit or not in the std_logic_vector.xtcx's proposal is the only thing that would work for an "std_logic_vector".
TrickyDicky's suggestion will convert a "signed" or "unsigned" vector to an integer - As he mentioned, it is however the formal and standard conversion to use.
std_logic_vector uses the non-standard synopsis liabraries.
It requires a slightly different coding style, and I therefore strongly recommend beginners to only use numeric_std.
What do you mean by "different coding style"?