On Fri, 2013-04-26 at 17:47 +0100, Brian Drummond wrote: > On Fri, 2013-04-26 at 17:41 +0200, Jean-Christophe Le Lann wrote: > > Hi all ! > > > > I hit a bug in an old version of GHDL : > > GHDL 0.29 (20100109) [Sokcho edition] > > Compiled with GNAT Version: 4.6
> > constant N : natural := 8; > > variable n : natural := 0; > > n := (n+1) rem N; -- SIGFPE error. It puzzled me why the error produced was an FPE for a while. However given the initial value of n=0, this is equivalent to n := (expr) rem 0; which is a common or garden divide by zero error. And cross-checking with Xilinx ISIM, it reports: ERROR: at 0 ps: rem 0 asked for. Divide by zero error. ERROR: In process testcase.vhd:stimuli Therefore ghdl's behaviour is entirely correct : the most we could ask is to improve the runtime error message from "Floating point exception" to hint at a possible (probable?) divide by zero error. - Brian _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
