
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.armadeus.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Wb_button.vhd</id>
		<title>Wb button.vhd - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.armadeus.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Wb_button.vhd"/>
		<link rel="alternate" type="text/html" href="http://www.armadeus.org/wiki/index.php?title=Wb_button.vhd&amp;action=history"/>
		<updated>2026-05-13T20:43:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.3</generator>

	<entry>
		<id>http://www.armadeus.org/wiki/index.php?title=Wb_button.vhd&amp;diff=3846&amp;oldid=prev</id>
		<title>FabienM: New page: &lt;source lang=&quot;VHDL&quot;&gt; library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.numeric_std.all;  --------------------------------------------------------------------------- Entity Wb_button is  ...</title>
		<link rel="alternate" type="text/html" href="http://www.armadeus.org/wiki/index.php?title=Wb_button.vhd&amp;diff=3846&amp;oldid=prev"/>
				<updated>2008-03-31T14:16:55Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &amp;lt;source lang=&amp;quot;VHDL&amp;quot;&amp;gt; library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.numeric_std.all;  --------------------------------------------------------------------------- Entity Wb_button is  ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;VHDL&amp;quot;&amp;gt;&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.STD_LOGIC_1164.ALL;&lt;br /&gt;
use IEEE.numeric_std.all;&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
Entity Wb_button is &lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
	port &lt;br /&gt;
	(&lt;br /&gt;
		-- global signals&lt;br /&gt;
		wbc_candr_reset : in std_logic ;&lt;br /&gt;
		wbc_candr_clk 	: in std_logic ;&lt;br /&gt;
		-- Wishbone signals&lt;br /&gt;
		wbs_sbutton_readdata  : out std_logic_vector( 15 downto 0);&lt;br /&gt;
		wbs_sbutton_strobe    : in std_logic ;&lt;br /&gt;
		wbs_sbutton_write	  : in std_logic ;&lt;br /&gt;
		wbs_sbutton_ack	      : out std_logic;&lt;br /&gt;
		-- irq&lt;br /&gt;
		wbs_sbutton_irq : out std_logic ;&lt;br /&gt;
		-- fpga input&lt;br /&gt;
		gls_button_export 		: in std_logic &lt;br /&gt;
	);&lt;br /&gt;
end entity;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---------------------------------------------------------------------------&lt;br /&gt;
Architecture Wb_button_1 of Wb_button is&lt;br /&gt;
	---------------------------------------------------------------------------&lt;br /&gt;
	signal button_r : std_logic ;&lt;br /&gt;
	signal reg : std_logic_vector( 15 downto 0);&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
	-- connect button&lt;br /&gt;
	cbutton : process(wbc_candr_clk,wbc_candr_reset)&lt;br /&gt;
	begin&lt;br /&gt;
		if wbc_candr_reset = '1' then&lt;br /&gt;
			reg &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
		elsif rising_edge(wbc_candr_clk) then&lt;br /&gt;
			reg &amp;lt;= &amp;quot;000000000000000&amp;quot;&amp;amp;gls_button_export;&lt;br /&gt;
		end if;&lt;br /&gt;
	end process cbutton;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	-- rise interruption&lt;br /&gt;
	pbutton : process(wbc_candr_clk,wbc_candr_reset)&lt;br /&gt;
	begin&lt;br /&gt;
		if wbc_candr_reset = '1' then&lt;br /&gt;
			wbs_sbutton_irq &amp;lt;= '0';&lt;br /&gt;
			button_r &amp;lt;= '0';&lt;br /&gt;
		elsif rising_edge(wbc_candr_clk) then&lt;br /&gt;
			if button_r /= gls_button_export then&lt;br /&gt;
				wbs_sbutton_irq &amp;lt;= '1';&lt;br /&gt;
			else&lt;br /&gt;
				wbs_sbutton_irq &amp;lt;= '0';&lt;br /&gt;
			end if;&lt;br /&gt;
			button_r &amp;lt;= gls_button_export;&lt;br /&gt;
		end if;&lt;br /&gt;
	end process pbutton;&lt;br /&gt;
&lt;br /&gt;
	-- register reading process&lt;br /&gt;
	pread : process(wbc_candr_clk,wbc_candr_reset)&lt;br /&gt;
	begin&lt;br /&gt;
		if(wbc_candr_reset = '1') then&lt;br /&gt;
			wbs_sbutton_ack &amp;lt;= '0';&lt;br /&gt;
			wbs_sbutton_readdata &amp;lt;= (others =&amp;gt; '0');&lt;br /&gt;
		elsif(falling_edge(wbc_candr_clk)) then&lt;br /&gt;
			wbs_sbutton_ack &amp;lt;= '1';&lt;br /&gt;
			if(wbs_sbutton_strobe = '1' and wbs_sbutton_write = '0')then&lt;br /&gt;
				wbs_sbutton_readdata &amp;lt;= reg;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;&lt;br /&gt;
	end process pread;&lt;br /&gt;
&lt;br /&gt;
end architecture Wb_button_1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>FabienM</name></author>	</entry>

	</feed>