chipsalliance / UHDM

Universal Hardware Data Model. A complete modeling of the IEEE SystemVerilog Object Model with VPI Interface, Elaborator, Serialization, Visitor and Listener. Used as a compiled interchange format in between SystemVerilog tools. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Most classes have a get_vpiParent(). Does it make sense to put this in some base class ?

hzeller opened this issue · comments

(I might be ignorant of details, so take this with a grain of salt).

Many objects have a get_vpiParent(). Would it make sense to have a virtual implementation either in BaseClass (or maybe have some other intermediate type BaseClass <- ClassWithParent ?)

In vpi_user.cpp, there is a lot of type-casting just to call get_vpiParent() ... this all could be avoided if this was a genuine function in some base class.