Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] vhdl inout port reading writing

Status
Not open for further replies.

franticEB

Full Member level 3
Joined
May 10, 2010
Messages
152
Helped
1
Reputation
2
Reaction score
2
Trophy points
1,298
Activity points
2,540
Hi i've to realize in vhdl the scheme in figure

inout.jpg

In FPGA there is a block that reads from input port and stores in its internal register a certain value; i want to use this port as output for 2 spi module as in figure.
I try to implement in vhdl the scheme as in figure but altera quartus II cannot synthesize givin me the following error:

Error (13076): The node "XXXXXX" has multiple drivers due to the non-tri-state driver"

the code is below:

Code:
INOUT_PORT <= spi_wire when enb='1' else 'Z';

spi_wire <= out_spi_1 when select='1' else out_spi_2;

reader_wire <= INOUT_PORT when enb='0' else 'Z';

Anyone could help me?
 

There are no multiple drivers in the shown code snippet, but a meaningless internal tri-state and illegal usage of a reserved name "select" for a signal. The latter makes me think that you didn't post the actual code.

Why not simply writing:
Code:
INOUT_PORT <= 'Z' when enb = '0' else
   out_spi_1 when sel = '1' else 
   out_spi_2;
reader_wire <= INOUT_PORT
 

There are no multiple drivers in the shown code snippet, but a meaningless internal tri-state and illegal usage of a reserved name "select" for a signal. The latter makes me think that you didn't post the actual code.

Why not simply writing:
Code:
INOUT_PORT <= 'Z' when enb = '0' else
   out_spi_1 when sel = '1' else 
   out_spi_2;
reader_wire <= INOUT_PORT
This code doesn't resolve my problem. I can view rtl schematic but the design doesn't pass the synthesis phase with the same error:

"The node "INOUT" has multiple drivers due to the non-tri-state driver"

more precisely

"The node "INOUT" has multiple drivers due to the non-tri-state driver of out_spi_1 port"
 
Last edited:

This code doesn't resolve my problem.
You didn't actually report the problem. The code compiles correctly as such.

To get any help, you should show a complete entity that reproduces the problem.
 

It seems you are going to serve the data from two different sources. For this case I guess you have to use an interstage.
Something like this:

out_spi <= out_spi_1 when sel = '1' else out_spi_2;

INOUT_PORT <= 'Z' when enb = '0' else out_spi;
reader_wire <= INOUT_PORT
 

I resolve the problem configuring out_spi_1 and out_spi_2 in high impedance when not in output mode.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top