Hello everyone,
I am new to this tool and I am not sure if I am missing something but it seems that there is a bug in the tool. I have written the following C code and I used Panda to generate a vhdl file for it.
The C code is as following:
int mix (int x, int sel, int y, int z)
{
int z10;
if (sel == 0)
{z10=x+y;}
else if (sel == 1)
{z10=x+y+x+z;}
else if (sel == 2)
{z10=x-y;}
else if (sel == 3)
{z10=x*z;} // try else if
else if (sel == 4)
{z10=x+2*y;}
else if (sel == 5)
{z10=x;}
return z10;
}
The property for the vhdl file is as following:
property mix is
dependencies: no_reset;
for timepoints:
t_end = t+0;
assume:
at t: x = 10;
at t: y = 2;
at t: z = 9;
at t: sel = 1;
prove:
at t_end: return_port = x+y+x+z;
end property;
The problem is, whenever I write a property to verify the behavior of the generated vhdl file, I check the return port in the vhdl file. The return port always return the value of x*z which is the condition if sel == 3, even if I changed the value of sel in my property and I made it 0 or 1 for example, I should get either x+y or x+y+x+z in the return port. But this does not happen, I always get the value of x*z. On the other hand, whenever I change x*z to x+z in my C code, the whole program works completely fine, so it seems that the problem is in the multiplication operation. I would appreciate it if someone could give me some feedback regarding this.