R
revu
Guest
architecture Behavioral of addsubmain is
signal sL,sS :std_logic;
signal eL,eS:std_logic_vector(7 downto 0);
signal fracL,fracS:std_logic_vector(23 downto 0);
signal sX_B : std_logic;
signal op_X : std_logic;
signal diff : integer;
signal X_A : std_logic_vector(24+diff downto 0);
signal X_B : std_logic_vector(24+diff downto 0);
signal X_R : std_logic_vector(24+diff downto 0);
begin
sX_B <= oper xor s_B;
if exp_A < exp_B then
eS <= exp_A;
fracS <= frac_A;
sS <= s_A;
eL <= exp_B;
fracL <= frac_B;
sL <= sX_B;
elsif exp_B < exp_A then
eS <= exp_B;
fracS <= frac_B;
sS <= sX_B;
eL <= exp_A;
fracL <= frac_A;
sL <= s_A;
end if;
my code goes like this.. exp_A and exp_B have been declared as
std_logic_vectors of same size in the entity.
the xilinx ise tool shows "parse error: unexpected if" at the beginning of
this part of code, then "parse error: unexpected else" and also "error:
unexpected if, semicolon expected" at the line of end if.
i can't proceed without getting this conditional statement corrected. i
even tried using case instead of if.. but tat too is erroneous...
wat is wrong with my code?
--
Message posted using http://www.talkaboutprogramming.com/group/comp.lang.vhdl/
More information at http://www.talkaboutprogramming.com/faq.html
signal sL,sS :std_logic;
signal eL,eS:std_logic_vector(7 downto 0);
signal fracL,fracS:std_logic_vector(23 downto 0);
signal sX_B : std_logic;
signal op_X : std_logic;
signal diff : integer;
signal X_A : std_logic_vector(24+diff downto 0);
signal X_B : std_logic_vector(24+diff downto 0);
signal X_R : std_logic_vector(24+diff downto 0);
begin
sX_B <= oper xor s_B;
if exp_A < exp_B then
eS <= exp_A;
fracS <= frac_A;
sS <= s_A;
eL <= exp_B;
fracL <= frac_B;
sL <= sX_B;
elsif exp_B < exp_A then
eS <= exp_B;
fracS <= frac_B;
sS <= sX_B;
eL <= exp_A;
fracL <= frac_A;
sL <= s_A;
end if;
my code goes like this.. exp_A and exp_B have been declared as
std_logic_vectors of same size in the entity.
the xilinx ise tool shows "parse error: unexpected if" at the beginning of
this part of code, then "parse error: unexpected else" and also "error:
unexpected if, semicolon expected" at the line of end if.
i can't proceed without getting this conditional statement corrected. i
even tried using case instead of if.. but tat too is erroneous...
wat is wrong with my code?
--
Message posted using http://www.talkaboutprogramming.com/group/comp.lang.vhdl/
More information at http://www.talkaboutprogramming.com/faq.html