chipsalliance / Surelog

SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler. Provides IEEE Design/TB C/C++ VPI and Python AST & UHDM APIs. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX
Apache License 2.0
366 stars 69 forks source link

New vpiParent visitor makes debugging impossible #3012

Closed alaindargelas closed 2 years ago

alaindargelas commented 2 years ago

With the new explicit visit of vpiParent, it becomes impossible to dump objects while debugging, the traces are showing large amount of object parent data which is typically useless to debug real problems. Please provide a way to disable visiting the parent by default when using UHDM::decompile and only dump the parent info with an explicit option.

Example of such a trace thet goes on and on about the parents.

decompile:
module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
|vpiParent:
\_module: work@r5p_core (work@r5p_soc_de0_cv.soc.core), id:25528, file:hdl/rtl/soc/r5p_soc_top.sv, line:88:1, endln:117:3
|vpiName:gpr
|vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr
|vpiVariables:
\_logic_var: (work@r5p_soc_de0_cv.soc.core.gpr.wen), id:21013, line:44:18, endln:44:21
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |vpiTypespec:
  \_logic_typespec: , id:21012, line:44:1, endln:44:6
  |vpiName:wen
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.wen
  |vpiVisibility:1
|vpiVariables:
\_logic_var: (work@r5p_soc_de0_cv.soc.core.gpr.t_rs1), id:21027, line:45:18, endln:45:23
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |vpiTypespec:
  \_logic_typespec: , id:21020, line:45:1, endln:45:17
    |vpiRange:
    \_range: , id:21014, line:45:7, endln:45:17
      |vpiLeftRange:
      \_constant: , id:21018, line:45:8, endln:45:12
        |vpiParent:
        \_range: , id:21014, line:45:7, endln:45:17
        |vpiDecompile:31
        |vpiSize:64
        |INT:31
        |vpiConstType:7
      |vpiRightRange:
      \_constant: , id:21019, line:45:15, endln:45:16
        |vpiParent:
        \_range: , id:21014, line:45:7, endln:45:17
        |vpiDecompile:0
        |vpiSize:64
        |UINT:0
        |vpiConstType:9
  |vpiName:t_rs1
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.t_rs1
  |vpiVisibility:1
  |vpiRange:
  \_range: , id:21021, line:45:7, endln:45:17
    |vpiLeftRange:
    \_constant: , id:21025, line:45:8, endln:45:12
      |vpiParent:
      \_range: , id:21021, line:45:7, endln:45:17
      |vpiDecompile:31
      |vpiSize:64
      |INT:31
      |vpiConstType:7
    |vpiRightRange:
    \_constant: , id:21026, line:45:15, endln:45:16
      |vpiParent:
      \_range: , id:21021, line:45:7, endln:45:17
      |vpiDecompile:0
      |vpiSize:64
      |UINT:0
      |vpiConstType:9
|vpiVariables:
\_logic_var: (work@r5p_soc_de0_cv.soc.core.gpr.t_rs2), id:21041, line:46:18, endln:46:23
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |vpiTypespec:
  \_logic_typespec: , id:21034, line:46:1, endln:46:17
    |vpiRange:
    \_range: , id:21028, line:46:7, endln:46:17
      |vpiLeftRange:
      \_constant: , id:21032, line:46:8, endln:46:12
        |vpiParent:
        \_range: , id:21028, line:46:7, endln:46:17
        |vpiDecompile:31
        |vpiSize:64
        |INT:31
        |vpiConstType:7
      |vpiRightRange:
      \_constant: , id:21033, line:46:15, endln:46:16
        |vpiParent:
        \_range: , id:21028, line:46:7, endln:46:17
        |vpiDecompile:0
        |vpiSize:64
        |UINT:0
        |vpiConstType:9
  |vpiName:t_rs2
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.t_rs2
  |vpiVisibility:1
  |vpiRange:
  \_range: , id:21035, line:46:7, endln:46:17
    |vpiLeftRange:
    \_constant: , id:21039, line:46:8, endln:46:12
      |vpiParent:
      \_range: , id:21035, line:46:7, endln:46:17
      |vpiDecompile:31
      |vpiSize:64
      |INT:31
      |vpiConstType:7
    |vpiRightRange:
    \_constant: , id:21040, line:46:15, endln:46:16
      |vpiParent:
      \_range: , id:21035, line:46:7, endln:46:17
      |vpiDecompile:0
      |vpiSize:64
      |UINT:0
      |vpiConstType:9
