This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dealing with Inout Ports - design and testbench writing

My design requires me to multiplex one single databus that takes care of reading and writing, into two separate buses for reading and writing each. 

For this, I've included an in-out port, then tried to multiplex it into two different ports depending on control signals. 

This doesn't seem to work perfectly in the simulations, though I couldnt spot any mistakes in my code.

Also, I am facing trouble with writing a testbench for a design with inout ports. How to assign values and also read from the same port in testbench?