The Humble Beginnings of a SystemVerilog Reflection API, Part 3

We've already looked at how to interrogate classes about what variables they have and how to set and get the values of these variables in different instances. Classes are much more than just data containers, though. They also contain methods that can operate on their variables. In this post we'll look at how we can handle tasks and functions inside our reflection API.

This is a companion discussion topic for the original entry at

How about call the function via SV-DPI?

That means that you have to export a certain function to be able to call it from C. This is intervention from the user, which is not reflection. Instead of doing this, you’d just rather call the function directly.

What I want is, given any object, of any class, to be able to figure out what methods it has and be able to call those without having to do know in advance what that class provides.