Cosimulation with verilator?

I’ve created a pull request to add verilator as a means for cosimulation.
See https://github.com/joshuisken/myhdl, branch verilator.
I used ‘pyverilator’ to ease integration. It is a specific version https://github.com/csail-csg/pyverilator which allows easy dictionary access to io-ports.
No interprocess communication is used since the verilated design is imported as a ctypes module.

Not much testing has been done, but few tests have been added.

What I noticed is that both this verilator cosim, but also other cosims like icarus, have some initialization/reset issues which deserve some attention. They behave slightly different than pure myhdl.

Also, I considered to not use pyverilator and rewrite directly for verilator directly, but with this pyverilator version it was more convenient. but anyway, something to reconsider.

I have no performance numbers yet so I’m interested in your experience. Of course there is always room improvement. Also bug reports are welcome, if any.

Thanks,
Jos