-- Address generator library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; entity agener is generic ( bitwidth: positive ); port ( clock: in bit; reset, enable: in std_logic; start_address, stop_address: in unsigned(bitwidth-1 downto 0); address: out unsigned(bitwidth-1 downto 0) ); end agener; architecture one_direction of agener is signal counter: unsigned(bitwidth -1 downto 0); begin process begin wait on clock until clock='1'; if(reset='1') then counter<=start_address; elsif(enable='1') and (counter<stop_address)then counter<=counter+1; end if; address<=counter; end process; end one_direction; <div align="center"><br /><script type="text/javascript"><!-- google_ad_client = "pub-7293844627074885"; //468x60, Created at 07. 11. 25 google_ad_slot = "8619794253"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><br /> </div>