Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure how you'd do this unless you somehow have the collection of all the fields, which would give you the <em>name</em> of all the fields.</p> <p>So, I'm going to branch predict and assume that you want all the <em>fields</em> of a given <code>struct/unit</code>:</p> <pre><code>extend sys { A : list of uint; B : int; cee : string; run() is also { var rf_sys: rf_struct = rf_manager.get_exact_subtype_of_instance(sys); for each (field) in rf_sys.get_declared_fields() { print field; print field.get_long_name(); // &lt;-- Here's your "get_name()" function }; }; }; </code></pre> <p>On version 8.2, this yields:</p> <pre><code>Usage: . env.sh [-32bit|-64bit] [-v] [[VAR=value]...] Welcome to Specman Elite(64) (09.20.482-d) - Linked on Wed Mar 2 13:32:19 2011 Protected by U.S. Patents 6,141,630 ;6,182,258; 6,219,809; 6,347,388; 6,487,704; 6,499,132; 6,502,232; 6,519,727; 6,530,054; 6,675,138; 6,684,359; 6,687,662; 6,907,599; 6,918,076; 6,920,583; Other Patents Pending. 1 notification was modified by command 'set notify -severity=WARNING DEPR_START_TCM_ARG_BY_REF' Checking license ... OK Loading /nfs/pdx/home/rbroger1/tmp.e ... read...parse...update...patch...h code...code...clean...GC(sys)... Doing setup ... Generating the test using seed 1... Starting the test ... Running the test ... field = rf_field 'time', Specman's private modules field.get_long_name() = "time" field = rf_field 'logger', Specman's private modules field.get_long_name() = "logger" field = rf_field 'A', line 5 in @tmp field.get_long_name() = "A" field = rf_field 'B', line 6 in @tmp field.get_long_name() = "B" field = rf_field 'cee', line 7 in @tmp field.get_long_name() = "cee" No actual running requested. Checking the test ... Checking is complete - 0 DUT errors, 0 DUT warnings. </code></pre> <p>If that doesn't quite answer your question, look more into Specman's introspection or reflection interface in the documentation for your version of Specman. Warning, details are a bit scarce from Cadence. Also, <a href="https://stackoverflow.com/questions/3331627/specman-how-to-retrieve-values-of-var-which-is-stored-in-another-var/3338870#3338870">see my answer to "Specman: how to retrieve values of var which is stored in another var".</a>. Finally, in <code>specview</code> you can use the data browser to browse the <code>rf_manger</code> <em>itself</em> ( introspection at its best). Then you can find all the functions that Cadence <em>doesn't</em> tell you about in their documentation.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload