STATIC and AUTOMATIC Lifetime:
In short: In SystemVerilog, a variable’s lifetime decides when its memory is created and freed. A static variable is created once and lives until the simulation ends, so every call shares the same copy. An automatic variable lives on the stack: a fresh copy is made each time you enter the task, function, or block,…
