I work with many sets to generate limited random traffic, but I want to be able to call the Specman macro, which computes the complement to the set with syntax like:
COMPLEMENT begin domain=[0..10,24..30], complementing_set=[2..3,27..30] end
and make it generate:
[0..1,4..10,24..26]
Every time I need a complement to a set, I use completely filled lists (for example, {0; 1; 2; 3 ....}) and then delete the elements, instead of using the int_range_list Specman built-in object. And I also do a lot of these given calculations at runtime, and not at compile time.
source share