- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In vhdl can we make an pin declared as "inout" to act as input or as output depending on certain condition. entity rout is port( a : inout bit; b : inout bit; ); end rout; i want "b" to act as output when a is input, and "a" as output when "b" is input. I am using altera quartus 2 9.0 and i am getting this warning. "Warning: The following nodes have both tri-state and non-tri-state drivers Warning: Inserted always-enabled tri-state buffer between "a" and its non-tri-state driver. Warning: Inserted always-enabled tri-state buffer between "b" and its non-tri-state driver." what can i do to overcome this warning. It may sound silly but i am a beginner and i need some help in this regard.Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need a control input, try this(you also need std_logic type instead of bit)
b <= a when ctrl = '0' else ''Z'; a <= 'Z' when ctrl = '0' else b;- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the replay it was useful..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can this warning including "both tri-state and non-tri-state drivers" affect anything?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It tells you that you have asked for an io tristate but you are not using it.
So you must either use it or lose it. If you want it but it is not implemented then contention is inevitable...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! But i am wondering it will disappear if I use a symbol 'Z' to assign it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By applying 'Z' you are telling the synthesis tool to use the io tristate buffer located just behind the pin for. It means you - the designer - are going to output from fpga(apply your drive) but at times you want the drive to be from outside(input) in which case the tristate will cut-off your internal drive.
For the above example: a is driven from outside(input) then it drives b(output) when ctrl = '0' else b is driven from outside(input) then it drives a(output now). If the tool doesn't see this two drive case it will permanently enable the tristate buffer(output only) and then inout port is obsolete. If you apply 'Z' to internal nodes(as opposed to output pins) then it is interpreted differently(as muxes). another point is that you can apply 'Z' i.e. ask for tristate buffer without having inout but just out: out1 <= '1' when .... else 'Z'; meaning you can cutoff drive so that an external pulldown(or pullup) takes over and hence equivalent to: out1 <= '1' when .. else '0'; -- for the pulldown case.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
kaz, I have another problem want to share with you,and also with people visiting this website.That is I got a warning when I simulate my project in RTL using modelsim_altera.The warning is " There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, the result will be 'X'(es)." The wave was 'U',can't see their values.But when I try to simulate in GTL ,the values showed up.How to deal with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try and initialise the operands at signal declaration. Simulation tools don't assume an initial value unless it is specified.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Try and initialise the operands at signal declaration. Simulation tools don't assume an initial value unless it is specified. --- Quote End --- Values left uninitialised always start at the left most value in the declaration. So for std_logic they always start at 'U' sybtype myint is integer range -15 to 27; would initialise to -15. type statemachine is (idle, state1, state2, state3) would start at idle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is another confusing warning: Warning (15610): No output dependent on input pin "RXD".I have already used it like this "receiver PORT MAP (RXD,...,...); and "RSR<=RXD & RSR(7 DOWNTO 1)".How does this warning come from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It probably means that any logic you have got in there has been synthesised away. Often this can come from unconnected clocks or enables stuck at '0'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nice reply!Thanks!
Actually ,there are warnings about some output pins are stuck at GND this happened maybe when I didnot give their inial values.You know I can't give each value for each of them.so how to prevent them from being stuck at GND or synthesized away?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without seeing your code, I cant tell you what the problem is.
My previous 2 reasons are just the most common causes of the "output not dependent on inputs" problem.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So do you know some common methods to solve it,like modify quartus settings ,the procedure or both?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
normally, its a problem with your code rather than anything to do with quartus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks ,i'll try

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page