Variable delay element
The problem is with the ns, which is a units indicator used only when specifying a literal time. You can't use it after a variable name. Change that line to:

out_delay &lt;= in_delay after k;


BTW, this sort of statement is fine as part of, say, a simulation testbench, but any statement that includes an after clause cannot be synthesized into real hardware.