B
Brandon
Guest
I previously had the following conversion:
fxdbin_v(j) := to_X01(bit'val(int_v mod 2));
but I had to remove this since it would not synthesize bit'val in XST.
So....
<SNIP>
function ...
...
variable int_v : integer range -2**(m+n) to 2**(m+n)-1;
variable fxdbin_v : std_logic_vector(m+n downto 0);
...
begin
...
fxdbin_v(j) := std_logic_vector( to_unsigned( (int_v mod 2),1 ) );
...
</SNIP>
The compiler is giving the error:
** Error: C:/Modeltech_6.0c/user/user_utils.vhd(122): Assignment target
type std_ulogic is different from expression type std_logic_vector.
I realize that fxdbin_v is an array of std_logic, soI also tried:
fxdbin_v(j) := std_logic( to_unsigned( (int_v mod 2),1 ) );
and every other combination I could think of. Silly type conversions!
Thanks,
-Brandon
fxdbin_v(j) := to_X01(bit'val(int_v mod 2));
but I had to remove this since it would not synthesize bit'val in XST.
So....
<SNIP>
function ...
...
variable int_v : integer range -2**(m+n) to 2**(m+n)-1;
variable fxdbin_v : std_logic_vector(m+n downto 0);
...
begin
...
fxdbin_v(j) := std_logic_vector( to_unsigned( (int_v mod 2),1 ) );
...
</SNIP>
The compiler is giving the error:
** Error: C:/Modeltech_6.0c/user/user_utils.vhd(122): Assignment target
type std_ulogic is different from expression type std_logic_vector.
I realize that fxdbin_v is an array of std_logic, soI also tried:
fxdbin_v(j) := std_logic( to_unsigned( (int_v mod 2),1 ) );
and every other combination I could think of. Silly type conversions!
Thanks,
-Brandon