Surelog: UHDM::ref_obj - missing reference?
Why doesn’t UHDM::ref_obj include a reference to the UHDM::any that it refers to?
When walking the tree using UHDM (or vpi), we encounter, say an assignment statement like in the snippet below, The UHDM::assignment includes references to both operands LHS and RHS as UHDM::ref_obj instances. However, the references are merely names and not references to the modules parameters or local variables.
Am I missing something here or is this the expected behavior? If latter, then how are names to be de-referenced to get the UHDM::any reference?
Below is a snippet from log https://github.com/alainmarcel/Surelog/blob/master/tests/FSMBsp13/FSMBsp13.log
\_assignment: , line:16
|vpiBlocking:1
|vpiLhs:
\_ref_obj: (CurState) <= Shouldn't these ref_obj(s) also include a reference to the module/local variable/parameter???
|vpiName:CurState
|vpiRhs:
\_ref_obj: (ST_Read)
|vpiName:ST_Read
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20
Some facts that should remove the confusion:
SystemVerilog attributes (* Synopsys synthesis off/on *) were added to the language to make it cleaner than just plain comments like // Synopsys translate off and be attached (per standard following a strict BNF semantic) to a limited set of objects in the Data Model, attribute contents do not follow a standard themselves
Pragma pre-processors directives ie:
expand_vectornets ,protect (from the original Verilog language) have a limited usage but which still fit in the Verilog writer use case and are essentially dealt with at the preprocessor stage and are not query-able in the Data Model itself, they tend to be used in different compiler stages and get lost in translation.Client code needs to annotate potentially all the objects in the Data Model (depending on the application) with arbitrary internal data structures. Attributes are supposed to be attached only to a subset of all the objects classes in the Data Model with a limited set a data, basically what the VPI value object can contain (a union of string, int, real), it just does not fit the bill for most custom data structures.
I’ll be adding the “attributes”, the ID and type safe pointer, they all fit different needs.