|vpiParameter:
\_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.AW), id:25679, line:20:16, endln:20:18
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |UINT:5
  |vpiTypespec:
  \_int_typespec: , id:25680, line:20:3, endln:20:15
    |vpiParent:
    \_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.AW), id:25679, line:20:16, endln:20:18
  |vpiName:AW
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.AW
|vpiParameter:
\_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.XLEN), id:25681, line:21:16, endln:21:20
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |UINT:32
  |vpiTypespec:
  \_int_typespec: , id:25682, line:21:3, endln:21:15
    |vpiParent:
    \_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.XLEN), id:25681, line:21:16, endln:21:20
  |vpiName:XLEN
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.XLEN
|vpiParameter:
\_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.WBYP), id:25683, line:22:16, endln:22:20
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |BIN:0
  |vpiTypespec:
  \_bit_typespec: , id:25684, line:22:3, endln:22:6
    |vpiParent:
    \_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.WBYP), id:25683, line:22:16, endln:22:20
  |vpiName:WBYP
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.WBYP
|vpiParameter:
\_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.CHIP), id:25685, line:24:16, endln:24:20
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |STRING:
  |vpiTypespec:
  \_string_typespec: , id:25686, line:24:3, endln:24:9
    |vpiParent:
    \_parameter: (work@r5p_soc_de0_cv.soc.core.gpr.CHIP), id:25685, line:24:16, endln:24:20
  |vpiName:CHIP
  |vpiFullName:work@r5p_soc_de0_cv.soc.core.gpr.CHIP
