UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ashimo
Observer
6,545 Views
Registered: ‎09-02-2010

how to use inout port with EDK

hi, i have a project use I2C implement use ISE ok. I use FSM code. SDA port  is inout port. But when i intergrate peripheral with edk , i have an error Xst:2585 - Port <xxx_I> of instance <xxxx_0> does not exist in definition <xxxx>

I saw Platform Specification Format Reference Manual (psf_rm.pdf) but i dont understand where are sda_i,sda_o,sda_t ? because in VHDL file not use declare bidirectional port. 

any example??thanks

0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
6,541 Views
Registered: ‎02-01-2008

Re: how to use inout port with EDK

The _I, _O, and _T ports will be in hdl and the mpd file is used to group these pins into a bi-directional signal. For an example, look at the source for the axi or xps IIC edk core in <edk_install>\14.1\ISE_DS\EDK\hw\XilinxProcessorIPLib\pcores.

 

If you want access to the _I, _O, _T in XPS, go to the ports tab and on the right you will see filters. Check the by_connection->defaults and you will see the hidden pins in case you want to connect logic to them.

 

You will find the IIC hdl has:

      Sda_I            : in  std_logic;
      Sda_O            : out std_logic;
      Sda_T            : out std_logic;
      Scl_I            : in  std_logic;
      Scl_O            : out std_logic;
      Scl_T            : out std_logic;

 

And mpd has:

PORT Sda_I = "", DIR = I, IO_IF = iic_0, IO_IS = Serial_Data_I
PORT Sda_O = "", DIR = O, IO_IF = iic_0, IO_IS = Serial_Data_O
PORT Sda_T = "", DIR = O, IO_IF = iic_0, IO_IS = Serial_Data_T
PORT Scl_I = "", DIR = I, IO_IF = iic_0, IO_IS = Serial_Clock_I
PORT Scl_O = "", DIR = O, IO_IF = iic_0, IO_IS = Serial_Clock_O
PORT Scl_T = "", DIR = O, IO_IF = iic_0, IO_IS = Serial_Clock_T
IO_IF = iic_0, IO_IS = gpo
PORT Sda = "", TRI_O = Sda_O, TRI_T = Sda_T, DIR = IO, TRI_I = Sda_I, THREE_STATE = TRUE, PERMIT = BASE_USER, DESC = ''IIC Serial Data'', IO_IF = iic_0, IO_IS = Serial_Data
PORT Scl = "", TRI_O = Scl_O, TRI_T = Scl_T, DIR = IO, TRI_I = Scl_I, THREE_STATE = TRUE, PERMIT = BASE_USER, DESC = ''IIC Serial Clock'', IO_IF = iic_0, IO_IS = Serial_Clock


0 Kudos
Observer ashimo
Observer
6,539 Views
Registered: ‎09-02-2010

Re: how to use inout port with EDK

i must generate SDA_I,SDA_O,SDA_T in my VHDL code ?? sorry but i dont clear. My HDL peripheral is

entity I2C

port (

    clk :in std_logic;

   reset: in std_logic;

   SCL : out std_logic;

   SDA : inout std_logic

      );

 how I can modify mdp,hdl for import peripheral   ?? step by step. thanks

 

0 Kudos
Xilinx Employee
Xilinx Employee
6,534 Views
Registered: ‎02-01-2008

Re: how to use inout port with EDK

Yes, you should generate _I, _O, and _T in your hdl. I presume this I2C is a custom core of your own.

 

If you've already imported the peripheral, just use a text editor to modify the mpd and hdl. Peripheral import is only to assist with adding the mpd, pao, and bbd files.

 

In your hdl, somewhere you will have something like:

 

SDA <= outData when (outEnable='1') else 'Z';

inData <= SDA;

 

So change it to:

SDA_O <= outData;

SDA_T <= not outEnable;

inData <= SDA_I;

 

With all this said, the mpd does support bi-directional signals but you have to be careful using them. If you don't want to use _I/O/T, look at UG642 and search for port settings IOB_STATE, DIR.

 

0 Kudos
Observer ashimo
Observer
6,529 Views
Registered: ‎09-02-2010

Re: how to use inout port with EDK

hi, thanks for reply .

 I try to write test code .llike this

           entity I2c

             (

               SCL : out std_logic;

              SDA _I : in std_logic;

              SDA _o : in std_logic;

             SDA _T : in std_logic;

             );

 

achitech

        signal SDA,outData,outEnable,inData : std_logic := '0';

begin

             SDA <= outData when (outEnable='1') else 'Z';
           inData <= SDA;
          SDA_O <= outData;
           SDA_T <= not outEnable;
           inData <= SDA_I;

          scl <= '1';

end ;

 

 

 

then make external port in xps, and modify .mpd file as

 

PORT SDA = "", DIR=IO, TRI_T=SDA_I, TRI_O=SDA_O, TRI_T=SDA_T, THREE_STATE=TRUE
PORT SDA_T = "", DIR=OUT
PORT SDA_O = "", DIR=OUT
PORT SDA_I = "", DIR=IN

 

then i generate bistream but i have an error

 

331 - port is driven by a sourceless connector

 

 

what is wrong?

 

 

0 Kudos
Observer ashimo
Observer
6,528 Views
Registered: ‎09-02-2010

Re: how to use inout port with EDK

and , when make external port sda_i,sda_o,sda_t then, ports pin are generate , and not automatic connect to bi-directional .

 

I need more steps. thanks

0 Kudos
6,335 Views
Registered: ‎04-10-2012

Re: how to use inout port with EDK

Hi ashimo

I'm facing exactly the same issue you had. Were you able to solve it?

After editing the MPD following the instructions, I had the same error you had, what was your solution?

0 Kudos