Reply To: Ordre of stimulus
In the future, please start a new question for a new question.
AddCross adds items to the coverage model, so you need to do this before generating values. If you do additional AddCross, that simply adds to the coverage model – even in this case when they are redundant.
The call to “ICover(ID)” requires a parameter such as “ICover(ID, comb)”.
Also, I no longer recommend the while loop for this application. It can lead to trouble if the coverage definition is done by a process that is separate from the stimulus generation. Instead, I recommend that everyone uses a repeat until style loop (by using an exit condition at the end of the loop).
process variable comb : integer_vector(1 downto 0); begin AddCross(ID,4, GenBin(1), GenBin(0,3)); loop comb := GetRandPoint (ID); Icover(id, comb); exit when IsCovered (ID) ; end loop ;