Halona
Halona

Reputation: 1485

Specman reflection: How to get the value of simple port, when its name is given as a string?

I need to get the value of a simple port, while the only information I have is the port's name (as a string). Something like this:

my_meth(port_type : string) is { //e.g.: port_type = "signal_map.some_port$"
    var rf_port_val : rf_value_holder = rf_manager..??? //How to get port's value by its name using port_type?

    // do something...
};

How can it be done? In addition, I could not find any useful documentation about Specman reflection, may be you can refer me to such? Thank you for any help.

Upvotes: 2

Views: 448

Answers (2)

Thorsten
Thorsten

Reputation: 700

I cannot answer this directly, but can you not solve this easier by using a macro? Such as

define <my_meth'exp> "my_meth\(<any>\)" as {
  <any>
};

Upvotes: 0

Ynon Cohen
Ynon Cohen

Reputation: 141

You can find information about reflection in the documentation. In your prompt, you can run "cdnshelp" to reach the docs. From there, you can search for "Reflection Interface" or "rf_manager" to reach the documentation about the reflection facility in e. The specific path is under Incisive Enterprise Simulator --> Specman Functional Verification --> Creating e testbenches --> 15. Reflection Interface for e.

In addition, there is a handy set of HTML files with "edoc" documentation of the API under --> (installation root)/specman/docs/reflection_api_edoc/index.html This contains a handy API reference for the different reflection structs.

Upvotes: 1

Related Questions