Sequence with argument

Hi,

I’ve a question regarding sequence with argument, I was wondering is it possible for me to code something like this?

sequence seq1(a,b)
posedge(clk)
(reg_a == a) && (reg_b == b);
endsequence

sequence seq2(c,d)
posedge(clk)
(reg_c == c) && (reg_d == d);
endsequence

sequence seq_combi(i)
posedge(clk)
seq1(i+1, 2) and
seq1(i+2, 4) and
seq1(i+5, 7)
endsequence

The answer is yes, you can use sequences with parameters in that way.

However, the seq_combi sequence can never hold since it is expecting reg_a to have multiple values.

Yes, it is possible to code like this but sequence “seq_combi” will never become true because @(posedge clk) reg_a will hold only one value