In reply to ziggy:
You code comment say you have a run-time error, but your text says you have a compilation error. Also, you seem to be missing an
initial begin/end block. Please correct your post because it really matters to the question you are trying to ask.