I don’t really know System Verilog, but it looks to me like you’ve got an IF statement embedded in an assignment statement (line 1135); maybe that works in SV, but it looks like a mess to me. Maybe that’s causing an error? I’m just having a hard time following your code.