﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="thpdoc.xsl"?>
<page id="any" suffix=" Keyword">
  <subsection>The <kw>any</kw> keyword can be used in two scenarios:
	<ul>
		<li>Inside a sensitivity list to make a process sensitive to all inputs. See <kw>process</kw> page for more details.</li>
		<li>Instead of a variable/<kw>link</kw> type to have the type inferred automatically.</li>
	</ul>
</subsection>
<section name="Remarks">
	<p>When used as a type name, the <kw>any</kw> keyword is equivalent to the <kw>auto</kw> keyword.</p>
</section>
<examples>
	<example name="Automatic sensitivity">
  <code>entity Test
{
	signal logic[8] a, b, c;
	
	process test (any)
	{
		a = b + c;
	}
}</code>
	The following VHDL code will be generated:
<code>entity Test is
end entity Test;

architecture Behavioral of Test is
	signal a : std_logic_vector(7 downto 0);
	signal b : std_logic_vector(7 downto 0);
	signal c : std_logic_vector(7 downto 0);
	
	begin
		test : process (b, c) is
		begin
			a &lt;= (b + c);
		end process test;
		
end architecture Behavioral;</code>
	</example>
	<example name="Type inference">
<code>	signal logic[8] a, b, c;
    process test (clk.rising)
    {
    	any tmp = a cat b;
    	c = tmp[12 to 5];
    }</code>
	Generated VHDL code:
<code>		test : process (clk) is
			variable tmp : std_logic_vector(15 downto 0);
		begin
			if rising_edge(clk) then
				tmp := (a &amp; b);
				c &lt;= tmp(12 downto 5);
			end if;
		end process test;</code>
	The type of the variable "tmp" has been derived from the "a cat b" expression.
	</example>
</examples>
  <seealso id="auto"/>
  <seealso id="entity"/>
  <seealso id="functions"/>
</page>