Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stability Check Error after 42 s #636

Closed
ghost opened this issue Mar 26, 2020 · 4 comments
Closed

Stability Check Error after 42 s #636

ghost opened this issue Mar 26, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 26, 2020

In a project I have some test that run 1min in simulation time with signals that needs to be stable this long. For this I use the check_stable() function. The clock of the simulation is 50MHz.
After round about 42s of simulation time the simulation aborts with the following error:

RUNTIME: Fatal Error: RUNTIME_0043 check.vhd (848): Value -2147483648 out of range (0 to 2147483647)

check.vhd line 848

It seams the code uses a clock count which overrun.

The current workaround is to end the first stability check at 30s and start a new one 2 clock cycle later.

Simulator: Aldec Active-HDL 9.2 (sadly i cannot use a newer Version)

@eine
Copy link
Collaborator

eine commented Mar 26, 2020

Since integers are limited to 32 bits, I guess this could be fixed by extending the counter to build a 64-bit one from chaining two 32-bit signals/variables. However, it would require to define comparison, addition, etc. https://github.com/VUnit/vunit/pull/568/files#diff-8409a338796aa7c3979226d3d5e256ea seems to be a similar solution (for a different use case). Maybe a general enough "64-bit integer type" can be hosted somewhere. It might also be available already, although I am not aware.

@LarsAsplund
Copy link
Collaborator

We could simply use a 64-bit unsigned to extend that range.

@LarsAsplund
Copy link
Collaborator

@jonasexpleo I made a commit on a branch but I wasn't able to easily create a test since it takes "forever" to get to the 31 bit limit. Better that you review the fix and test on you original problem.

@ghost
Copy link
Author

ghost commented Apr 20, 2020

I know what you mean with it takes "forever". The test took nearly an hour, but with the branch update_check_stable it worked. Thank you.

@eine eine closed this as completed in 89957a9 Apr 20, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants