// counter16 // 16 bit loadable counter with enable and asynchronous reset // Actel Corporation // October 1, 2001 module counter16 (CLK, RESETn, LOAD, ENABLE, DATA, COUNT); input CLK, RESETn, LOAD, ENABLE; input [15:0] DATA; output [15:0] COUNT; reg [15:0] COUNT; always @(posedge CLK or negedge RESETn) begin if (!RESETn) COUNT <= 15'b0; else if (LOAD == 1'b1) COUNT <= DATA; else if (ENABLE == 1'b1) COUNT <= COUNT + 1; end endmodule <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>