Skip to content

test_pyverilator_finish_2_same_files fails #6

Open
@acw1251

Description

@acw1251

The test test_pyverilator_finish_2_same_files (https://github.com/csail-csg/pyverilator/blob/master/pyverilator/tests/test_pyverilator.py#L633-L692)
fails because sim_1 and sim_2 both load the same shared object and the verilator gotFinish uses a global variable to track if the simulator has finished. Once one finishes, both sims see gotFinish to be true.

There are three possible solutions:

  1. Produce uniquely named so files for each sim
  2. Make copies of so files whenever they are opened.
  3. Use dlmopen to open a copy of the shared object (see the dlmopen branch https://github.com/csail-csg/pyverilator/tree/dlmopen)

I got the dlmopen solution working, but its messy, and I don't know if it will work on other machines. I'll think about this problem more before making any changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions