1
votes

What is the different between num() and size() methods in systemverilog associative arrays. LRM does not seem to specify any distinction.

From LRM:

The num() and size() methods return the number of entries in the associative array. If the array is empty, they return 0.

1

1 Answers

2
votes

There is no difference - it's just historical features from different languages. I prefer using size()