In reply to Pavel:
No. The problem is that you don’t handle ARESETN anywhere in com_tb_int_in. I’m guessing that you use it somewhere else that isn’t shown which is preventing the signals from being driven correctly and is conflicting with the while() loop.