Hello friends,
I want to use inout declaration in my code. but it gives the error that port is not a legal value. i use it into the always block both as a input & output.
code is:
The code is syntactical correct when you specify reg d and omit reg b.
However, reading the from bidirectional pin requires setting the output to 'Z' before.
thank you for your help....
i am also facing problem to write the test bsnch of the above code. it give me error on declaration of inout port type ( reg or wire). if i am taking reg it gives eroor " net is not a legal value".
and when i take it as a wire it does take any input from it................
please help me.........
From my experience, i never use directly inout port, bidirectional data port fall in either 1 of 2 categories : (1) Digital feedback or (2) Interconnections. In both 2 case you can convert the bidirectional data port into uni-directional data port. Say 1 inout port can be seperated into 2 unidirectional dta ports, 1 input and 1 output port. The bidirection is applied when you manually port map these 2 ports together...