Skip to content

Python calling SV export fails #39

Description

@openpowerwtf

I'm trying to get a simple test working in VCS; SV can call Python, but Python call to SV fails.

UVM_INFO top.sv(135) @ 0: reporter [top] SV: pysv_init_export_scope()
UVM_INFO top.sv(137) @ 0: reporter [top] SV: hello()
SV->PY: hello!
UVM_INFO top.sv(139) @ 0: reporter [top] SV: echo(10)=         20
UVM_INFO top.sv(140) @ 0: reporter [top] SV: test(20)
PY->SV: Calling echo(20)...
terminate called after throwing an instance of 'pybind11::error_already_set'
  what():  NameError: name 'echo' is not defined

At:
  <string>(5): test
  <string>(7): <module>

I get the same error without calling pysv_init_export_scope(). I call compile_lib() and generate_sv_binding(). Are there any differences in the build or in setting up the sim when using exported functions?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions