Functions in Constraints

In reply to adityatumsare:

A function call inside the constraint breaks it into half. What seems to be happening is the inputs to the function call are solved before actually calling the function,then the result of the function is used to solve the rest of the constraint.

Instead of using function , The following constraint code should work :-

constraint end_addr_c {
(start_addr<0) → (e_addr==0);
(start_addr>=0) → (e_addr!=0 && (e_addr==start_addr));
};