why 'payloadsegment' is not a legal c identifier name,but payloadseqment_0_ ?! in UVM Simulator Specific Issues Posted March 19, 2014 · Report reply You have a real error -- from the printout. It looks like you have a mis-spelling somewhere, although the error is not indicative of what is wrong. 1. How have you defined your payload??? From the output it looks like you defined something payloadseqment. (seqment) NOT payloadsegment (segment). 2. The foreach look correct. I would further debug this and see how you defined payloadse?ment. Probably when you define the payload -- you spelled it as payloadseqment not payloadsegment and it is an array  -- that is why you see the individual elements in the sequence. I am not sure -- why you did not receive a compile error.