In reply to dave_59:
Hi Dave, Thanks for reply, I will keep in mind for next timess…
I think I was not clear on my 3rd requirenment.
Anywhere in my instruction list, I can have SUB operation only if there wasn’t SUB instruction in previous 3 valid instructions.
If there is NOP instruction, consider it as you did’t have any operation/ that place in list is empty
So question is how do i create constraint/ do any post randomization check/edit for sub operations ? NOP can come any number of times. But I need to keep track of last 3 valid instructions and if SUB was not one of them, then only I can have SUB operation.
***************************** list = '{MUL, ADD, NOP, SUB, SUB, ADD, MUL, SUB, SUB, SUB, SUB, ADD, SUB, SUB, MUL, SUB, NOP, ADD, ADD, NOP} ****************************************
V V V,1st V,2nd
X - Should not come here since before this SUB instruction, last 3 valid instructions were MUL, ADD, SUB
Ex (invalid case):
ADD, MUL, SUB, NOP, NOP, NOP, NOP, NOP, NOP, SUB, NOP . . . .
V V V,1st V,2nd
X - Should not come here since last 3 valid instructions were ADD, MUL, SUB
Ex (valid case):
ADD, MUL, SUB, NOP, ADD, NOP, MUL, NOP, ADD, SUB, NOP . . . .
V V V,1st V V V V,2nd
Correct - since last 3 valid instructions were ADD, MUL, ADD