UVM randomization dilemma

In reply to salmanepos:

I would try to break the problem down into some kind of recursive data structure. I would try to model instructions as a stream of “code chunks” (for lack of a better term). These code chunks can either be wrapped in loops or not. Code chunks themselves can either contain other code chunks or they can only contain raw (non-looping) instructions. This type of description is similar to a BNF. You might already have a similar description for your “stream” in your design specification.

I’m not really sure yet how to model this using classes.