![]() |
|
|
|||||||
![]() |
VHDL - Connecting two bidirectional ports together |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi,
Previously I heard that " it is impossible to connect two bidirectional port together in VHDL without any enable signals " But tried like this, Way 1 *********************************************** entity dec CPU_I2C_SDA :inout std_logic; I2C_SDA_MC :inout std_logic; signal declared signal enable1 : std_logic; signal enable2 : std_logic; Logic starts here.......... enable1 <= '1'; process(enable1) begin if enable1 ='1' then CPU_I2C_SDA <= I2C_SDA_MC ; else CPU_I2C_SDA <= 'Z'; end if; end process; enable2 <= '1'; process(enable2) begin if enable2 ='1' then I2C_SDA_MC <= CPU_I2C_SDA ; else I2C_SDA_MC <= 'Z'; end if; end process; *********************************************** Way 2: *********************************************** process(I2C_SDA_MC ) begin if I2C_SDA_MC = '0' then CPU_I2C_SDA <= '0'; elsif I2C_SDA_MC = '1' then CPU_I2C_SDA <= '1'; else CPU_I2C_SDA <= 'Z'; end if; end process; process(CPU_I2C_SDA) begin if CPU_I2C_SDA = '0' then I2C_SDA_MC <= '0'; elsif CPU_I2C_SDA = '1' then I2C_SDA_MC <= '1'; else I2C_SDA_MC <='Z'; end if; end process; ******************************************** In this both logic, I got the ERROR during compilation. Can anyone share why the error came ? -V VJN |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| vhdl bidirectional transceiver with enable | qtr | Hardware | 1 | 08-22-2007 06:30 AM |
| vhdl code for bidirectional transceiver | qtr | General Help Related Topics | 0 | 07-05-2007 05:00 PM |
| Connecting routers | makhan | Hardware | 2 | 11-18-2006 11:27 AM |
| Re: USB issue ... some USB 2 ports working only in USB 1 mode | hungsolo2005@yahoo.com | A+ Certification | 0 | 06-14-2006 08:26 PM |
| alot of open ports | leno bob | A+ Certification | 8 | 03-27-2005 11:44 PM |