Sameer Kher
New Member
Offline
Posts: 5
|
Hello,
You could write a function to perform division and check for division by zero in the function. You should be able to do something like this to save you some time - function "/" (NUM: REAL; DEN: REAL) return REAL
Alternatively, consider using the assert statement in VHDL-AMS to check if the divisor is zero. assert (div = 0) report "Division by zero" severity error; You would have to do this for every division in you model.
Also, check if the simulator provides any debug message about where or what quantity the division by zero occurs on. In some cases, this might be simply due to non-initialization of quantities leading to a divide by zero in the first NR iteration.
Hope this helps, Sameer
|