AsFigo / pyslint

SystemVerilog Linter based on pyslang
MIT License
21 stars 22 forks source link

COMPAT: SVA local var init missing #186

Open svenka3 opened 9 months ago

svenka3 commented 9 months ago

https://verificationacademy.com/forums/t/requirement-to-initialize-dynamic-variables-within-property-sequence/46052


module top;

  bit clk , s1 , s2 ;

  property p_bad(s1, s2, len);
   int v_cnt;//=0; // Must be initialized !!
    (s1, v_cnt++)  |=> s2;
  endproperty

  property p_ok(s1, s2, len);
   int v_cnt =0; // Must be initialized !!
    (s1, v_cnt++)  |=> s2;
  endproperty

endmodule