In reply to dave_59:
If the display is wrong, How do I check whether processor finished or not instead of $display?