The providers for the analysis port end up inside an associative array of strings when you call connect()
. When doing a foreach
on it (see resolve_bindings()
), you will get the items in lexicographical order. This only works due to the current implementation of UVM; a future implementation may decide to use associative arrays of objects, for which there is no ordering defined.
The main idea behind analysis ports is that they needn't be connected. This means that each subscriber is supposed to be totally independent of any other subscribers connected to that port so you can't rely on any ordering.
If you want to make sure that your writes get executed in a specific order you should enforce it via your testbench structure: either have a top level scoreboard that is connected to your AP which delegates the calls in the specific order or chain together your scoreboards so that scoreboard1 does it's thing and then writes to scoreboard2, which does it's thing then writes to scoreboard3.