It seems that you forget to add timescale in your file.
`timescale 1ns / 10ps
add this to the first line of your code