Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - any way to avoid warnings about unused outputs in XST?

 
Thread Tools Search this Thread
Old 02-23-2009, 07:57 PM   #1
Default any way to avoid warnings about unused outputs in XST?


I think this has been asked before, but I haven't found a satisfactory answer. If I instantiate a component and leave some of the outputs unconnected, XST issues a warning about it. I like that behavior as it might indicate an output I forgot to connect.

However, if I explicitly connect that output to 'OPEN', I'm telling the compiler that I want to leave that output open, yet it still issues a warning. Are there any tricks to work around this?

(and no, ISE's Message Filtering feature is not the answer I'm looking for)

Ken


Ken Cecka
  Reply With Quote
Old 02-23-2009, 08:21 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Ken Cecka wrote:

> I'm telling the compiler that I want to leave that output open, yet it still issues a warning.
> Are there any tricks to work around this?


I avoid this annoyance by using a direct instance
instead of a component.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 02-23-2009, 08:30 PM   #3
Ken Cecka
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Mike Treseler wrote:

> Ken Cecka wrote:
>
>> I'm telling the compiler that I want to leave that output open, yet it
>> still issues a warning. Are there any tricks to work around this?

>
> I avoid this annoyance by using a direct instance
> instead of a component.
>
> -- Mike Treseler


I'm not sure I understand the difference - how do I go about using a direct instance?

Ken


Ken Cecka
  Reply With Quote
Old 02-23-2009, 08:45 PM   #4
Ken Cecka
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Ken Cecka wrote:

> Mike Treseler wrote:
>
>> Ken Cecka wrote:
>>
>>> I'm telling the compiler that I want to leave that output open, yet it
>>> still issues a warning. Are there any tricks to work around this?

>>
>> I avoid this annoyance by using a direct instance
>> instead of a component.
>>
>> -- Mike Treseler

>
> I'm not sure I understand the difference - how do I go about using a
> direct instance?
>
> Ken


Does direct instance refer to when you us a library that declares the component so that you can create an instance without having to explicitly delcare the component in your architecture? I just noticed that I don't get warnings when I'm instantiating xilinx components that are declared in unisim, so I'm guessing I can put my components in a package and achieve the same result?

Ken


Ken Cecka
  Reply With Quote
Old 02-23-2009, 09:19 PM   #5
Mike Treseler
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Ken Cecka wrote:

> I'm not sure I understand the difference - how do I go about using a direct instance?


here's one:

dut : entity work.uart
generic map (char_len_g => tb_char_g, -- for vsim command line
overload
tic_per_bit_g => tb_tics_g)
port map (
clock => clk_s, -- [in] -- by tb_clk
reset => rst_s, -- [in] -- by tb_clk
address => address_s, -- [in] -- by main
writeData => writeData_s, -- [in] -- by main
write_stb => write_stb_s, -- [in] -- by main
readData => readData_s, -- [out]-- by uut
read_stb => read_stb_s, -- [in] -- by main
serialIn => serialIn_s, -- [in] -- by main,loopback destination
serialOut => serialOut_s -- [out]-- by uut, loopback source
);


Mike Treseler
  Reply With Quote
Old 02-23-2009, 09:26 PM   #6
Mike Treseler
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Ken Cecka wrote:

> Does direct instance refer to when you us a library that declares the component so that you can create an instance without having to explicitly declare the component in your architecture?


No, that's an indirect instance, correctly bound.

> I just noticed that I don't get warnings when I'm instantiating xilinx components that are declared in unisim,
> so I'm guessing I can put my components in a package and achieve the same result?


Thats how Xilinx does it.
Works fine if I don't mind
maintaining two interfaces
instead of one.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 02-23-2009, 09:58 PM   #7
Ken Cecka
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Mike Treseler wrote:

> Ken Cecka wrote:
>
>> I'm not sure I understand the difference - how do I go about using a
>> direct instance?

>
> here's one:
>
> dut : entity work.uart
> generic map (char_len_g => tb_char_g, -- for vsim command line
> overload
> tic_per_bit_g => tb_tics_g)
> port map (
> clock => clk_s, -- [in] -- by tb_clk
> reset => rst_s, -- [in] -- by tb_clk
> address => address_s, -- [in] -- by main
> writeData => writeData_s, -- [in] -- by main
> write_stb => write_stb_s, -- [in] -- by main
> readData => readData_s, -- [out]-- by uut
> read_stb => read_stb_s, -- [in] -- by main
> serialIn => serialIn_s, -- [in] -- by main,loopback
> destination
> serialOut => serialOut_s -- [out]-- by uut, loopback source
> );


Just found a previous post from you on the subject:
http://groups.google.com/group/comp....51a3ca8311ccc4

Apparently I've been spending all this time keeping component declarations synced up with my entities out of pure masochism

I'll definitely be making more use of direct instantiation, but it doesn't seem to solve the unused output warning. The example below (with or without the z line commented) generates an unconnected output warning.

Ken

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;

ENTITY foo IS
PORT
(
x : IN STD_LOGIC;
y : OUT STD_LOGIC;
z : OUT STD_LOGIC
);
END foo;

ARCHITECTURE model OF foo IS
BEGIN
y <= x;
z <= NOT x;
END;

LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;

ENTITY tmp IS
PORT
(
x : IN STD_LOGIC;
y : OUT STD_LOGIC;
z : OUT STD_LOGIC
);
END tmp;

ARCHITECTURE model OF tmp IS

BEGIN

FOO1 : ENTITY WORK.foo
PORT MAP
(
x => x,
y => y
--z => OPEN
);
z <= '0';

END;



Ken Cecka
  Reply With Quote
Old 03-02-2009, 07:48 PM   #8
Andy Peters
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
On Feb 23, 1:21*pm, Mike Treseler <mtrese...@gmail.com> wrote:
> Ken Cecka wrote:
> > I'm telling the compiler that I want to leave that output open, yet it still issues a warning.
> > Are there any tricks to work around this?

>
> I avoid this annoyance by using a direct instance
> instead of a component.


Are you saying to do a direct instantiation and simply leave out the
unused (open) ports?

-a


Andy Peters
  Reply With Quote
Old 03-02-2009, 09:01 PM   #9
Mike Treseler
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Andy Peters wrote:

> Are you saying to do a direct instantiation and simply leave out the
> unused (open) ports?


Yes.
I was assuming that the warning is due
to a mismatched component declaration.

-- Mike Treseler


Mike Treseler
  Reply With Quote
Old 03-02-2009, 10:11 PM   #10
Ken Cecka
 
Posts: n/a
Default Re: any way to avoid warnings about unused outputs in XST?
Mike Treseler wrote:

> Andy Peters wrote:
>
>> Are you saying to do a direct instantiation and simply leave out the
>> unused (open) ports?

>
> Yes.
> I was assuming that the warning is due
> to a mismatched component declaration.
>
> -- Mike Treseler


Unfortunately not. The Xilinx tools generate a warning any time there's an unused output, and it doesn't seem to matter whether I use a component or direct instantiation. I finally gave up and turned on a message filter.

Ken


Ken Cecka
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
WARNING: Avoid Hollywood Video Gift Cards! Ron Bennett DVD Video 19 10-21-2004 12:49 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46