Hi,

I have found my bug.
I cannot send you my design, but I have attached a small wrong design that has the same bug that I found, and that generates such an error message. Apparently such error messages appear when playing too much with to_integer() and when mixing signed and unsigned values. I am not sure exactly.

BTW, I am using GHDL version 0.25 (20060811).

Regards,

--
Romain Lenglet

Tristan Gingold wrote:
On Tue, Feb 06, 2007 at 11:13:00AM +0900, Romain Lenglet wrote:
Hello,

Sometimes I get messages like "error: bound check failed (#11)", with no spec file line. Not having the line of the array assignment makes it really difficult to debug my spec.
Yes, these messages are not that useful!

In which cases cannot the program/GHDL compiler determine and give the line number of a faulty array assignment? Knowing in which cases this happens would help me a lot narrowing down the assignments to check.
Running under gdb may help.
Also, I am trying to add error line to such message.  If you can, please send
me your design so that I could improve error messages on it.

Tristan.

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity foo is
  
end entity foo;

architecture behavioral of foo is

  signal crc_in     : unsigned(31 downto 0) := (others => '1');
  signal crc_out    : unsigned(31 downto 0);
  signal sample_in  : signed(15 downto 0)   := signed'("0000000000000010");
  signal sample_out : signed(15 downto 0)   := signed'("0000000000000010");
  
begin  -- behavioral

  process is
    variable temp_crc : unsigned(31 downto 0);
  begin

    temp_crc := resize(crc_in * 3, 32);
    temp_crc := unsigned(to_integer(temp_crc) + sample_in);
    crc_out <= temp_crc;
    
    wait;

  end process;

end architecture behavioral;
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to