I understand what you were talking about, but I didn't understand how that was going to change anything in my problem.
mdio_proc1 and mdio_proc2 are the I/O bidirectional pins in the top module.
I want mdio_proc1 and mdio_proc2 to behave like mdio_bus when it is selected.
For example:
The pre existing code only had the capabilities of one master in the system, therefore mdio_proc1 looked like below. This statement says:
if direction is towards the Slave devices from the processor than release the bidirectional I/O. Else if Direction from the slave to the processor than either the output will be pulled up or driven to '0'.
mdio_proc1 <= 'Z' when (direction = '0' or mdio_device_data = '1') else '0';
Now attached to my FPGA is another master.
The slave devices can only be controlled by proc1 or proc2. Therefore I want to add a mux to select who controls the bus, but I still want the bus to act the same.
For simplicity:
with control select
mdio_proc1 <= Normal operation as before when '0',
'Z' when others;
Now my problem is how can I force it to normal operation within the with select or another method.
The only thing I can think of now is adding Direction and Device data into my mux select and making it like:
with direction & mdio_device_data & control select
mdio_proc1 <= '0' when "100",
'Z' when others;
mdio_proc2 would look like:
with direction & mdio_device_data & control select
mdio_proc2 <= '0' when "101",
'Z' when others;