Can any one tell me. what this constraint means? Especially why they have used 32’h7fffffff just to constraint single bit
rand bit[3:0] eg_tx_stop_gpio_en;
// Default constraints: disable port stop feature
constraint c_eg_tx_stop_gpio_en_0 { eg_tx_stop_gpio_en[0] dist { 0:=32'h7fffffff, 1:=1 }; }
In reply to manavshah33:
This seems to be an attempt to make a soft constraint - a constraint that can be overridden by another conflicting constraint. 32’h7fffffff is the largest positive 32-bit integer and is being use as weight to the value 0. (The LRM never defines the type of the weight expression) This can be re-written
constraint c_eg_tx_stop_gpio_en_0 { soft eg_tx_stop_gpio_en[0] == 0 ; }