in this mdio signal is inout. this mdio signal in mdio_if i have to use in in1 agent and in2 agent.and also what ever chages for mdio in in1 and in2 should reflect to in0. to get this functionality how to do. please give me any suggestion.
There is no limitation to use a signal in more than 1 interface. But you have to take care to use in this case a wire.
BTW from your toplevel module I do not see any need for your phy_if. What are they doing? Is this only the interrupt handling?
thanks for your reply.
yes for intrrupt handling purpose only.
that mdio signals will read and write happening in mdio agent only but i want to use read and write mdio in phy related agents also. i will do some process in that agents that result i have to drive again to mdio. for that how to do.
It might be a challenge to synchronize the write to mdio from 3 different sources.
Could you please post some more code like the interface description for mdio_if and phy_if. What is mdc?
phy_mdc also one clock generated by the dut. actually my requirement is am having one set of phy_mdio and phy_mdc, with single set. I have to choose one phy from the 2 phys. This single mdio should share between two phys. to get this functionality am trying like this
this mdio and mdc am taking in one interface mdio_if and remining phy related signals am taking in another interface phy_if.
interface mdio_if (input bit phy_mdc,clk);
wire phy_mdio;
bit phy_rst_n;
endinterface
interface phy_if (input bit phy_mdc,clk_p);
bit phy_intr;
bit phy_rst_n;
wire phy_mdio;
eninterface
I do not understand why you need 3 interfaces and corresponding agents. I believe the most simple solution is to have 1 interface and 1 agent only, because the phys are only reacting on the interrupts.
Yes, this is as would do it. Then you have to define your interrupt sequences. If the interrupt happens. You have to stop the current sequence processing and run the interupt sequence. Afterwards you can continue.