|vpiParamAssign:
\_param_assign: , id:17191, line:20:16, endln:20:24
  |vpiParent:
  \_module: work@r5p_gpr (work@r5p_soc_de0_cv.soc.core.gpr), id:25678, file:hdl/rtl/core/r5p_core.sv, line:286:1, endln:307:3
  |vpiOverriden:1
  |vpiRhs:
  \_operation: , id:15548, line:287:13, endln:287:36
    |vpiParent:
    \_operation: , id:15963, line:34:19, endln:34:23
    |vpiTypespec:
    \_int_typespec: , id:11323, line:20:3, endln:20:15
      |vpiParent:
      \_parameter: (work@r5p_gpr.AW), id:11324, line:20:16, endln:20:18
    |vpiOpType:32
    |vpiOperand:
    \_hier_path: (ISA.spec.base.E), id:15543, line:287:13, endln:287:28
      |vpiParent:
      \_operation: , id:15548, line:287:13, endln:287:36
      |vpiTypespec:
      \_struct_typespec: (riscv_isa_pkg::isa_t), id:14445, line:140:9, endln:140:15
        |vpiParent:
        \_parameter: (work@r5p_soc_de0_cv.soc.core.ISA), id:14444, line:36:9, endln:36:12
        |vpiName:riscv_isa_pkg::isa_t
        |vpiInstance:
        \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
        |vpiPacked:1
        |vpiTypespecMember:
        \_typespec_member: (spec), id:14446, line:141:14, endln:141:18
          |vpiParent:
          \_struct_typespec: (riscv_isa_pkg::isa_t), id:14445, line:140:9, endln:140:15
          |vpiName:spec
          |vpiTypespec:
          \_struct_typespec: (riscv_isa_pkg::isa_spec_t), id:14447, line:111:9, endln:111:15
            |vpiParent:
            \_typespec_member: (spec), id:14446, line:141:14, endln:141:18
            |vpiName:riscv_isa_pkg::isa_spec_t
            |vpiInstance:
            \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
            |vpiPacked:1
            |vpiTypespecMember:
            \_typespec_member: (base), id:14448, line:112:14, endln:112:18
              |vpiParent:
              \_struct_typespec: (riscv_isa_pkg::isa_spec_t), id:14447, line:111:9, endln:111:15
              |vpiName:base
              |vpiTypespec:
              \_struct_typespec: (riscv_isa_pkg::isa_base_t), id:14449, line:27:9, endln:27:15
                |vpiParent:
                \_typespec_member: (base), id:14448, line:112:14, endln:112:18
                |vpiName:riscv_isa_pkg::isa_base_t
                |vpiInstance:
                \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                |vpiPacked:1
                |vpiTypespecMember:
                \_typespec_member: (E), id:14450, line:28:7, endln:28:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_base_t), id:14449, line:27:9, endln:27:15
                  |vpiName:E
                  |vpiTypespec:
                  \_bit_typespec: , id:14451, line:28:3, endln:28:6
                    |vpiParent:
                    \_typespec_member: (E), id:14450, line:28:7, endln:28:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:28
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:28
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (W), id:14452, line:29:7, endln:29:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_base_t), id:14449, line:27:9, endln:27:15
                  |vpiName:W
                  |vpiTypespec:
                  \_bit_typespec: , id:14453, line:29:3, endln:29:6
                    |vpiParent:
                    \_typespec_member: (W), id:14452, line:29:7, endln:29:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:29
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:29
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (D), id:14454, line:30:7, endln:30:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_base_t), id:14449, line:27:9, endln:27:15
                  |vpiName:D
                  |vpiTypespec:
                  \_bit_typespec: , id:14455, line:30:3, endln:30:6
                    |vpiParent:
                    \_typespec_member: (D), id:14454, line:30:7, endln:30:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:30
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:30
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (Q), id:14456, line:31:7, endln:31:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_base_t), id:14449, line:27:9, endln:27:15
                  |vpiName:Q
                  |vpiTypespec:
                  \_bit_typespec: , id:14457, line:31:3, endln:31:6
                    |vpiParent:
                    \_typespec_member: (Q), id:14456, line:31:7, endln:31:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:31
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:31
                  |vpiRefEndColumnNo:6
              |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
              |vpiRefLineNo:112
              |vpiRefColumnNo:3
              |vpiRefEndLineNo:112
              |vpiRefEndColumnNo:13
            |vpiTypespecMember:
            \_typespec_member: (ext), id:14458, line:113:14, endln:113:17
              |vpiParent:
              \_struct_typespec: (riscv_isa_pkg::isa_spec_t), id:14447, line:111:9, endln:111:15
              |vpiName:ext
              |vpiTypespec:
              \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                |vpiParent:
                \_typespec_member: (ext), id:14458, line:113:14, endln:113:17
                |vpiName:riscv_isa_pkg::isa_ext_t
                |vpiInstance:
                \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                |vpiPacked:1
                |vpiTypespecMember:
                \_typespec_member: (M), id:14460, line:61:7, endln:61:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:M
                  |vpiTypespec:
                  \_bit_typespec: , id:14461, line:61:3, endln:61:6
                    |vpiParent:
                    \_typespec_member: (M), id:14460, line:61:7, endln:61:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:61
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:61
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (A), id:14462, line:62:7, endln:62:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:A
                  |vpiTypespec:
                  \_bit_typespec: , id:14463, line:62:3, endln:62:6
                    |vpiParent:
                    \_typespec_member: (A), id:14462, line:62:7, endln:62:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:62
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:62
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (F), id:14464, line:63:7, endln:63:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:F
                  |vpiTypespec:
                  \_bit_typespec: , id:14465, line:63:3, endln:63:6
                    |vpiParent:
                    \_typespec_member: (F), id:14464, line:63:7, endln:63:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:63
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:63
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (D), id:14466, line:64:7, endln:64:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:D
                  |vpiTypespec:
                  \_bit_typespec: , id:14467, line:64:3, endln:64:6
                    |vpiParent:
                    \_typespec_member: (D), id:14466, line:64:7, endln:64:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:64
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:64
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (Zicsr), id:14468, line:65:7, endln:65:12
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:Zicsr
                  |vpiTypespec:
                  \_bit_typespec: , id:14469, line:65:3, endln:65:6
                    |vpiParent:
                    \_typespec_member: (Zicsr), id:14468, line:65:7, endln:65:12
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:65
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:65
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (Zifencei), id:14470, line:66:7, endln:66:15
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:Zifencei
                  |vpiTypespec:
                  \_bit_typespec: , id:14471, line:66:3, endln:66:6
                    |vpiParent:
                    \_typespec_member: (Zifencei), id:14470, line:66:7, endln:66:15
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:66
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:66
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (Q), id:14472, line:67:7, endln:67:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:Q
                  |vpiTypespec:
                  \_bit_typespec: , id:14473, line:67:3, endln:67:6
                    |vpiParent:
                    \_typespec_member: (Q), id:14472, line:67:7, endln:67:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:67
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:67
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (L), id:14474, line:68:7, endln:68:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:L
                  |vpiTypespec:
                  \_bit_typespec: , id:14475, line:68:3, endln:68:6
                    |vpiParent:
                    \_typespec_member: (L), id:14474, line:68:7, endln:68:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:68
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:68
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (C), id:14476, line:69:7, endln:69:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:C
                  |vpiTypespec:
                  \_bit_typespec: , id:14477, line:69:3, endln:69:6
                    |vpiParent:
                    \_typespec_member: (C), id:14476, line:69:7, endln:69:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:69
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:69
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (B), id:14478, line:70:7, endln:70:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:B
                  |vpiTypespec:
                  \_bit_typespec: , id:14479, line:70:3, endln:70:6
                    |vpiParent:
                    \_typespec_member: (B), id:14478, line:70:7, endln:70:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:70
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:70
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (J), id:14480, line:71:7, endln:71:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:J
                  |vpiTypespec:
                  \_bit_typespec: , id:14481, line:71:3, endln:71:6
                    |vpiParent:
                    \_typespec_member: (J), id:14480, line:71:7, endln:71:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:71
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:71
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (T), id:14482, line:72:7, endln:72:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:T
                  |vpiTypespec:
                  \_bit_typespec: , id:14483, line:72:3, endln:72:6
                    |vpiParent:
                    \_typespec_member: (T), id:14482, line:72:7, endln:72:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:72
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:72
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (P), id:14484, line:73:7, endln:73:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:P
                  |vpiTypespec:
                  \_bit_typespec: , id:14485, line:73:3, endln:73:6
                    |vpiParent:
                    \_typespec_member: (P), id:14484, line:73:7, endln:73:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:73
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:73
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (V), id:14486, line:74:7, endln:74:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:V
                  |vpiTypespec:
                  \_bit_typespec: , id:14487, line:74:3, endln:74:6
                    |vpiParent:
                    \_typespec_member: (V), id:14486, line:74:7, endln:74:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:74
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:74
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (N), id:14488, line:75:7, endln:75:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:N
                  |vpiTypespec:
                  \_bit_typespec: , id:14489, line:75:3, endln:75:6
                    |vpiParent:
                    \_typespec_member: (N), id:14488, line:75:7, endln:75:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:75
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:75
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (H), id:14490, line:76:7, endln:76:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:H
                  |vpiTypespec:
                  \_bit_typespec: , id:14491, line:76:3, endln:76:6
                    |vpiParent:
                    \_typespec_member: (H), id:14490, line:76:7, endln:76:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:76
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:76
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (S), id:14492, line:77:7, endln:77:8
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:S
                  |vpiTypespec:
                  \_bit_typespec: , id:14493, line:77:3, endln:77:6
                    |vpiParent:
                    \_typespec_member: (S), id:14492, line:77:7, endln:77:8
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:77
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:77
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (Zam), id:14494, line:78:7, endln:78:10
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:Zam
                  |vpiTypespec:
                  \_bit_typespec: , id:14495, line:78:3, endln:78:6
                    |vpiParent:
                    \_typespec_member: (Zam), id:14494, line:78:7, endln:78:10
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:78
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:78
                  |vpiRefEndColumnNo:6
                |vpiTypespecMember:
                \_typespec_member: (Ztso), id:14496, line:79:7, endln:79:11
                  |vpiParent:
                  \_struct_typespec: (riscv_isa_pkg::isa_ext_t), id:14459, line:60:9, endln:60:15
                  |vpiName:Ztso
                  |vpiTypespec:
                  \_bit_typespec: , id:14497, line:79:3, endln:79:6
                    |vpiParent:
                    \_typespec_member: (Ztso), id:14496, line:79:7, endln:79:11
                    |vpiInstance:
                    \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
                  |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
                  |vpiRefLineNo:79
                  |vpiRefColumnNo:3
                  |vpiRefEndLineNo:79
                  |vpiRefEndColumnNo:6
              |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
              |vpiRefLineNo:113
              |vpiRefColumnNo:3
              |vpiRefEndLineNo:113
              |vpiRefEndColumnNo:12
          |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
          |vpiRefLineNo:141
          |vpiRefColumnNo:3
          |vpiRefEndLineNo:141
          |vpiRefEndColumnNo:13
        |vpiTypespecMember:
        \_typespec_member: (priv), id:14498, line:142:14, endln:142:18
          |vpiParent:
          \_struct_typespec: (riscv_isa_pkg::isa_t), id:14445, line:140:9, endln:140:15
          |vpiName:priv
          |vpiTypespec:
          \_struct_typespec: (riscv_isa_pkg::isa_priv_t), id:14499, line:44:9, endln:44:15
            |vpiParent:
            \_typespec_member: (priv), id:14498, line:142:14, endln:142:18
            |vpiName:riscv_isa_pkg::isa_priv_t
            |vpiInstance:
            \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
            |vpiPacked:1
            |vpiTypespecMember:
            \_typespec_member: (M), id:14500, line:45:7, endln:45:8
              |vpiParent:
              \_struct_typespec: (riscv_isa_pkg::isa_priv_t), id:14499, line:44:9, endln:44:15
              |vpiName:M
              |vpiTypespec:
              \_bit_typespec: , id:14501, line:45:3, endln:45:6
                |vpiParent:
                \_typespec_member: (M), id:14500, line:45:7, endln:45:8
                |vpiInstance:
                \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
              |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
              |vpiRefLineNo:45
              |vpiRefColumnNo:3
              |vpiRefEndLineNo:45
              |vpiRefEndColumnNo:6
            |vpiTypespecMember:
            \_typespec_member: (R), id:14502, line:46:7, endln:46:8
              |vpiParent:
              \_struct_typespec: (riscv_isa_pkg::isa_priv_t), id:14499, line:44:9, endln:44:15
              |vpiName:R
              |vpiTypespec:
              \_bit_typespec: , id:14503, line:46:3, endln:46:6
                |vpiParent:
                \_typespec_member: (R), id:14502, line:46:7, endln:46:8
                |vpiInstance:
                \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
              |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
              |vpiRefLineNo:46
              |vpiRefColumnNo:3
              |vpiRefEndLineNo:46
              |vpiRefEndColumnNo:6
            |vpiTypespecMember:
            \_typespec_member: (S), id:14504, line:47:7, endln:47:8
              |vpiParent:
              \_struct_typespec: (riscv_isa_pkg::isa_priv_t), id:14499, line:44:9, endln:44:15
              |vpiName:S
              |vpiTypespec:
              \_bit_typespec: , id:14505, line:47:3, endln:47:6
                |vpiParent:
                \_typespec_member: (S), id:14504, line:47:7, endln:47:8
                |vpiInstance:
                \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
              |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
              |vpiRefLineNo:47
              |vpiRefColumnNo:3
              |vpiRefEndLineNo:47
              |vpiRefEndColumnNo:6
            |vpiTypespecMember:
            \_typespec_member: (U), id:14506, line:48:7, endln:48:8
              |vpiParent:
              \_struct_typespec: (riscv_isa_pkg::isa_priv_t), id:14499, line:44:9, endln:44:15
              |vpiName:U
              |vpiTypespec:
              \_bit_typespec: , id:14507, line:48:3, endln:48:6
                |vpiParent:
                \_typespec_member: (U), id:14506, line:48:7, endln:48:8
                |vpiInstance:
                \_package: riscv_isa_pkg (riscv_isa_pkg::), id:0, file:hdl/rtl/riscv/riscv_isa_pkg.sv, line:19:1, endln:1046:26
              |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
              |vpiRefLineNo:48
              |vpiRefColumnNo:3
              |vpiRefEndLineNo:48
              |vpiRefEndColumnNo:6
          |vpiRefFile:hdl/rtl/riscv/riscv_isa_pkg.sv
          |vpiRefLineNo:142
          |vpiRefColumnNo:3
          |vpiRefEndLineNo:142
          |vpiRefEndColumnNo:13
      |vpiName:ISA.spec.base.E
      |vpiActual:
      \_ref_obj: (ISA), id:15544, line:287:13, endln:287:16
        |vpiParent:
        \_hier_path: (ISA.spec.base.E), id:15543, line:287:13, endln:287:28
        |vpiName:ISA
        |vpiActual:
        \_operation: , id:14508, line:91:10, endln:91:13
          |vpiParent:
          \_param_assign: , id:14436, line:36:9, endln:36:47
          |vpiTypespec:
          \_struct_typespec: (riscv_isa_pkg::isa_t), id:14509, line:140:9, endln:140:15
            |vpiParent:
            \_operation: , id:14508, line:91:10, endln:91:13
            |vpiName:riscv_isa_pkg::isa_t
            |vpiInstance:
     ......
hs-apotell commented 2 years ago

vpiParent visit is a shallow visit. I can add configuration options to the visit_object call but I am not sure what else I can do to improve debugging. This data in the logs has been very helpful in identifying problems.

Would configuration options to enable/disable the vpiParent visit help?

alaindargelas commented 2 years ago

I use heavily UHDM::decompile(any* object) during gdb sessions. If you can make that function only print the name and location of the parent and not go as far as it does, that will be perfect.

As you can see above, the traversal is not shallow.:

|vpiActual:
      \_ref_obj: (ISA), id:15544, line:287:13, endln:287:16
        |vpiParent:
        \_hier_path: (ISA.spec.base.E), id:15543, line:287:13, endln:287:28
        |vpiName:ISA
        |vpiActual:
        \_operation: , id:14508, line:91:10, endln:91:13
          |vpiParent:
          \_param_assign: , id:14436, line:36:9, endln:36:47
          |vpiTypespec:
          \_struct_typespec: (riscv_isa_pkg::isa_t), id:14509, line:140:9, endln:140:15
            |vpiParent:
            \_operation: , id:14508, line:91:10, endln:91:13
            |vpiName:riscv_isa_pkg::isa_t
            |vpiInstance:
alaindargelas commented 2 years ago

Fixed by #3015