Functions and tasks in System verilog | Part 2 | Static & automatic functions |

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ •

  • @prabhakarkumar8667
    @prabhakarkumar8667 11 місяців тому +3

    Keep rising 😊

  • @Shamitha.N
    @Shamitha.N 4 місяці тому +1

    Thank you so much mam. Very well explained.

  • @ChiragHadiya
    @ChiragHadiya 9 місяців тому +1

    Ma'am Can we say automatic and dymanic is same ?

    • @susheelapatagar
      @susheelapatagar  8 місяців тому

      No their behaviour may look like same but it is not.
      There are actually three kinds of storage categories; static, automatic, and dynamic.
      Static and automatic storage are part of the declaration of a variable of any type. Automatic variables get allocated and initialized when entering a procedural scope like a task or function and they get deallocated when exiting the scope.
      Dynamic storage is associated with the variable’s type. You can procedurally change the size of an array, queue, or string, as well as construct a class object as any time.

  • @naveenchakali280
    @naveenchakali280 4 місяці тому +1

    mam explain how to access the automatic ,,, increment_static.count_b

    • @susheelapatagar
      @susheelapatagar  4 місяці тому

      Generally, we can't access local variables outside their function or task directly. However, if the variable is static, as explained in the video, it can be accessed.
      For automatic variables, hierarchical references are not allowed. To work around this, you can declare a variable in the module (outside the function/task) and assign the local automatic variable to this module-level variable inside the function/task. This way, when you need to print or use the variable outside the function/task, you can simply use that module variable.

    • @naveenchakali280
      @naveenchakali280 4 місяці тому +1

      Thankyou mam

  • @shaikfaheed7353
    @shaikfaheed7353 5 місяців тому +1

    We_Lsi verify