H
hessam.1983@gmail.com
Guest
hi
i have a problem with indexing my bit_vector with an integer signal.
------------------------------------
entity testinteger is
end entity;
architecture test of testinteger is
signal int:integer;
signal bin1:bit_vector(5 downto 0);
signal bin2:bit_vector(2 downto 0);
begin
int<=2;
bin1<="110010";
bin2<=bin1(int*2 downto int*2-2);
end test;
------------------------------------
if you run this little program , you get an error!!this program
decrements "int" and i don't know why??!!it shouldn't do that.
i don't want to declare "int" as a const.
can anyone help me what should i do??
hess@m..
i have a problem with indexing my bit_vector with an integer signal.
------------------------------------
entity testinteger is
end entity;
architecture test of testinteger is
signal int:integer;
signal bin1:bit_vector(5 downto 0);
signal bin2:bit_vector(2 downto 0);
begin
int<=2;
bin1<="110010";
bin2<=bin1(int*2 downto int*2-2);
end test;
------------------------------------
if you run this little program , you get an error!!this program
decrements "int" and i don't know why??!!it shouldn't do that.
i don't want to declare "int" as a const.
can anyone help me what should i do??
hess@m..