SystemVerilog Classes 5: Polymorphism

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 5

  • @AxElKo440
    @AxElKo440 5 лет назад +2

    Awesome series for repeating basic concepts. Good job

  • @abletangdkable
    @abletangdkable 2 года назад +1

    short, clear,accurate~!

  • @poojavs8634
    @poojavs8634 5 лет назад

    good explantion. very good job

  • @VikramBamel
    @VikramBamel 3 года назад

    Instead of recovering the sf object back from parent class, why not just use the already existing sf handle? Or, why not just copy sf handle to sf2? What’s the real advantage of casting here?

    • @naman-sharma
      @naman-sharma 2 года назад

      As mentioned in the later part of the video, casting is useful when we have various subclasses that inherit from the same parent class. For example, when we dynamically allocate a subclass instance in parent class handle array, we store different subclass instance in the parent class handle and then use cast to detect later in the code which subclass instance is stored in the parent handle. This is just one of the examples.