mo.khairy.mo
Member level 2
Hi all,
i'm trying to design a floating point adder using advantage pro and i simulating it using modelsim
this my code
and i found a problem which i couldn't recognize it
there is no error in compiling the code
but at simulation the o/p is UUUUUUUUUUUUUUUUUUUU
and there is some warnings at modelsim command window
this is the error massage
can anyone kindly help me to solve the error
i'm trying to design a floating point adder using advantage pro and i simulating it using modelsim
this my code
Code:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
ENTITY fp_adder IS
-- Declarations
port(a,b: in std_logic_vector(31 downto 0);
c: out std_logic_vector(31 downto 0)
);
END fp_adder ;
-- hds interface_end
ARCHITECTURE adder OF fp_adder IS
--declaration of sign
signal sa,sb,sc: std_logic;
--declaration of exponent
signal ea,eb,ec: unsigned(7 downto 0);
--declaration of mantissa
signal ma,mb,mc: unsigned(22 downto 0);
BEGIN
--asignement of sign signals
sa <= a(31);
sb <= b(31);
--assignement of exponent signals
ea <= unsigned(a(30 downto 23));
eb <= unsigned(b(30 downto 23));
--assignement of mantissa signals
ma <= unsigned(a(22 downto 0));
mb <= unsigned(b(22 downto 0));
------------------------------------------------------------------------------------------------------
process(ea,eb,ec,ma,mb,mc,sa,sb,sc)
begin
if(ea > eb)then loop
eb <= eb+1;
mb <= '0'& mb(7 downto 1);
exit when ea=eb;
end loop;
elsif(eb > ea) then loop
ea <= ea+1;
ma <= '0'& ma(7 downto 1);
exit when ea=eb;
end loop;
else
mc<= ma+mb;
ec<= ea;
sc<=sa xor sb;
end if;
end process;
c(22 downto 0) <= std_logic_vector(mc);
c(30 downto 23) <= std_logic_vector(ec);
c(31) <= sc;
END adder;
there is no error in compiling the code
but at simulation the o/p is UUUUUUUUUUUUUUUUUUUU
and there is some warnings at modelsim command window
this is the error massage
Code:
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 0 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 0 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 0 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 0 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 0 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 0 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 1 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 1 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 1 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 1 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 1 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 1 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 2 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 2 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 2 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 2 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 2 Instance: /fp_adder
# ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es).
# Time: 0 ns Iteration: 2 Instance: /fp_adder
can anyone kindly help me to solve the error