Forum Discussion
Altera_Forum
Honored Contributor
15 years agoDear my friends
When i simulate VHDL code by Modelsim, I got some warning about arithmetic --- Quote Start --- # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es). # Time: 1020 ns Iteration: 1 Instance: /testbench_svpwm/u/state # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es). # Time: 1020 ns Iteration: 1 Instance: /testbench_svpwm/u/state # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es). # Time: 1260 ns Iteration: 1 Instance: /testbench_svpwm/u/state # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es). # Time: 1260 ns Iteration: 1 Instance: /testbench_svpwm/u/state # ** Warning: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es). # Time: 1380 ns Iteration: 1 Instance: /testbench_svpwm/u/state --- Quote End --- And when I run step by step my code, I saw, when this code was executed, the warning display. I don't know why this this warning display. Could you help me? This is my declare
use IEEE.std_logic_arith.all;
use IEEE.std_logic_signed.all;
signal TAA,TBB : STD_LOGIC_VECTOR(11 downto 0):=(others =>'0');
signal TAM : STD_LOGIC_VECTOR(11 downto 0):=(others =>'0');
signal TAO,TBO,TCO : STD_LOGIC_VECTOR(11 downto 0):=(others =>'0');
and this code has warning when i run it by modelsim
elsif CNT=x"08" then
TAM <= x"410" -TAA -TBB;
elsif CNT=x"09" then
TAO <= '0' & TAM(11 downto 1);
elsif CNT=x"0A" then
TBO <= TAO + TAA;
elsif CNT=x"0B" then
TCO <= TBO + TBB; ;
Thank you very much. Happy new year to all my best friend