See my DVCon paper about connecting bidirectional signals to the testebench:
https://verificationacademy.com/resources/technical-papers/the-missing-link-the-testbench-to-dut-connection