Hi, When I use
constraint c_state == const'(state) +1;
in sequence_item the value gives undefined. However when I use
constraint c_state { state == 1;}
it gives 1 or which value I wrote there. What is the way that I can increase the value of state 1.
class alu_sequence_item extends uvm_sequence_item;
`uvm_object_utils(alu_sequence_item)
rand logic i_rst;
rand logic [15:0] i_memData;
logic [15:0] o_memData; //output
logic [5:0] o_memAddr; //output
bit o_memWrEnable; // output
rand logic [1:0] state;
constraint c_state { state == 1;} //Here is the problem
function new(string name = "alu_sequence_item");
super.new(name);
endfunction: new
endclass: alu_sequence_item
I have checked using uvminfo if there is a problem in my interface or sequence but no if I dont write any constrait then it generates random 2 bit values in scoreboard.
I need help to increase it one every clock cycle. Thank you.