NULL pointer dereference

In reply to yguo:

The assigns in your interface definition are looking strange. I do not understand what you are doing there.
It would be helpful to see the toplevel module.
And finally you should replace the main_phase with run_phase in your test definition.